Application Documents
Overview
Most applications get approved automatically without any document verification. Some applications cannot be approved or declined based on the initial data provided by the customer, and require document verification.
Once an application moves to an awaitingDocuments status (you can identify these cases by listening to the relevant webhook event), the customer would need to provide the required application documents.
When that happens, Unit automatically creates Application document resources, that represent the documents that need to be collected for the application to be evaluated.
Their initial status is always Required
. The documents will be different in the case of individual and business applications.
You can find out what documents are required using the list application documents endpoint.
When creating an application or getting an application by id, the documents are included in the response included
top-level field.
Application Document Status
Status | Description |
---|---|
Required | The document is required for the application to be evaluated. |
ReceivedBack | Back-side of the document was received. Front-side is still required. Only relevant for IdDocument document type. |
ReceivedFront | Front-side of the document was received. Back-side is still required. Only relevant for IdDocument document type. |
Invalid | The document is invalid. You may re-upload the correct document for the application to be evaluated. |
Approved | The document is approved. |
PendingReview | The document is currently undergoing review. |
Document Types
Name | Description |
---|---|
IdDocument | An individual's Drivers License or State ID. Both front-side and back-side are required. |
Passport | An individual's passport. |
AddressVerification | An individual's document to verify address. Document may be a utility bill, bank statement, lease agreement or current pay stub. |
SocialSecurityCard | An individual's social security card. |
CertificateOfIncorporation | A business's certificate of incorporation. A certificate of assumed name will also be accepted. |
EmployerIdentificationNumberConfirmation | A business's EIN confirmation document (either IRS form 147c or IRS form CP-575). |
ClientRequested | Client requested customer document. |
SelfieVerification | Selfie verification document. |
Upload Document
Uploads a document file. Supported file types are pdf
, jpeg
or png
.
Verb | PUT |
Url | https://api.s.unit.sh/applications/{applicationId}/documents/{documentId} |
Required Scope | applications-write |
Timeout (Seconds) | 120 |
For a driver's license, this operation uploads the front-side only. Upload the back-side of a driver's licence using Upload Document Back-Side API.
Maximum size for a document is 20mb.
Headers
Index | Value |
---|---|
Content-Type | One of image/png , image/jpeg , or application/pdf . |
curl --request PUT 'https://api.s.unit.sh/applications/46/documents/3' \
--header 'Content-Type: application/pdf' \
--data-binary 'passport.pdf'
Response
Response is a JSON:API document.
200 OK
Field | Type | Description |
---|---|---|
data | ApplicationDocument | The target resource after the operation was completed. |
{
"data": {
"type": "document",
"id": "3",
"attributes": {
"documentType": "Passport",
"status": "Approved",
"description": "Please provide a current copy of your passport.",
"name": "Richard Hendricks",
"dateOfBirth": "2001-08-15"
}
}
}
Upload Document Back-Side
Uploads the back-side of a document. Supported file types are pdf
, jpeg
or png
.
Verb | PUT |
Url | https://api.s.unit.sh/applications/{applicationId}/documents/{documentId}/back |
Required Scope | applications-write |
Timeout (Seconds) | 120 |
This operation is only relevant to driver's licenses.
Headers
Index | Value |
---|---|
Content-Type | One of image/png , image/jpeg , or application/pdf . |
curl --request PUT 'https://api.s.unit.sh/applications/46/documents/3/back' \
--header 'Content-Type: application/pdf' \
--data-binary 'driver-license-back.pdf'
Response
Response is a JSON:API document.
200 OK
Field | Type | Description |
---|---|---|
data | ApplicationDocument | The target resource after the operation was completed. |
{
"data": {
"type": "document",
"id": "3",
"attributes": {
"documentType": "IdDocument",
"status": "Approved",
"description": "Please provide a copy of your unexpired government issued photo ID which would include Drivers License or State ID.",
"name": "Richard Hendricks",
"dateOfBirth": "2001-08-15"
}
}
}
List
List application documents.
Verb | GET |
Url | https://api.s.unit.sh/applications/{applicationId}/documents |
Required Scope | applications |
Timeout (Seconds) | 5 |
You can also list the application documents via Get Application by Id, the documents will be included in the response included
top-level field.
curl -X GET 'https://api.s.unit.sh/applications/1/documents' \
-H "Authorization: Bearer ${TOKEN}"
Response
Response is a JSON:API document.
200 OK
Field | Type | Description |
---|---|---|
data | Array of ApplicationDocument Resource | Array of application documents. |
{
"data": [
{
"type": "document",
"id": "1",
"attributes": {
"documentType": "CertificateOfIncorporation",
"status": "Required",
"description": "Please provide a certified copy of the Articles of Incorporation or Certificate of Incorporation.",
"name": "Pied Piper"
}
},
{
"type": "document",
"id": "2",
"attributes": {
"documentType": "AddressVerification",
"status": "Required",
"description": "Please provide a document to verify your address. Document may be a utility bill, bank statement, lease agreement or current pay stub.",
"name": "Richard Hendricks",
"address": {
"street": "5230 Newell Rd",
"street2": null,
"city": "Palo Alto",
"state": "CA",
"postalCode": "94303",
"country": "US"
}
}
},
{
"type": "document",
"id": "3",
"attributes": {
"documentType": "IdDocument",
"status": "Required",
"description": "Please provide a copy of your unexpired government issued photo ID which would include Drivers License or State ID.",
"name": "Richard Hendricks"
}
}
]
}
Download Document
Download the application document file.
Verb | GET |
Url | https://api.s.unit.sh/applications/{applicationId}/documents/{documentId}/download |
Timeout (Seconds) | 5 |
curl -X GET 'https://api.s.unit.sh/applications/10001/documents/1/download' \
-H "Authorization: Bearer ${TOKEN}"
Download Document Back-Side
Download the application document back-side file.
Verb | GET |
Url | https://api.s.unit.sh/applications/{applicationId}/documents/{documentId}/download/back |
Timeout (Seconds) | 5 |
curl -X GET 'https://api.s.unit.sh/applications/10001/documents/1/download/back' \
-H "Authorization: Bearer ${TOKEN}"
Create Document
Unit allows you to create (and store) custom documents. This feature allows you to run additional document verifications on your side - these are documents that are not required by Unit for the evaluation of the application. Once you create a custom document resource, you can upload and store the document by using the relevant endpoints.
Verb | POST |
Url | https://api.s.unit.sh/applications/{applicationId}/documents/ |
Required Scope | applications-write |
Timeout (Seconds) | 5 |
curl --request POST 'https://api.s.unit.sh/applications/46/documents/' \
--header 'Content-Type: application/vnd.api+json' \
--data-Raw ''
Response
Response is a JSON:API document.
200 OK
Field | Type | Description |
---|---|---|
data | ApplicationDocument | The target resource after the operation was completed. |
{
"data": {
"type": "document",
"id": "3",
"attributes": {
"documentType": "ClientRequested",
"status": "Required",
"description": "client requested customer document"
}
}
}
Verify Document
Verify Selfie Verification document
Verb | POST |
Url | https://api.s.unit.sh/application/:id/documents/:id/verify |
Required Scope | applications-write |
Timeout (Seconds) | 5 |
Attributes
Name | Type | Description |
---|---|---|
jobId | string | Verification job identifier |
Response
Response is a JSON:API document.
200 OK
Field | Type | Description |
---|---|---|
data | Document | The updated Document resource. |
curl -X POST 'https://api.s.unit.sh/applications/:id/documents/:id/verify'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "selfieVerification",
"attributes": {
"jobId": "X16krjAN1"
}
}
}'