Buscar Invoice por identificadores externos
Changed onBusca una única Invoice a partir de identificadores externos.
Se usa cuando no se tiene el identificador público de Toku pero sí el identificador externo con el que se cargó la Invoice. Debes enviar al menos un parámetro de búsqueda; la combinación debe identificar a una sola Invoice dentro de la Account autenticada.
Límite de tasa: 20 solicitudes por segundo. Al superarlo, la API responde 429. Ver Límites de tasa.
Request
- Base URLhttps://api.trytoku.com
- URLhttps://api.trytoku.com/invoices/lookup
- AuthAPI key in header x-api-key
Query parameters
Identificador externo de la Invoice definido por la organización.
Headers
Llave de API de una Account, para operar sobre esa Account en lugar de la principal.
Versión del API para esta petición, como cualquier fecha YYYY-MM-DD. Fija el contrato de la respuesta; si se omite, se deriva de la fecha de creación de la organización.
Response
Invoice que coincide con los identificadores indicados.
Example response
{
"account": "acc_gzD0XoUTFxbUFcItpWOCqN686noSd9HQ",
"amount": 19990,
"customer": "cus_ejC08yLqOWoFhVx4Fx42E3IR9X50tNx2",
"due_date": "2025-03-10",
"expiration_date": "2025-03-10T03:00:00Z",
"id": "in_9K0bTq3xR7yA2sVpLmZ4wE1nHdJf6UcQ",
"invoice_external_id": "F-2025-000123",
"link_payment": "https://portal.pagos.com/tu-empresa",
"max_collection_attempts": 3,
"metadata": {
"sucursal": "Providencia"
},
"product_id": "plan-oro-marzo-2025",
"receipt_type": "bill",
"remaining_collection_attempts": 3,
"source": "integration_etl",
"subscription": "sub_Y_EgOXMloD5-IJn6d9S2IxkNvp9p0iiP"
}Changes
- breaking
for the
headerrequest parameterx-account-key, default valuewas added - breaking
removed the required property
from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - info
api operation id
get_invoices-lookupremoved and replaced withlookup_invoice - info
api tag
Invoicesadded - info
added the new optional
headerrequest parameterx-api-version - info
the
queryrequest parameterinvoice_external_idbecame optional - info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
the response property
/became required for the status - info
the response property
/became required for the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status
- breaking