Gravv
/Docs
Search docs or ask a question⌘K
DocsAgent
ChangelogTry sandbox
KYC Download a KYC document

Download a KYC document

Returns one side of a stored document as a data URI. Get the `document_id` from the documents list. A two-sided card is two documents. Read the back image of the `BACK_SIDE` document with `side=back`.

GEThttps://api.gravv.xyz/v1/customers/{customer_id}/kyc/documents/{document_id}/downloadTry it
Api-Key

Returns one side of a stored document as a data URI. Get the document_id from the documents list. A two-sided card is two documents. Read the back image of the BACK_SIDE document with side=back.

Responses can be large, up to about 13 MB. A scoped API key needs the customer:update permission.

Path parameters

NameDescription
customer_id:stringRequired
UUID of the customer
document_id:stringRequired
UUID of the KYC document, from the documents list

Query parameters

NameDescription
side:stringRequired

Which image to return

Possible values: front, back

Response

Returns 200 OK. The document image

NameDescription
data:objectRequired
Show 6 child attributesobject
error:nullRequired

Errors

StatusMeaning
200The document image
400Invalid parameters
404Customer, document or image not found
500The image could not be read
503Storage is not configured. Retry later.
Was this page helpful? Yes No
Request
cURLJavaScriptPythonGoRubyPHPJavaC#cURL
curl --request GET \
--url 'https://api.gravv.xyz/v1/customers/42ad0adb-e134-4345-b4be-98e5021b0da8/kyc/documents/550e8400-e29b-41d4-a716-446655440000/download?side=front' \
--header 'Api-Key: <api-key>'
Responseapplication/json
200400404500503OK
{
"data": {
"content": "data:image/png;base64,iVBORw0KGgo...",
"content_type": "image/png",
"filename": "3f9a6b2c1d.png",
"side": "front",
"document_id": "550e8400-e29b-41d4-a716-446655440000",
"size_bytes": 45230
},
"error": null
}