SWITCH ON

DEVELOPER'S HUB

Upload proofs

By using {documents} and {faces} endpoints you can upload proof files to be used during check process.

Upload Identity Document Proofs

{documents} API is used to upload a document proof. An Identity document can be classified as a proof of address in case the document type contains address information (otherwise, an additional proof of address document should be uploaded if address validation is required).

Document Upload Example

Auth-Service API

POST /protocol/openid-connect/token
 

curl --location --request POST 'https://{{baseUrl}}/auth-service/1.1/protocol/openid-connect/token' \
--header 'x-api-key: {{apikey}}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=password' \
--data-urlencode 'username={{username}}' \
--data-urlencode 'password={{password}}'

200 (OK)

{
    "access_token": "{{access_token}}",
    "expires_in": 300,
    "refresh_expires_in": 1800,
    "refresh_token": "{{refresh_token}}",
    "token_type": "Bearer",
    "not-before-policy": 0,
    "session_state": "{{session_state}}",
    "scope": "profile email"
}

KYC API

POST /kyc/documents

curl --location --request POST '{{baseUrl}}/kyc/1.0/documents' \
--header 'x-api-key: {{apikey}}' \
--header 'X-User-Bearer: Bearer {{access_token}}' \
--header 'Content-Type: multipart/form-data' \
--form 'file=@"/path/document_file.png"' \
--form 'documentType="NATIONALID"' \
--form 'side="FRONT"' \
--form 'issuingCountry="AR"' \
--form 'entityReference="361"' \
--form 'isProofOfAddress="FALSE"' \
--form 'fileName="document_file.png"' \
--form 'fileMimeType="image/png"'

201 - Created

{
    "documentId": 181,
    "entityId": "361",
    "fileName": "document_file.png",
    "fileMimeType": "image/png",
    "fileSize": 148676,
    "documentType": "NATIONALID",
    "side": "FRONT",
    "isProofOfAddress": false,
    "issuingCountry": "AR",
    "creationDate": "2022-06-14T12:13:07.375Z",
    "metadata": []
}

Upload an Address Proof

As described above, the same endpoint can be used to upload a particular address proof (like Utility Bills, Bank Statements, etc.).

Address proof Upload Example

Auth-Service API

POST /protocol/openid-connect/token
 
curl --location --request POST 'https://{{baseUrl}}/auth-service/1.1/protocol/openid-connect/token' \
--header 'x-api-key: {{apikey}}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=password' \
--data-urlencode 'username={{username}}' \
--data-urlencode 'password={{password}}'

200 (OK)

{
    "access_token": "{{access_token}}",
    "expires_in": 300,
    "refresh_expires_in": 1800,
    "refresh_token": "{{refresh_token}}",
    "token_type": "Bearer",
    "not-before-policy": 0,
    "session_state": "{{session_state}}",
    "scope": "profile email"
}

KYC API

POST /kyc/documents
 
curl --location --request POST '{{baseUrl}}/kyc/1.0/documents' \
--header 'x-api-key: {{apikey}}' \
--header 'X-User-Bearer: Bearer {{access_token}}' \
--header 'Content-Type: multipart/form-data' \
--form 'file=@"/path/bill_file.png"' \
--form 'documentType="UTILITY_BILL"' \
--form 'side="FRONT"' \
--form 'issuingCountry="AR"' \
--form 'entityReference="361"' \
--form 'isProofOfAddress="TRUE"' \
--form 'fileName="bill_file.png"' \
--form 'fileMimeType="image/png"'

201 - Created

{
    "documentId": 182,
    "entityId": "361",
    "fileName": "bill_file.png",
    "fileMimeType": "image/png",
    "fileSize": 102367,
    "documentType": "UTILITY_BILL",
    "side": "FRONT",
    "isProofOfAddress": true,
    "issuingCountry": "AR",
    "creationDate": "2022-06-14T12:13:20.150Z",
    "metadata": []
}

Upload a Selfie Proof

{faces} can be used to store a Selfie captured from the channel, and use it as part of the document verification process. If included in the check process, face matching between the photo and the document will be verified.

Selfie proof Upload Example

Auth-Service API

POST /protocol/openid-connect/token
 

curl --location --request POST 'https://{{baseUrl}}/auth-service/1.1/protocol/openid-connect/token' \
--header 'x-api-key: {{apikey}}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=password' \
--data-urlencode 'username={{username}}' \
--data-urlencode 'password={{password}}'

200 (OK)

{
    "access_token": "{{access_token}}",
    "expires_in": 300,
    "refresh_expires_in": 1800,
    "refresh_token": "{{refresh_token}}",
    "token_type": "Bearer",
    "not-before-policy": 0,
    "session_state": "{{session_state}}",
    "scope": "profile email"
}

KYC API

POST /kyc/faces
 
curl --location --request POST '{{baseUrl}}/kyc/1.1/faces'  
--header 'x-api-key: {{apikey}}'  
--header 'X-User-Bearer: Bearer {{access_token}}'  
--header 'Content-Type: multipart/form-data'  
--form 'entityReference="361"'  
--form 'faceProofType="PHOTO"'  
--form 'fileName="selfie.png"'  
--form 'fileMimeType="image/png"'  
--form 'file=@"/path/selfie.png"'

201 - Created

{
    "faceId": 182,
    "entityId": "361",
    "faceProofType": "PHOTO",
    "fileName": "test.png",
    "fileMimeType": "image/png",
    "fileSize": 4180432,
    "creationDate": "2022-08-30T12:34:48.024Z",
    "metadata": []
}