Customers

Buscar Customer por identificadores externos

Changed on

Busca un único Customer a partir de identificadores externos.

Se usa cuando no se tiene el identificador público de Toku pero sí un dato con el que se dio de alta al Customer. Debes enviar al menos un parámetro de búsqueda (mail, external_id o rfc); la combinación debe identificar a un solo Customer. Devuelve el Customer encontrado o 404 si no existe.

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

get/customers/lookup

Request

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

Query parameters

mailstring

Correo electrónico del Customer por el cual buscar.

Example:jon@snow.got
external_idstring

Identificador externo del Customer definido por la organización.

Example:18579878K
rfcstring

RFC del Customer (México) por el cual buscar.

Example:EKU9003173C9

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

Successful Response

agent_phone_numberstring

Número de teléfono del agente por defecto.

default_agentstring

Correo del agente por defecto que contactará al cliente cuando se abra un ticket.

default_receipt_type'bill' | 'invoice' | 'no_receipt'

Documento tributario que se emite al cobrar: bill es una boleta, invoice una factura y no_receipt deja el cobro sin documento asociado.

external_idstring

Identificador externo del cliente definido por la organización. Por defecto, las organizaciones usan el government_id como identificador externo del cliente.

fiscal_regimestring

Régimen fiscal del cliente, requerido para generar el recibo CFDI (México).

government_idstring

Identificador tributario o personal del cliente según su país. Por ejemplo, el RUT de una persona en Chile: 18.579.787-K.

idstring required

Identificador público del cliente.

mailstring

Correo electrónico del cliente.

metadataobject

Campos adicionales definidos por cada organización para el cliente.

namestring

Nombre del cliente.

pac_mandate_idstring

Identificador del mandato PAC (Pago Automático de Cuentas) asociado al cliente.

phone_numberstring

Número de teléfono del cliente.

rfcstring

RFC del cliente (México); si está presente, la deuda generará el documento tributario correspondiente.

secondary_emailsstring[]

Lista de correos electrónicos secundarios del cliente.

send_mailboolean

Determina si se debe emitir el webhook 'invoice.no_payment_method' al crear el cliente.

silenced_untilstring date-time

Fecha y hora en que expira el silenciamiento del cliente. Si es null, el cliente no está silenciado.

tax_zip_codestring

Código postal tributario del cliente, requerido para generar el recibo CFDI (México).

Example response

{
  "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"
}

Changes

    • breaking

      the response property became optional for the status

    • breaking

      the response's property type changed from string to no type for status

    • 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_customers-lookup removed and replaced with lookup_customer

    • 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 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 to the response property allOf list for the response status

    • info

      the response property / became required for the status

    • info

      the response property / became required for the status

    • info

      the response property became required for the status

    • info

      the response's property default value bill was added for the status

    • info

      the response's property default value false was added 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