Retrieve verification images
With the API endpoints described in this article, you can retrieve the identity document images and the selfie images that were captured for a given completed transaction that has passed verification.
Retrieving the verification images involves the following steps:
Get verification ID
Get the verification ID of a transaction based on the transaction ID. The verification ID is then used to obtain the image URLs.
For information about syntax, status codes, and for an example request, see Get transaction status and metadata.
In the response, the vhub-verification_id property in the verifications array with status="SUCCESS" is the required verification ID. Only images of this verification can be retrieved.
- {
- "id": "84f29725-7b57-4baa-a290-3be937f95ce6",
- ...
- "verifications": [
- {
- "id": "document_id_authentication",
- "revision_id": "3dc47509-a2c3-41ff-aa5b-2f1cfa95b321",
- "name": "doc_id",
- ...
- "status": "SUCCESS",
- "timestamp": 1657216749097,
- "vhub_workflow_id": "3e16826f-fb30-4cfb-bc7d-ac96545e0e93",
- "vhub_transaction_id": "4254041b-1228-44c0-8455-627553987636",
- "vhub_verification_id": "3e16826f-fb30-4cfb-bc7d-ac96545e0111",
- "vhub_transaction_status": "COMPLETED",
- ...
- }]
- }
Get URL of verification images
Get the URL of the verification images based on the transaction ID and the verification ID.
Syntax
GET /api/transactions/transaction_id/verifications/verification_id/verification-images
- transaction_id is the orchestrator transaction ID.
- verification_id is the vhub_verification_id that was obtained in the previous step (see Get verification ID).
Example response
The SFS URLs in verified_images will be used to download the verification images (see Download image binary data).
- {
- "transaction_id": "EdafBFdc-7cCB-D7b0-8591-c9e6a73Da1a8",
- "verification_id": "4fddd4cD-D547-914C-6EFd-f7f5dcc73D83",
- "verified_images": [
- {
- "image_submitted_document_front": "sfs://my_db/default/onespanidv/transaction/0fcde1ce-7649-
- 48f1-948c-000324280bar/session/0eb54e2b-67gc-4161-ba08-
- 630d425201b0/verifications/doc_id/driver-license-front/3.png"
- },
- {
- "image_submitted_document_back": "sfs://my_db/default/onespanidv/transaction/0fcde1ce-7649-
- 48f1-948c-000324280bar/session/0eb54e2b-67gc-4161-ba08-
- 630d425201b0/verifications/doc_id/driver-license-back/3.png"
- },
- {
- "image_submitted_selfie1": "sfs://my_db/default/onespanidv/transaction/0fcde1ce-7649-
- 48f1-948c-000324280bar/session/0eb54e2b-67gc-4161-ba08-
- 630d425201b0/verifications/doc_id/face_capture/1.png"
- },
- {
- "image_submitted_selfie2": "sfs://my_db/default/onespanidv/transaction/0fcde1ce-7649-
- 48f1-948c-000324280bar/session/0eb54e2b-67gc-4161-ba08-
- 630d425201b0/verifications/doc_id/face_capture/2.png"
- }
- ]
- }
Status codes
Download image binary data
Use the URL(s) that you obtained in the previous step (see Get URL of verification images) to download the verification images.
Syntax
GET /api/transactions/transaction_id/data?url=sfs_url
- transaction_id is the orchestrator transaction ID.
- sfs_url is the image URL.
Example request
-
/api/transactions/transaction_id/data?url=sfs://my_db/default/onespanidv/transaction/0fcde1ce-7649-48f1-948c-000324280bar/session/0eb54e2b-67gc-4161-ba08-630d425201b0/verifications/doc_id/driver-license-front/3.png