Customers

Listar Customers

Changed on

Devuelve una lista paginada de Customers de la organización.

Se usa para recorrer o buscar Customers; para obtener un Customer puntual por su identificador prefiere el endpoint de detalle. Los filtros (mail, external_id, rfc, rango de fechas de creación) son opcionales y se combinan con AND. La paginación es por cursor: entrega page_size elementos y, si hay más, un next_cursor que debes reenviar en la siguiente llamada.

Límite de tasa: 20 solicitudes por segundo. Al superarlo, la API responde 429. Ver Límites de tasa.

get/customers

Request

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

mailstring

Filtra los Customers por correo electrónico.

Example:jon@snow.got
external_idstring

Filtra los Customers por su identificador externo definido por la organización.

Example:18579878K
rfcstring

Filtra los Customers por su RFC (México).

Example:EKU9003173C9
start_datestring date-time

Devuelve solo los Customers creados desde esta fecha y hora (inclusive), en formato ISO 8601.

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

Devuelve solo los Customers creados hasta esta fecha y hora (inclusive), en formato ISO 8601.

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

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 Customers 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": [
    {
      "agent_phone_number": "+56990220640",
      "default_agent": "arya@stark.com",
      "external_id": "18579878K",
      "fiscal_regime": "601",
      "government_id": "18579878K",
      "id": "cus_ejC08yLqOWoFhVx4Fx42E3IR9X50tNx2",
      "mail": "jon@snow.got",
      "metadata": {
        "car_brand": "Toyota",
        "car_model": "Yaris"
      },
      "name": "Jon Snow",
      "pac_mandate_id": "18547404k",
      "phone_number": "+56987654321",
      "rfc": "EKU9003173C9",
      "secondary_emails": [
        "shiryu@dragon.cdz",
        "seiya@pegasus.cdz"
      ],
      "tax_zip_code": "78187"
    }
  ],
  "next_cursor": "eyJpZCI6IDEyMzQ1fQ=="
}

Changes

    • breaking

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

    • breaking

      for the query request parameter rfc, default value was removed

    • 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 obtener-customer-1 removed and replaced with get_customers

    • info

      api tag Customers 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