Skip to main content

Application Documents APIs

Upload Document

Uploads a document file. Supported file types are pdf, jpeg or png. This endpoint is not available when archived=true.

VerbPUT
URLhttps://api.s.unit.sh/applications/{applicationId}/documents/{documentId}
Required Scopeapplications-write
Timeout (Seconds)120
Note

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.

Note

Maximum size for a document is 20mb.

Headers

IndexValue
Content-TypeOne 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

data
The target resource after the operation was completed.
Example Response:
{
"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. This endpoint is not available when archived=true.

VerbPUT
URLhttps://api.s.unit.sh/applications/{applicationId}/documents/{documentId}/back
Required Scopeapplications-write
Timeout (Seconds)120
Note

This operation is only relevant to driver's licenses.

Headers

IndexValue
Content-TypeOne 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

data
The target resource after the operation was completed.
Example Response:
{
"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.

VerbGET
URLhttps://api.s.unit.sh/applications/{applicationId}/documents
Required Scopeapplications
Timeout (Seconds)5
Suggestion

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

data
Array of application documents.
Example Response:
{
"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.

VerbGET
URLhttps://api.s.unit.sh/applications/{applicationId}/documents/{documentId}/download
Timeout (Seconds)5
Example Request:
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.

VerbGET
URLhttps://api.s.unit.sh/applications/{applicationId}/documents/{documentId}/download/back
Timeout (Seconds)5
Example Request:
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.

VerbPOST
URLhttps://api.s.unit.sh/applications/{applicationId}/documents/
Required Scopeapplications-write
Timeout (Seconds)5
curl -X POST 'https://api.s.unit.sh/applications/46/documents/'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'

Response

Response is a JSON:API document.

200 OK

data
The target resource after the operation was completed.
Example Response:
{
"data": {
"type": "document",
"id": "3",
"attributes": {
"documentType": "ClientRequested",
"status": "Required",
"description": "client requested customer document"
}
}
}

Verify Document

Verify Selfie Verification document

VerbPOST
URLhttps://api.s.unit.sh/application/:id/documents/:id/verify
Required Scopeapplications-write
Timeout (Seconds)5

Attributes

jobId
string
Verification job identifier

Response

Response is a JSON:API document.

200 OK

data
The updated Document resource.
Verify document:
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"
}
}
}'