Ticket Catalogs

Reference data used to build ticket UIs. All endpoints require a Bearer token (see Tickets Overview).

Get ticket types

GET /tickets/types

Returns the ticket type catalog, including each type's rules (the JSON that drives which reference and inputs the type requires). Optionally filter to a single type by ID.

Query parameters

ParamTypeRequiredDescription
idinteger (≥ 1)optionalReturn only this type.
curl --request GET \
  --url 'https://queries.envia.com/tickets/types' \
  --header 'Authorization: Bearer YOUR_API_TOKEN'

Response 200

{
  "data": [
    {
      "id": 4,
      "name": "lost",
      "description": "Package lost in transit",
      "rules": { "reference": "guide", "inputs": [] },
      "type": "guide",
      "active": 1
    }
  ]
}

Get filter options

GET /tickets/filters-options

Returns the status and type options used to build filter dropdowns. Each option includes a value (ID) and a lang (i18n key you can translate client-side).

curl --request GET \
  --url 'https://queries.envia.com/tickets/filters-options' \
  --header 'Authorization: Bearer YOUR_API_TOKEN'

Response 200

{
  "statuses": [
    { "value": 1, "lang": "general.companyRequest.status.pending" },
    { "value": 2, "lang": "general.companyRequest.status.accepted" }
  ],
  "types": [
    { "value": 4, "lang": "general.companyRequest.lost" }
  ]
}

Get legal form

GET /tickets/legal-form/{type}/{country}

Returns the JSON structure of the legal information form required for credit-related tickets, by legal entity type and country.

Path parameters

ParamTypeRequiredDescription
typeinteger — 1 or 2yesLegal entity: 1 = physical, 2 = moral.
countrystring (country code)yesCountry code, e.g. MX, CO.
curl --request GET \
  --url 'https://queries.envia.com/tickets/legal-form/2/MX' \
  --header 'Authorization: Bearer YOUR_API_TOKEN'

Response 200

{ "data": { "json_structure": { "fields": [] } } }