Listar Invoices
Changed onDevuelve una lista paginada de Invoices de la organización.
Se usa para recorrer o conciliar Invoices; para obtener una Invoice puntual por su identificador prefiere el endpoint de detalle. Los filtros (Account, Customer, Subscription, estado, rango de fechas) son opcionales y se combinan con AND. Si la autenticación selecciona una Account, los resultados se acotan a ella. La paginación es por cursor: reenvía el next_cursor de la respuesta para avanzar de página.
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
- AuthAPI key in header x-api-key
Query parameters
Cantidad máxima de elementos por página (entre 1 y 100).
Cursor de la página siguiente. Envía el next_cursor devuelto en la respuesta anterior para continuar; omítelo en la primera llamada.
Filtra las Invoices por el identificador público de la Account (acc_...).
Filtra las Invoices por el identificador público del Customer (cus_...).
Filtra las Invoices por el identificador público de la Subscription (sub_...).
Filtra por estado general de la Invoice: paid está pagada por completo, partially_paid tiene abonos que no cubren el total, unpaid no registra pagos, void fue anulada y expired venció sin pagarse. Un cobro en curso no cambia el estado general. Puede repetirse para incluir varios estados.
Si es true, devuelve solo las Invoices con un cobro en curso (un pago aún no confirmado ni rechazado).
Devuelve solo las Invoices creadas desde esta fecha y hora (inclusive), en formato ISO 8601.
Devuelve solo las Invoices creadas hasta esta fecha y hora (inclusive), en formato ISO 8601.
Filtra por fecha de vencimiento exacta, en formato YYYY-MM-DD.
Devuelve solo las Invoices que vencen desde esta fecha (inclusive), en formato YYYY-MM-DD.
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
Página de Invoices que cumplen los filtros indicados.
Example response
{
"items": [
{
"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
for the
queryrequest parameterpage_size, default value was changed from50to50 - breaking
for the
queryrequest parameterpage_size, the type changed fromnumbertointeger - warning
for the
queryrequest parameterpage_size, the exclusiveMinimum was set to0.00 - warning
for the
queryrequest parameterpage_size, the max was set to100.00 - info
api operation id
get_invoicesremoved and replaced withlist_invoices - info
api tag
Invoicesadded - info
added the new optional
headerrequest parameterx-api-version - info
added the enum value
expiredto the propertyitems/of thequeryrequest parametergeneral_status - info
added the enum value
paidto the propertyitems/of thequeryrequest parametergeneral_status - info
added the enum value
partially_paidto the propertyitems/of thequeryrequest parametergeneral_status - info
added the enum value
unpaidto the propertyitems/of thequeryrequest parametergeneral_status - info
added the enum value
voidto the propertyitems/of thequeryrequest parametergeneral_status - info
for the
queryrequest parameterdue_date, the format was generalized fromdate-timeto no format - info
for the
queryrequest parameterdue_date_from, the format was generalized fromdate-timeto no format - info
added the media type
application/jsonfor the response with the status - 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
added the non-success response with the status
- breaking