AltScore
Borrower Central (BC)

Authorizations API

This API allows managing authorizations in the system. It provides endpoints to create, read, update, and delete authorizations, as well as to handle signatures and attachments associated with the authorizations.

The Authorization Object

The Authorization object represents an authorization in the system.

{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "tenant": "tenant123",
  "formId": "form123",
  "key": "consent_form",
  "label": "Consent Form",
  "identityKey": "email",
  "identityValue": "user@example.com",
  "borrowerId": "789e4567-e89b-12d3-a456-426614174111",
  "expiresAt": "2028-01-01T00:00:00Z",
  "ipAddress": "192.168.1.1",
  "policyLink": "https://example.com/policy",
  "externalId": "ext123",
  "tags": ["important", "urgent"],
  "authorizedAt": "2023-01-01T12:00:00Z",
  "createdAt": "2023-01-01T00:00:00Z",
  "updatedAt": "2023-01-02T12:00:00Z",
  "hasAttachments": true,
  "hasSignatures": true
}

Attributes

AttributeDescriptionType
idUnique identifier of the authorizationString
tenantTenant identifierString
formIdAssociated form ID (optional)String
keyKey identifying the type of authorizationString
labelDescriptive label of the authorizationString
identityKeySigner's identity keyString
identityValueSigner's identity valueString
borrowerIdAssociated borrower's ID (optional)String
expiresAtExpiration date and timeString (ISO 8601)
ipAddressIP address from where the authorization was createdString
policyLinkLink to the associated policy (optional)String
externalIdExternal identifier (optional)String
tagsTags associated with the authorizationArray of String
authorizedAtAuthorization date and timeString (ISO 8601)
createdAtCreation date and timeString (ISO 8601)
updatedAtLast update date and timeString (ISO 8601)
hasAttachmentsIndicates if the authorization has attachmentsBoolean
hasSignaturesIndicates if the authorization has signaturesBoolean

Available Operations

Create a New Authorization

Creates a new authorization in the system.

POST /v1/authorizations

Input Parameters:

ParameterDescriptionTypeRequired
tenantTenant identifierStringYes
keyKey identifying the type of authorizationStringYes
identityKeySigner's identity keyStringYes
identityValueSigner's identity valueStringYes
formIdAssociated form IDStringNo
borrowerIdAssociated borrower's IDStringNo
ipAddressIP address from where the authorization is createdStringNo
policyLinkLink to the associated policyStringNo
externalIdExternal identifierStringNo
tagsTags associated with the authorizationArray of StringNo

Example Request:

{
  "tenant": "tenant123",
  "key": "consent_form",
  "identityKey": "email",
  "identityValue": "user@example.com",
  "borrowerId": "789e4567-e89b-12d3-a456-426614174111",
  "policyLink": "https://example.com/policy",
  "tags": ["important", "urgent"]
}

Successful Response:

{
  "id": "123e4567-e89b-12d3-a456-426614174000"
}

Retrieve an Authorization

Retrieves the information of a specific authorization.

GET /v1/authorizations/:authorization_id

Path Parameters:

ParameterDescription
authorization_idID of the authorization to retrieve

Successful Response:

The response will be a complete Authorization object, as described above.

Delete an Authorization

Deletes an authorization from the system.

DELETE /v1/authorizations/:authorization_id

Path Parameters:

ParameterDescription
authorization_idID of the authorization to delete

Successful Response:

Status code 204 (No Content) if the deletion was successful.

Sign an Authorization

Initiates the signing process of an authorization by sending an OTP.

POST /v1/authorizations/:authorization_id/signatures

Path Parameters:

ParameterDescription
authorization_idID of the authorization to sign

Input Parameters:

ParameterDescriptionTypeRequired
valueContact value to send the OTPStringYes
contactMethodContact method (email, sms, etc.)StringYes
templateIdTemplate ID for the OTP messageStringYes
codeSizeOTP code sizeIntegerNo
expiresInOTP expiration time in secondsIntegerNo
maxAttemptsMaximum number of allowed attemptsIntegerNo

Example Request:

{
  "value": "user@example.com",
  "contactMethod": "email",
  "templateId": "otp_template_1",
  "codeSize": 6,
  "expiresIn": 300,
  "maxAttempts": 3
}

Successful Response:

{
  "otpId": "otp123456"
}

Verify Authorization Signature

Verifies the OTP code to complete the signing of an authorization.

POST /v1/authorizations/:authorization_id/signatures/attempt

Path Parameters:

ParameterDescription
authorization_idID of the authorization to verify

Input Parameters:

ParameterDescriptionTypeRequired
otpIdPreviously received OTP IDStringYes
codeOTP code entered by the userStringYes

Example Request:

{
  "otpId": "otp123456",
  "code": "123456"
}

Successful Response:

Status code 202 (Accepted) if the verification was successful.

List Authorizations

Retrieves a paginated list of authorizations with filtering and sorting options.

GET /v1/authorizations

Query Parameters:

ParameterDescriptionType
borrower-idBorrower's ID to filterString
searchText to search in authorizationsString
pagePage number (default: 1)Integer
per-pageItems per page (default: 10)Integer
keyFilter by authorization keyString
sort-byField to sort byString
sort-directionSorting direction (asc or desc)String

Successful Response:

The response will be a paginated list of Authorization objects.

Error Handling

The API may return the following error codes:

CodeDescription
400Bad Request
401Unauthorized
403Forbidden
404Not Found
409Conflict
500Internal Server Error

Errors will include a descriptive message in the response body.

On this page