Ticket Evidence

Tickets support file evidence (photos, PDFs) tied to the related shipment. All endpoints require a Bearer token (see Tickets Overview).

Get ticket evidence

GET /company/evidences/{ticket_id}

Lists the file evidence attached to a ticket (resolved through the ticket's related shipment).

Path parameters

ParamTypeRequiredDescription
ticket_idinteger (≥ 1)yesThe ticket ID.

Query parameters

ParamTypeRequiredDescription
document_typeinteger (≥ 1)optionalFilter by document type.
typestringoptionalFilter by evidence category.
curl --request GET \
  --url 'https://queries.envia.com/company/evidences/987654' \
  --header 'Authorization: Bearer YOUR_API_TOKEN'

Response 200

{ "data": [ { "id": 1, "file": "https://.../photo1.jpg", "document_type": 16 } ] }

Attach evidence

PUT /company/attach/evidences/{ticket_id}

Attaches one or more evidence file URLs to a ticket. Upload the raw files first via POST /company/upload/evidences (multipart) to obtain the URLs, then attach them here.

Path parameters

ParamTypeRequiredDescription
ticket_idinteger (≥ 1)yesThe ticket ID.

Body

PropTypeRequiredDescription
evidencesarray<string>yesNon-empty list of evidence file URLs.
document_typeinteger (≥ 1)optionalDocument type to tag the evidence with.
curl --request PUT \
  --url https://queries.envia.com/company/attach/evidences/987654 \
  --header 'Authorization: Bearer YOUR_API_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "document_type": 16,
    "evidences": ["https://.../photo1.jpg", "https://.../photo2.jpg"]
  }'

Response 200

{ "data": true }