Skip to main content

Financial Service Methods

This section highlights the different methods that can be used to create and retrieve bank statement request resources through the DeepIDV API.

Table of Contents

Create and Send a Bank Statement Request

Request to create and send a bank satement request to an applicant

Request

POST /financial

Parameters

Headers

TypeParamsValuesDescription
HEADERx-api-key*stringThe users API Key

Body Parameters

TypeParamsValuesDescription
BODYemail*stringThe end users email (Bank Statement session will be sent to this email)
BODYfirstName*stringThe end users first name
BODYlastName*stringThe end users last name
BODYphone*stringThe end users phone number (with country code) Example: +15192223333
BODYexternalIdstringA unique identifier that can be used to retrieve the generated statement session
BODYperiodstringThe period (in months) of a bank statement to reuqest (DEFAULT: 3) VALUES(3, 6, 9)
BODYsendEmailInvitebooleanSend an email to the applicant (DEFAULT: true)
BODYsendPhoneInvitebooleanSend an SMS to the applicant (DEFAULT: true)

Example Request

{
"email": "applicant@example.com",
"firstName": "John",
"lastName": "Doe",
"phone": "+15192223333",
"externalId": "external-123",
"period": "6",
"sendEmailInvite": true,
"sendPhoneInvite": true
}

Response

Success (200)

{
"bankStatementId": "<bank_statement_id>",
"bankStatementUrl": "<bank_statement_url>",
"externalId": "<external_id>",
"links": "<links>"
}
Response Fields
FieldTypeDescription
bank_statement_idstringThe unique id for the created bank statement session
bank_statement_urlstringThe link created to complete the bank statement session
external_idstringThe externalId that was passed as a parameter
linksarrayA list of discoverable URLs for related resources

Best Practices

  • Always validate required fields before sending requests
  • Store the id and externalId for future reference
  • Handle error responses appropriately in your application

Fetch Bank Statements

Request to fetch all bank statement sessions under the authenticated organization.

Request

GET /financial

Parameters

Headers

TypeParamsValuesDescription
HEADERx-api-key*stringThe users API Key

Query Parameters

TypeParamsValuesDescription
QUERYnextTokenstringTo retrieve the next page of sessions, provided the limit of 500 was reached in a previous call

Response

Success (200)

{
"bankStatements": [
{
"id": "<bank_statement_id>",
"externalId": "<external_id>",
"status": "<status>",
"type": "<statement_type>",
"createdAt": "<created_at>",
"updatedAt": "<updated_at>",
"senderUserId": "<sender_user_id>",
"Config": "<config>"
}
],
"nextToken": "<next_token>"
}
Response Fields
FieldTypeDescription
bank_statement_idstringThe unique id for an bank statement
external_idstringThe externalId for an bank statement
statusstringThe status of a bank statement
statement_typestringType of the bank statement VALUES: (upload, request)
created_atstringThe date stamp of when a session was created
updated_atstringThe date stamp of when a session was updated
sender_user_idstringID of the user that sent out the request
configobjectThe configuration for the bank statement
next_tokenstringThe token to get the next page of statements (if limit of 500 was reached)
Status Values

The status field can have one of the following values:

  • PENDING: Session has not been started
  • IN_PROGRESS: Sataement is processing
  • COMPLETED: Statement and analysis has completed
Config Values
  • period: The period in months of the requested bank statement (VALUES: 3, 6, 9)

Fetch Bank Statements by External ID

Get all bank statements by external ID

Request

GET /financial/externalId/{external_id}

Parameters

Headers

TypeParamsValuesDescription
HEADERx-api-key*stringThe users API Key

Response

Success (200)

{
"bankStatements": [
{
"id": "<bank_statement_id>",
"externalId": "<external_id>",
"status": "<status>",
"type": "<statement_type>",
"createdAt": "<created_at>",
"updatedAt": "<updated_at>",
"senderUserId": "<sender_user_id>",
"config": "<config>"
}
],
"nextToken": "<next_token>"
}
Response Fields
FieldTypeDescription
bank_statement_idstringThe unique id for an bank statement
external_idstringThe externalId for an bank statement
statusstringThe status of a bank statement
statement_typestringType of the bank statement VALUES: (upload, request)
created_atstringThe date stamp of when a session was created
updated_atstringThe date stamp of when a session was updated
sender_user_idstringID of the user that sent out the request
configobjectThe configuration for the bank statement
next_tokenstringThe token to get the next page of statements (if limit of 500 was reached)
Status Values

The status field can have one of the following values:

  • PENDING: Session has not been started
  • IN_PROGRESS: Sataement is processing
  • COMPLETED: Statement and analysis has completed
Config Values
  • period: The period in months of the requested bank statement (VALUES: 3, 6, 9)

Fetch Bank Statements by ID

Fetches a bank statement by bank statement ID

Request

GET /financial/{bank_statement_id}

Parameters

Headers

TypeParamsValuesDescription
HEADERx-api-key*stringThe users API Key

Response

Success (200)

{
"id": "<bank_statement_id>",
"externalId": "<external_id>",
"status": "<status>",
"type": "<statement_type>",
"createdAt": "<created_at>",
"updatedAt": "<updated_at>",
"senderUserId": "<sender_user_id>",
"config": "<config>"
}
Response Fields
FieldTypeDescription
bank_statement_idstringThe unique id for an bank statement
external_idstringThe externalId for an bank statement
statusstringThe status of a bank statement
statement_typestringType of the bank statement VALUES: (upload, request)
created_atstringThe date stamp of when a session was created
updated_atstringThe date stamp of when a session was updated
sender_user_idstringID of the user that sent out the request
configobjectThe configuration for the bank statement
Status Values

The status field can have one of the following values:

  • PENDING: Session has not been started
  • IN_PROGRESS: Sataement is processing
  • COMPLETED: Statement and analysis has completed
Config Values
  • period: The period in months of the requested bank statement (VALUES: 3, 6, 9)

Error Status Reference

The DeepIDV API uses standard HTTP status codes to indicate the success or failure of requests. The following table describes the possible error responses you may encounter:

Status CodeError MessageDescription
400{"error": "Invalid Input."}The request parameters are invalid or missing required fields
401{"error": "Invalid API key."}The provided API key is invalid or expired
402{"error": "Insufficient funds or subscription."}Unauthorized - Payment required
403{"error": "API key is missing."}No API key was provided in the request
429{"error": "Rate limit exceeded."}Too many requests have been made in a short period
500{"error": "Something went wrong."}An unexpected error occurred on the server

Best Practices for Error Handling

  • Always validate required fields before sending requests
  • Implement retry logic with exponential backoff for rate limit errors (429)
  • Store error logs for debugging and monitoring purposes
  • Display user-friendly error messages in your application