Subscriptions

Listar Subscriptions

Changed on

Devuelve una lista paginada de Subscriptions de la Account autenticada.

Se usa para recorrer o buscar Subscriptions; para obtener una Subscription puntual por su identificador prefiere el endpoint de detalle. Los filtros (rango de fechas de creación, si es recurrente) son opcionales y se combinan con AND. 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/subscriptions

Request

  • Base URL
    https://api.trytoku.com
  • URL
    https://api.trytoku.com/subscriptions
  • 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.

start_datestring date-time

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

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

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

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

Si es true, devuelve solo las Subscriptions recurrentes; si es false, solo las no recurrentes.

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 Subscriptions que cumplen los filtros indicados.

next_cursorstring

Cursor de la página siguiente. Reenvíalo como next_cursor en la próxima llamada para continuar; es null cuando no hay más páginas.

Example response

{
  "items": [
    {
      "customer": "cus_ejC08yLqOWoFhVx4Fx42E3IR9X50tNx2",
      "id": "sub_Y_EgOXMloD5-IJn6d9S2IxkNvp9p0iiP",
      "id_account": "acc_gzD0XoUTFxbUFcItpWOCqN686noSd9HQ"
    }
  ],
  "next_cursor": "eyJpZCI6IDEyMzQ1fQ=="
}

Changes

    • breaking

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

    • 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 tag Subscriptions added

    • info

      added the new optional header request parameter x-account-key

    • info

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

    • 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