Buscar Customer por identificadores externos
Changed onBusca 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.
Request
- Base URLhttps://api.trytoku.com
- URLhttps://api.trytoku.com/customers/lookup
- AuthAPI key in header x-api-key
Query parameters
Correo electrónico del Customer por el cual buscar.
Identificador externo del Customer definido por la organización.
RFC del Customer (México) por el cual buscar.
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
Successful Response
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 fromstringto 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-lookupremoved and replaced withlookup_customer - info
api tag
Customersadded - info
added the new optional
headerrequest parameterx-account-key - info
added the new optional
headerrequest parameterx-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 propertyallOflist 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 valuebillwas added for the status - info
the
response's property default valuefalsewas 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
- breaking