Frontend integration

See also

Credere frontend

Enumerations

Credere frontend’s src/constants/index.ts constants should match app.models enumerations.

Backend

Frontend

ApplicationStatus

APPLICATION_STATUS

BorrowerSize.NOT_INFORMED

DEFAULT_BORROWER_SIZE

CreditType

CREDIT_PRODUCT_TYPE

UserType

USER_TYPES

… and also app.util enumerations.

Backend

Frontend

StatisticCustomRange

STATISTICS_DATE_FILTER

Schemas and models

Credere frontend’s src/schemas/ schemas should match app.parsers, app.serializers and app.models models.

This table is contructed by running this command, and filling in information from Credere frontend’s src/api/ files:

uv run python -m app dev routes --csv-format --file docs/_static/routes.csv

Methods

Path

Backend parsers

Backend serializers

Frontend request

Frontend response

POST

/users

models.User

models.User

CreateUserInput

IUser

PUT

/users/change-password

BasicUser

ChangePasswordResponse | ResponseBase

UpdatePasswordPayload

IUpdatePasswordResponse

PUT

/users/setup-mfa

SetupMFA

ResponseBase

SetupMFAInput

IResponse

POST

/users/login

BasicUser

LoginResponse

LoginInput

ILoginResponse

GET

/users/logout

request

ResponseBase

IResponse

GET

/users/me

UserResponse

IUserResponse

POST

/users/forgot-password

ResetPassword

ResponseBase

ResetPasswordInput

IResponse

GET

/users/{user_id}

user_id

models.User

id

IUser

GET

/users

sort_order, sort_field, page_size, page

UserListResponse

PaginationInput

IUsersListResponse

PUT

/users/{user_id}

models.User

models.UserWithLender

UpdateUserInput

IUser

POST

/applications/{id}/reject-application

LenderRejectedApplication

models.ApplicationWithRelations

RejectApplicationInput

IApplication

POST

/applications/{id}/approve-application

LenderApprovedData

models.ApplicationWithRelations

ApproveApplicationInput

IApplication

PUT

/applications/{id}/verify-data-field

UpdateDataField

models.ApplicationWithRelations

IUpdateBorrower

IApplication

PUT

/applications/documents/{document_id}/verify-document

VerifyBorrowerDocument

models.ApplicationWithRelations

IVerifyDocument

IApplication

PUT

/applications/{id}/award

AwardUpdate

models.ApplicationWithRelations

IUpdateAward

IApplication

PUT

/applications/{id}/borrower

BorrowerUpdate

models.ApplicationWithRelations

IUpdateBorrower

IApplication

GET

/applications/admin-list

search_value, sort_order, sort_field, page_size, page

ApplicationListResponse

PaginationInput

IApplicationsListResponse

GET

/applications

search_value, sort_order, sort_field, page_size, page

ApplicationListResponse

PaginationInput

IApplicationsListResponse

GET

/applications/id/{id}

models.ApplicationWithRelations

id

IApplication

POST

/applications/{id}/start

id

models.ApplicationWithRelations

id

IApplication

POST

/applications/email-sme/{id}

ApplicationEmailBorrower

models.ApplicationWithRelations

EmailToSMEInput

IApplication

GET

/applications/{id}/previous-awards

list[models.Award]

id

IAward[]

GET

/applications/uuid/{uuid}

ApplicationResponse

uuid

IApplicationResponse

POST

/applications/decline

ApplicationDeclinePayload

ApplicationResponse

DeclineApplicationInput

IApplicationResponse

POST

/applications/rollback-decline

ApplicationBase

ApplicationResponse

ApplicationBaseInput

IApplicationResponse

POST

/applications/decline-feedback

ApplicationDeclineFeedbackPayload

ApplicationResponse

DeclineFeedbackInput

IApplicationResponse

POST

/applications/access-scheme

ApplicationBase

ApplicationResponse

ApplicationBaseInput

IApplicationResponse

POST

/applications/credit-product-options

ApplicationCreditOptions

CreditProductListResponse

GetCreditProductsOptionsInput

IApplicationCreditOptions

POST

/applications/select-credit-product

ApplicationSelectCreditProduct

ApplicationResponse

SelectCreditProductInput

IApplicationResponse

POST

/applications/rollback-select-credit-product

ApplicationBase

ApplicationResponse

ApplicationBaseInput

IApplicationResponse

POST

/applications/confirm-credit-product

ApplicationBase

ApplicationResponse

ApplicationBaseInput

IApplicationResponse

POST

/applications/rollback-confirm-credit-product

ApplicationBase

ApplicationResponse

ApplicationBaseInput

IApplicationResponse

POST

/applications/submit

ApplicationBase

ApplicationResponse

ApplicationBaseInput

IApplicationResponse

POST

/applications/upload-document

file, type, uuid

models.BorrowerDocumentBase

UploadFileInput

IBorrowerDocument

POST

/applications/complete-information-request

ApplicationBase

ApplicationResponse

ApplicationBaseInput

IApplicationResponse

POST

/applications/find-alternative-credit-option

ApplicationBase

ApplicationResponse

ApplicationBaseInput

IApplicationResponse

POST

/applications/change-email

ChangeEmail

parsers.ChangeEmail

ChangeEmailInput

ChangeEmailInput

POST

/applications/confirm-change-email

ConfirmNewEmail

parsers.ChangeEmail

ConfirmChangeEmailInput

ChangeEmailInput

GET

/meta

dict[str, list[dict[str, str]]]

GET

/applications/documents/id/{document_id}

document_id

id

blob

GET

/applications/{id}/download-application/{lang}

lang

id, lang

blob

GET

/applications/export/{lang}

lang

lang

blob

POST

/lenders

models.LenderCreate

models.Lender

ILenderBase

ILender

POST

/lenders/{lender_id}/credit-products

models.CreditProduct

models.CreditProduct

ICreditProductBase

ICreditProduct

GET

/lenders/{lender_id}

lender_id

models.LenderWithRelations

id

ILender

PUT

/lenders/{lender_id}

models.LenderBase

models.Lender

ILenderUpdate

ILender

GET

/lenders

LenderListResponse

ILenderListResponse

GET

/procurement-categories

list[str]

string[]

GET

/credit-products/{credit_product_id}

credit_product_id

models.CreditProductWithLender

id

ICreditProduct

PUT

/credit-products/{credit_product_id}

models.CreditProduct

models.CreditProduct

ICreditProductUpdate

ICreditProduct

GET

/statistics-ocp

custom_range, lender_id, final_date, initial_date

StatisticResponse

StatisticsParmsInput

StatisticsFI

GET

/statistics-ocp/opt-in

StatisticOptInResponse

StatisticsOCPoptIn

GET

/statistics-fi

StatisticResponse

StatisticsFI