Customer API (2.4)
Download OpenAPI specification:Download
The Trulioo Customer API is organized around REST. Our API has predictable resource-oriented URLs and uses standard HTTP response codes, authentication, and verbs. The API provides authorization endpoints and endpoints to perform document verification and review transaction results.
Some US states impose obligations on businesses that collect and use “biometric identifiers” and/or “biometric information”, which may include facial scan data extracted from photos during a document verification transaction. One such law is the Illinois Biometric Information Privacy Act (“BIPA”). A business required to comply with BIPA is under obligations to, among other things, ensure that it informs the individual of the purpose of the collection and obtain consent. Accordingly, we require a notice and consent mechanism be implemented for all document verification transactions, and our customers using our API must provide us with confirmation via API whether an individual is located in the United States and has consented to the transaction in the prescribed manner. We also strongly encourage all of our customers to consult with legal counsel to ensure their own compliance with such laws.
For more information about the required notice and consent mechanism, please refer to our Service Specific Terms for Document Verification.
You can read more about the configuration requirements for our API related to the notice and consent mechanism here.
Authorize and generate access tokens
Required initial endpoint before starting the document verification process. It generates the access tokens to be used in subsequent endpoints. Access token expire in 60 minutes.
Authorizations:
header Parameters
Accept-Version required | string API Version |
Request Body schema: application/json
Identify the consent and if is in the US with the biometric policy agreement
consent required | boolean Provided consent will create a historical record with timestamp |
webhook | string <uri> Callback URL for transaction status updates. See Webhooks |
Responses
Request samples
- Payload
{- "consent": true,
}
Response samples
- 200
- 500
{- "accessToken": "string",
- "refreshToken": "string",
- "tokenType": "refresh_token",
- "expiresIn": 0
}
Create a shortcode for handoff to a SDK
Short code provides an option to pass the rest of the verification workflow to an SDK. The short code is a unique, single use code and it is valid for only 5 minutes. The verification will continue on SDK side starting with authorization using the short code. The short code locks the workflow to the same transaction identifier as the one generated earlier during authorization.
Authorizations:
header Parameters
Accept-Version required | string API Version |
Responses
Response samples
- 200
- 500
{- "shortCode": "qWinHpfejeezSqek"
}
Create and Configure Transactions
Creates a transaction with configuration options for document and/or selfie liveness verification.
Authorizations:
header Parameters
Accept-Version required | string API Version |
Request Body schema: application/json
object Document verification configuration | |
object Selfie liveness verification configuration |
Responses
Request samples
- Payload
{- "documentVerification": {
- "enabled": true,
- "documentsAccepted": [
- {
- "documentCountry": "CA",
- "documentTypes": [
- {
- "type": "DRIVERS_LICENSE",
- "years": [ ]
}
]
}
]
}, - "selfieVerification": {
- "enabled": true
}
}
Response samples
- 201
- 400
- 500
{- "transactionId": "75906707-8c31-479c-b354-aa805c4cefbc"
}
Upload a document
Uploads an image for a verification process. It accepts images in PNG and JPG format. Maximum file size is 10 megabytes, and the minimum is 20 kilobytes.
Authorizations:
header Parameters
Accept-Version required | string API Version |
Request Body schema: multipart/form-data
context required | string Default: "front" Enum: "front" "back" "live" The |
body required | string <binary> The image file to be uploaded |
Responses
Response samples
- 200
- 400
- 500
{- "imageId": "string"
}
Get the data of a transaction
Retrieves the detailed information of a verification process specified by a transaction identifier.
Authorizations:
path Parameters
transactionId required | string |
header Parameters
Accept-Version required | string API Version |
Responses
Response samples
- 200
- 400
- 404
- 500
{- "transactionId": "28087e85-9c6c-4ce9-83e2-1fb3d66b8cde",
- "dataVendorSessionId": "8005efed-e683-40ab-a803-56eba164b767",
- "timeOfTransaction": "2023-01-01T16:00:00.000Z",
- "status": "REVIEW",
- "errors": [
- "string"
], - "indicators": [
- {
- "type": "DOCUMENT",
- "result": "REVIEW",
- "description": "Document requires a review.",
- "score": "90",
- "subindicators": [
- {
- "type": "OCR",
- "result": "REVIEW",
- "description": "Poor image quality."
}
]
}
], - "person": {
- "fullName": "Sherlock Holmes",
- "firstName": "Sherlock",
- "middleName": "Scott",
- "lastName": "Holmes",
- "dateOfBirth": "1859-05-22",
- "placeOfBirth": "London",
- "nationality": "England",
- "gender": "F",
- "location": {
- "fullAddress": "221b Baker St, London, England, NW16XE",
- "addressLine1": "221b Baker St",
- "addressLine2": "London, State, NW16XE",
- "city": "London",
- "stateProvince": "State",
- "country": "England",
- "zipCode": "NW16XE"
}, - "alternateFirstName": "小明",
- "alternateMiddleName": "大",
- "alternateLastName": "王",
- "alternateFullName": "王大小明",
- "alternateDateOfBirth": "πρώτος Ιανουαρίου",
- "alternateLocation": {
- "fullAddress": "1234バンクーバー通り, バンクーバー, ブリティッシュコロンビア, カナダ, NW16XE",
- "addressLine1": "1234バンクーバー通り",
- "addressLine2": "バンクーバー",
- "city": "バンクーバー",
- "stateProvince": "ブリティッシュコロンビア",
- "country": "カナダ",
- "zipCode": "מיקוד"
}, - "standardizedLocation": {
- "fullAddress": "221b Baker St, London, England, NW16XE",
- "addressLine1": "221b Baker St",
- "addressLine2": "London, State, NW16XE",
- "city": "London",
- "stateProvince": "State",
- "country": "England",
- "zipCode": "NW16XE"
}, - "firstLastName": "Silva",
- "secondLastname": "Pereira",
- "alternateFirstLastname": "司",
- "alternateSecondLastname": "徒",
- "birthLastName": "Holmes",
- "spouseLastName": "Smith"
}, - "document": {
- "documentType": "PASSPORT",
- "documentName": "Australia - ePassport (2009) Travel Document",
- "dlCategory": "Class 5",
- "documentNumber": "EX504966",
- "documentNumber2": "A09354726",
- "documentNumber3": "C07321129",
- "documentNumber4": "D06364026",
- "documentCountry": "GB",
- "jurisdictionCode": "ENG",
- "issueDate": "2020-11-17T00:00:000Z",
- "expirationDate": "2030-11-17T00:00:000Z",
- "alternateDocumentNumber": "一百二十三萬四千五百六十七",
- "alternateDocumentNumber2": "一百二十三萬四千五百六十七",
- "alternateDocumentNumber3": "一百二十三萬四千五百六十七",
- "alternateDocumentNumber4": "一百二十三萬四千五百六十七",
- "alternateExpiryDate": "2050 年 1 月 1 日",
- "alternateIssueDate": "2000 年 1 月 1 日"
}, - "images": {
- "frontDocumentId": "0116879a-ff2d-4c58-96da-fb4f088452e7",
- "backDocumentId": "78b65b2a-72ee-4b81-a14b-e795cedbc818",
- "selfieId": "f12885ea-699f-4572-8630-cddc01e8a929",
- "accessToken": "string",
- "documentFrontUrl": "string",
- "documentBackUrl": "string",
- "selfieUrl": "string"
}
}
Get an image
Retrieves an image of the transaction by providing the transaction identifier, the image identifier and the access token obtained from the GET /transactions/{transactionId} endpoint.
Authorizations:
path Parameters
transactionId required | string |
imageId required | string |
Responses
Response samples
- 200
- 400
- 404
- 500
{- "image": "iVBORw0KGgo="
}