Invoices

Listar Invoices

Changed on

Devuelve 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.

get/invoices

Request

  • Base URL
    https://api.trytoku.com
  • URL
    https://api.trytoku.com/invoices
  • Auth
    API key in header x-api-key

Query parameters

page_sizeinteger

Cantidad máxima de elementos por página (entre 1 y 100).

Example:50
next_cursorstring

Cursor de la página siguiente. Envía el next_cursor devuelto en la respuesta anterior para continuar; omítelo en la primera llamada.

account_idstring

Filtra las Invoices por el identificador público de la Account (acc_...).

Example:acc_gzD0XoUTFxbUFcItpWOCqN686noSd9HQ
customer_idstring

Filtra las Invoices por el identificador público del Customer (cus_...).

Example:cus_ejC08yLqOWoFhVx4Fx42E3IR9X50tNx2
subscription_idstring

Filtra las Invoices por el identificador público de la Subscription (sub_...).

Example:sub_Y_EgOXMloD5-IJn6d9S2IxkNvp9p0iiP
general_statusExternalInvoiceStatus[]

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.

in_progressboolean

Si es true, devuelve solo las Invoices con un cobro en curso (un pago aún no confirmado ni rechazado).

start_datestring date-time

Devuelve solo las Invoices creadas desde esta fecha y hora (inclusive), en formato ISO 8601.

Example:2025-01-01T00:00:00Z
end_datestring date-time

Devuelve solo las Invoices creadas hasta esta fecha y hora (inclusive), en formato ISO 8601.

Example:2025-03-31T23:59:59Z
due_datestring

Filtra por fecha de vencimiento exacta, en formato YYYY-MM-DD.

Example:2025-03-10
due_date_fromstring

Devuelve solo las Invoices que vencen desde esta fecha (inclusive), en formato YYYY-MM-DD.

Example:2025-03-01

Headers

x-account-keystring

Llave de API de una Account, para operar sobre esa Account en lugar de la principal.

x-api-versionstring date

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.

Example:2026-10-08

Response

Página de Invoices que cumplen los filtros indicados.

next_cursorstring required

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 header request parameter x-account-key, default value was added

    • breaking

      for the query request parameter page_size, default value was changed from 50 to 50

    • breaking

      for the query request parameter page_size, the type changed from number to integer

    • warning

      for the query request parameter page_size, the exclusiveMinimum was set to 0.00

    • warning

      for the query request parameter page_size, the max was set to 100.00

    • info

      api operation id get_invoices removed and replaced with list_invoices

    • info

      api tag Invoices added

    • info

      added the new optional header request parameter x-api-version

    • info

      added the enum value expired to the property items/ of the query request parameter general_status

    • info

      added the enum value paid to the property items/ of the query request parameter general_status

    • info

      added the enum value partially_paid to the property items/ of the query request parameter general_status

    • info

      added the enum value unpaid to the property items/ of the query request parameter general_status

    • info

      added the enum value void to the property items/ of the query request parameter general_status

    • info

      for the query request parameter due_date, the format was generalized from date-time to no format

    • info

      for the query request parameter due_date_from, the format was generalized from date-time to no format

    • info

      added the media type application/json for 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