Ir al contenido principal
Clientes

Clientes

Actualizado hace más de 4 meses

OBTEN DATOS NECESARIOS DE TUS CLIENTES

En Mercately, todo tipo de contacto que vienen de conversaciones, compras o creador son conocidos como clientes.

Este endpoint te devolverá datos necesarios del cliente, además de poder actualizarlos.

Obtener todos tus clientes

Headers

Api-Key: Your API KEY

Response 200


Body

JSON

{
"results": 1,
"total_pages": 1,
"customers": [
{
"id": "1713huaxq1352",
"first_name": "Alfonso",
"last_name": "Montoya",
"email": "[email protected]",
"phone": "+593691191181",
"meli_customer_id": null,
"meli_nickname": null,
"id_type": "ruc",
"id_number": "192-64-1579",
"address": "Rambla Alfredo 72",
"city": "Quito",
"state": "Pichincha",
"zip_code": "170207",
"country_id": "EC",
"notes": null,
"whatsapp_opt_in": false,
"whatsapp_name": null,
"tags": [
{
"tag": "Test tag",
"web_id": "1713untwo79"
}
],
"custom_fields": [
{
"field_name": "rerum",
"field_content:": "Test Field"
}
]
}
]
}

Obtener los datos de un cliente

Response 200

Body

Json

{
"message": "Customer found successfully",
"customer": {
"id": "1714fbjpx1353",
"first_name": "Sonia",
"last_name": "Alemán",
"email": "[email protected]",
"phone": "+593666261555",
"meli_customer_id": null,
"meli_nickname": null,
"id_type": "ruc",
"id_number": "075-07-2555",
"address": "Partida Luis, 1 Esc. 669",
"city": "Quito",
"state": "Pichincha",
"zip_code": "170207",
"country_id": "EC",
"notes": null,
"whatsapp_opt_in": false,
"whatsapp_name": null,
"tags": [],
"custom_fields": []
}
}

Crea un cliente

Headers

Json

Api-key: your api key

BODY

Json

{
"customer": {
"first_name": "Juan",
"last_name": "Campos",
"email": "[email protected]",
"phone": "+12036534789",
"notes": "New notes",
"address": "Calle 5",
"city": "Fort Worth",
"state": "TX",
"zip_code": "76106",
"tags": [
{
"name": "Test tag",
"value": true
}
]
}
}

Response 200

Body

Json

{
"message": "Customer created successfully",
"customer": {
"id": "1715jeopi1354",
"first_name": "Juan",
"last_name": "Campos",
"email": "[email protected]",
"phone": "+12036534789",
"meli_customer_id": null,
"meli_nickname": null,
"id_type": null,
"id_number": null,
"address": "Calle 5",
"city": "Fort Worth",
"state": "TX",
"zip_code": "76106",
"country_id": null,
"notes": "New notes",
"whatsapp_opt_in": false,
"whatsapp_name": null,
"tags": [
{
"tag": "Test tag",
"web_id": "1715psgar80"
}
],
"custom_fields": []
}
}

Actualizar un cliente

Headers

Json

Api-key: your api key

BODY

Json

{
"customer": {
"first_name": "Juan",
"last_name": "Campos",
"email": "[email protected]",
"phone": "+12036534789",
"notes": "New notes",
"address": "Calle 5",
"city": "Fort Worth",
"state": "TX",
"zip_code": "76106"
}
}

Response 200


Body


Json

{
"message": "Customer updated successfully"
}

Actualizar un cliente y asignar a un agente


Para actualizar un cliente y asignar a un agente, debes incluir el parámetro `agent_id` en el body. Ejemplo:

Json

{
"customer": {
"first_name": "Juan",
"last_name": "Campos",
"email": "[email protected]",
"phone": "+12036534789",
"notes": "New notes",
"address": "Calle 5",
"city": "Fort Worth",
"state": "TX",
"zip_code": "76106",
"agent_id": 954
}
}

¿Ha quedado contestada tu pregunta?