Skip to main content

Task Multimedia & PDFs

Retrieve the evidence attached to a task — photos, signatures, sketches, audio, and the PDF of a completed field form. Three read-only operations:

  1. List attachment metadata for a task (name, type, size, date, notes, storage provider) — no heavy content.
  2. Download a single file by media_id, either as a signed link (default) or as base64 (on demand).
  3. Generate a form's PDF as base64, on demand.
Prerequisites

All endpoints require a valid JWT token, API key, and tenant header. See Authentication.

Task scope

A credential only reaches the tasks its technical user would see in the web app. The same per-task visibility rules apply here (mobile/vehicle, origin isolation, and group visibility). If a task exists but is outside that scope, you get 403 FORBIDDEN — not a 404.


List Attachments

Retrieve the metadata of a task's direct attachments. The content itself is never included — use the download endpoint to fetch a file.

GET/apidev/v1/tasks/{id}/attachments
PermissionAPICLI_TASKS_READ
Rate Limit30 req/min (sliding window)
CacheNone

Path Parameters

ParameterTypeRequiredDescription
idstringYesTask identifier. Accepts the internal task ID, the service number, or the external ID (see Multi-identifier resolution).

Query Parameters

ParameterTypeRequiredDescription
typestringNoFilter by attachment class: signature, image, sketch, audio, qr, barcode, or other. Omit for no filter.
form_idstringNoForm identifier (opaque BigInt). Reserved for form attachments. Max length 40. See the note below.
Form attachments

The default listing returns only the task's direct attachments, so form_id and form_name are always null here. Filtering by form_id targets attachments that belong to a form — a path that is not yet implemented, so this filter currently returns an empty list.

Response Fields

FieldTypeDescription
seridstringResolved task ID (BigInt as string)
service_numberstring | nullService number (BigInt as string)
assistance_numberstring | nullAssistance number (BigInt as string)
attachmentsarrayAttachment metadata — without file content
attachments[].media_idstringFile handle for the download endpoint
attachments[].namestring | nullDisplay name of the file
attachments[].typestringsignature, image, sketch, audio, qr, barcode, or other
attachments[].raw_typestring | nullOnly present when type is other — the original capture code
attachments[].mime_typestring | nullInferred from the file extension; null if not recognized
attachments[].sizenumber | nullFile size in bytes
attachments[].datestring | nullCapture timestamp (no timezone)
attachments[].notesstring | nullNotes attached to the file
attachments[].form_idstring | nullForm ID — always null in the direct listing
attachments[].form_namestring | nullForm name — always null in the direct listing
attachments[].providerstring | nullStorage provider label (e.g., azure, s3)
meta.countnumberNumber of attachments returned
No storage internals

The listing never exposes the file's storage path, container, provider reference, or any signed URL. Fetch the content through the download endpoint.

Code Example

curl -s "https://$TENANT/apidev/v1/tasks/103878/attachments?type=image" \
-H "Authorization: Bearer $TOKEN" \
-H "X-API-Key: $APIKEY" \
-H "tenant: $TENANT"

Example Response

{
"success": true,
"data": {
"serid": "1284773829100",
"service_number": "103878",
"assistance_number": "5567",
"attachments": [
{
"media_id": "9981273645",
"name": "foto_siniestro_1.jpg",
"type": "image",
"mime_type": "image/jpeg",
"size": 482113,
"date": "2026-06-22T14:31:07",
"notes": "Frente del vehículo",
"form_id": null,
"form_name": null,
"provider": "azure"
},
{
"media_id": "9981273988",
"name": "conformidad_firma.png",
"type": "signature",
"mime_type": "image/png",
"size": 18422,
"date": "2026-06-22T15:02:44",
"notes": null,
"form_id": null,
"form_name": null,
"provider": "s3"
}
]
},
"meta": { "count": 2 }
}

Download Attachment

Fetch a single file by media_id. By default you get a short-lived signed URL (mode=link); pass mode=base64 to receive the full content inline.

GET/apidev/v1/tasks/{id}/attachments/{media_id}
PermissionAPICLI_TASKS_READ
Rate Limit30 req/min (sliding window)
CacheNone

Path Parameters

ParameterTypeRequiredDescription
idstringYesTask identifier (task ID, service number, or external ID)
media_idstringYesAttachment identifier from the List Attachments response

Query Parameters

ParameterTypeRequiredDefaultDescription
modestringNolinklink returns a signed, expiring URL. base64 returns the full file content.

Response Fields

FieldTypePresent inDescription
seridstringbothResolved task ID
service_numberstring | nullbothService number
assistance_numberstring | nullbothAssistance number
media_idstringbothEcho of the requested attachment ID
namestring | nullbothFile name
typestringbothAttachment class (see List Attachments)
mime_typestring | nullbothMIME type. With base64, the storage provider's reported type is preferred over the extension guess.
sizenumber | nullbothFile size in bytes
modestringbothEcho of the mode — link or base64
download_urlstringlink onlyShort-lived signed URL
expires_atstring | nulllink onlyWhen the signed URL stops working (no timezone)
file_base64stringbase64 onlyFull file content
Signed links expire

A link URL is ephemeral. Download the content before expires_at. For bulk archiving, call this endpoint again to refresh the URL. An expired link is never returned — if the link can't be refreshed you get 409 ATTACHMENT_UNAVAILABLE instead of a dead URL.

Prefer link for bulk

base64 loads the entire file into memory. Use it for small files or one-off fetches; for large files or bulk downloads, prefer mode=link.

Code Example

# Default — signed link
curl -s "https://$TENANT/apidev/v1/tasks/103878/attachments/9981273645" \
-H "Authorization: Bearer $TOKEN" \
-H "X-API-Key: $APIKEY" \
-H "tenant: $TENANT"

# Base64 content, on demand
curl -s "https://$TENANT/apidev/v1/tasks/103878/attachments/9981273988?mode=base64" \
-H "Authorization: Bearer $TOKEN" \
-H "X-API-Key: $APIKEY" \
-H "tenant: $TENANT"
{
"success": true,
"data": {
"serid": "1284773829100",
"service_number": "103878",
"assistance_number": "5567",
"media_id": "9981273645",
"name": "foto_siniestro_1.jpg",
"type": "image",
"mime_type": "image/jpeg",
"size": 482113,
"download_url": "https://geotareasstore.blob.core.windows.net/cia-42/9981273645.jpg?sv=2024-08&se=2026-06-25T16%3A10%3A00Z&sig=Rb9...",
"expires_at": "2026-06-25T16:10:00",
"mode": "link"
}
}

Example Response — mode=base64

{
"success": true,
"data": {
"serid": "1284773829100",
"service_number": "103878",
"assistance_number": "5567",
"media_id": "9981273988",
"name": "conformidad_firma.png",
"type": "signature",
"mime_type": "image/png",
"size": 18422,
"file_base64": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==",
"mode": "base64"
}
}

Form PDF

Generate the PDF of a completed form on the task. The PDF is produced on demand and returned as base64 — it is not stored.

GET/apidev/v1/tasks/{id}/forms/{form_id}/pdf
PermissionAPICLI_TASKS_READ
Rate Limit30 req/min (sliding window)
CacheNone

Path Parameters

ParameterTypeRequiredDescription
idstringYesTask identifier (task ID, service number, or external ID)
form_idstringYesIdentifier of the completed form (opaque BigInt)

Query Parameters

ParameterTypeRequiredDefaultDescription
modestringNobase64Delivery mode. Only base64 is supported for now.

Response Fields

FieldTypeDescription
seridstringResolved task ID
service_numberstring | nullService number
assistance_numberstring | nullAssistance number
form_idstringEcho of the requested form ID
form_namestring | nullHuman-readable form name
filenamestringSuggested PDF filename
mime_typestringAlways application/pdf
file_base64stringThe generated PDF content
modestringAlways base64

Code Example

curl -s "https://$TENANT/apidev/v1/tasks/103878/forms/77120033/pdf" \
-H "Authorization: Bearer $TOKEN" \
-H "X-API-Key: $APIKEY" \
-H "tenant: $TENANT"

Example Response

{
"success": true,
"data": {
"serid": "1284773829100",
"service_number": "103878",
"assistance_number": "5567",
"form_id": "77120033",
"form_name": "Acta de conformidad",
"filename": "acta_conformidad_103878.pdf",
"mime_type": "application/pdf",
"file_base64": "JVBERi0xLjQKJeLjz9MKMyAwIG9iago8PC9UeXBlL1BhZ2UvUGFyZW50...",
"mode": "base64"
}
}

Multi-identifier resolution

The {id} path parameter accepts any of three identifiers, tried in this order:

  1. Task ID (serid)
  2. Service number (service_number)
  3. External ID (external_id)

The same value is tried against each candidate within your tenant until one matches a task. Active and historic tasks are both searched, so a finished task still resolves. If none of the three matches, you get 404 TASK_NOT_FOUND.

This means you can hit the same endpoint with whichever identifier you have on hand — the internal task ID, the service number printed on a ticket, or the external ID from your own system.


Errors

CodeHTTPApplies toDescription
UNAUTHORIZED401AllMissing, invalid, or expired tenant / Authorization / X-API-Key
FORBIDDEN403AllThe credential lacks APICLI_TASKS_READ, or the task is outside the technical user's scope
TASK_NOT_FOUND404AllNo task matches the identifier sent in {id}
ATTACHMENT_NOT_FOUND404DownloadThe task has no attachment with that media_id
FORM_NOT_FOUND404Form PDFThe task has no form with that form_id
INVALID_MODE400Download, Form PDFmode is not one of the supported values (link/base64 for download, base64 for PDF)
ATTACHMENT_UNAVAILABLE409DownloadThe file exists in the database but couldn't be resolved in storage (expired link that couldn't refresh, or the file was moved/removed)
PDF_GENERATION_FAILED422Form PDFThe form exists but the PDF couldn't be generated
RATE_LIMITED429AllExceeded 30 req/min
INTERNAL_ERROR500AllUnexpected server error

Example Error — task outside scope

{
"success": false,
"error": {
"code": "FORBIDDEN",
"message": "Esta credencial no tiene acceso a los archivos de esta tarea.",
"hint": "Usá una credencial con acceso a esa tarea, o pedí el permiso de lectura de tareas."
}
}

Example Error — file not in storage

{
"success": false,
"error": {
"code": "ATTACHMENT_UNAVAILABLE",
"message": "El archivo existe pero no se pudo recuperar del almacenamiento en este momento.",
"hint": "Reintentá más tarde; si persiste, el archivo puede haberse eliminado del almacenamiento."
}
}