GET
https://api.veriko.mx/v1/validations/{id}/imageGet the receipt image
How-to guide →Returns the receipt kept for an OCR validation, with private caching:
- Image: delivered with
inlinedisposition. - PDF: always delivered as an attachment (
attachment) and withContent-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.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id* | path | string (uuid) | required | Validation UUID. |
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.
| Status | Class | Description | Body |
|---|---|---|---|
| 200 | 2xx | Receipt. Content-Type is image/png, image/jpeg, image/webp, or application/pdf; other content is returned as application/octet-stream. | Body without schema |
| 401 | 4xx | Authentication is required or the provided credentials are invalid. | ErrorResponse |
| 403 | 4xx | Insufficient permissions. | ErrorResponse |
| 404 | 4xx | Validation not found (not_found) or no image is available (image_not_available). | ErrorResponse |
| 410 | 4xx | The 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 |
| 422 | 4xx | Invalid UUID in path (invalid_uuid). | ErrorResponse |
| Header | Type | Description |
|---|---|---|
Cache-Control | string | Privately cacheable for 1 hour. |
Content-Disposition | string | inline for an image and attachment for a PDF, with a filename derived from the validation identifier and the format extension. |
Content-Security-Policy | string | Only with a PDF. sandbox blocks scripts and treats the document as a different origin if a viewer opens it. |
Cross-Origin-Resource-Policy | string | Restricts use of the resource to the same origin. |
X-Content-Type-Options | string | Prevents the browser from inferring a different content type. |
| Status | Code | Example |
|---|---|---|
| 401 | unauthorized | Invalid or missing authentication credentials. Envelope
|
| 403 | permission_denied | You do not have permission to access this resource. Envelope
|