GEThttps://api.veriko.mx/v1/validations/{id}/image

Get the receipt image

Audience
public
Auth
API key
Permission
validations:read
How-to guide →

Returns the receipt kept for an OCR validation, with private caching:

  • Image: delivered with inline disposition.
  • PDF: always delivered as an attachment (attachment) and with Content-Security-Policy: sandbox, so a browser does not open it within the same origin.

If the validation has no image available, it responds with an HTTP status 404 (with image_not_available in the body).

If the validation was created with retain_image=false, it responds with an HTTP status 410 (with image_not_retained in the body); if it was purged, with an HTTP status 410 (with validation_purged in the body). A 410 is not resolved by retrying: the file does not exist.

Parameters
ParameterInTypeRequiredDescription
id*pathstring (uuid)required

Validation UUID.

Request
curl -X GET 'https://api.veriko.mx/v1/validations/{id}/image' \
  -H 'Authorization: Bearer veriko_••••'

Python example — coming soon.

JavaScript example — coming soon.

PHP example — coming soon.

Response status codesGET /v1/validations/{id}/image
StatusClassDescriptionBody
2002xxReceipt. Content-Type is image/png, image/jpeg, image/webp, or application/pdf; other content is returned as application/octet-stream.Body without schema
4014xxAuthentication is required or the provided credentials are invalid.ErrorResponse
4034xxInsufficient permissions.ErrorResponse
4044xxValidation not found (not_found) or no image is available (image_not_available).ErrorResponse
4104xxThe image does not exist by the client's decision: the validation was created with retain_image=false (image_not_retained) or was purged (validation_purged).ErrorResponse
4224xxInvalid UUID in path (invalid_uuid).ErrorResponse
Response headers200
HeaderTypeDescription
Cache-ControlstringPrivately cacheable for 1 hour.
Content-Dispositionstringinline for an image and attachment for a PDF, with a filename derived from the validation identifier and the format extension.
Content-Security-PolicystringOnly with a PDF. sandbox blocks scripts and treats the document as a different origin if a viewer opens it.
Cross-Origin-Resource-PolicystringRestricts use of the resource to the same origin.
X-Content-Type-OptionsstringPrevents the browser from inferring a different content type.
Errors from GET /v1/validations/{id}/image
StatusCodeExample
401unauthorized

Invalid or missing authentication credentials.

Envelope
meta.request_id
c4d5e6f7a8b99b8a7f6e5d4c
403permission_denied

You do not have permission to access this resource.

Envelope
meta.request_id
d5e6f7a8b9c00c9b8a7f6e5d