La plataforma para desarrolladores de Mercately, está creada para ayudar a todos nuestros clientes y empoderarlos para que crezcan mejor. Nuestras API están diseñadas para permitir que los equipos de cualquier forma o tamaño construyan integraciones y aprovechar al máximo Mercately. Todas las API de Mercately se construyen usando convenciones REST y están diseñadas para tener una estructura de URL predecible. U tilizan muchas funciones HTTP estándar, incluidos métodos (POST, GET, PUT, DELETE) y códigos de respuesta de error.
En Mercately, los agentes son conocidos como las personas que están en tu equipo de trabajo. Los agentes pueden estar atados a varios otros objetos como conversaciones, notas, tratos del embudo u órdenes. Este endpoint te devolverá datos necesarios del agente a ser usados en otros endpoints.
{- "agents": [
- {
- "id": 9,
- "first_name": "Nicolas",
- "last_name": "Mena Garzon",
- "email": "nicolas@mercately.com",
- "active": true,
- "agent": false,
- "admin": true,
- "supervisor": true
}
]
}
En Mercately, todo contacto proveniente de conversaciones, compras o creados directamente se clasifica como cliente. Este endpoint proporciona y permite la actualización de datos del cliente.
Obtén los datos de todos tus clientes
OK
Unauthorized
{- "results": 1,
- "total_pages": 1,
- "customers": [
- {
- "first_name": "string",
- "last_name": "string",
- "email": "string",
- "phone": "string",
- "id_type": "cedula",
- "id_number": "string",
- "address": "string",
- "city": "string",
- "state": "string",
- "zip_code": "string",
- "notes": "string",
- "agent_id": 0,
- "tags": [
- {
- "name": "string",
- "value": true
}
], - "custom_fields": [
- {
- "field_name": "string",
- "field_content": "string"
}
], - "outbound_status": "error",
- "campaign_id": 0,
- "campaign_url": "string",
- "error_message": "string",
- "creation_date": "2019-08-24",
- "sent_at": "2019-08-24",
- "delivered_at": "2019-08-24",
- "read_at": "2019-08-24"
}
]
}
Crea un nuevo cliente
OK
Unauthorized
{- "first_name": "string",
- "last_name": "string",
- "email": "string",
- "phone": "string",
- "id_type": "cedula",
- "id_number": "string",
- "address": "string",
- "city": "string",
- "state": "string",
- "zip_code": "string",
- "notes": "string",
- "agent_id": 0,
- "tags": [
- {
- "name": "string",
- "value": true
}
], - "custom_fields": [
- {
- "field_name": "string",
- "field_content": "string"
}
], - "outbound_status": "error",
- "campaign_id": 0,
- "campaign_url": "string",
- "error_message": "string",
- "creation_date": "2019-08-24",
- "sent_at": "2019-08-24",
- "delivered_at": "2019-08-24",
- "read_at": "2019-08-24"
}
{- "message": "Customer created successfully",
- "customer": {
- "first_name": "string",
- "last_name": "string",
- "email": "string",
- "phone": "string",
- "id_type": "cedula",
- "id_number": "string",
- "address": "string",
- "city": "string",
- "state": "string",
- "zip_code": "string",
- "notes": "string",
- "agent_id": 0,
- "tags": [
- {
- "name": "string",
- "value": true
}
], - "custom_fields": [
- {
- "field_name": "string",
- "field_content": "string"
}
], - "outbound_status": "error",
- "campaign_id": 0,
- "campaign_url": "string",
- "error_message": "string",
- "creation_date": "2019-08-24",
- "sent_at": "2019-08-24",
- "delivered_at": "2019-08-24",
- "read_at": "2019-08-24"
}
}
Obtén los datos de un cliente en especifico buscado por ID
OK
Unauthorized
Not found
{- "message": "Customer found successfully",
- "customer": {
- "first_name": "string",
- "last_name": "string",
- "email": "string",
- "phone": "string",
- "id_type": "cedula",
- "id_number": "string",
- "address": "string",
- "city": "string",
- "state": "string",
- "zip_code": "string",
- "notes": "string",
- "agent_id": 0,
- "tags": [
- {
- "name": "string",
- "value": true
}
], - "custom_fields": [
- {
- "field_name": "string",
- "field_content": "string"
}
], - "outbound_status": "error",
- "campaign_id": 0,
- "campaign_url": "string",
- "error_message": "string",
- "creation_date": "2019-08-24",
- "sent_at": "2019-08-24",
- "delivered_at": "2019-08-24",
- "read_at": "2019-08-24"
}
}
Obtén los datos de un cliente en especifico buscado por email
OK
Unauthorized
Not found
{- "message": "Customer found successfully",
- "customer": {
- "first_name": "string",
- "last_name": "string",
- "email": "string",
- "phone": "string",
- "id_type": "cedula",
- "id_number": "string",
- "address": "string",
- "city": "string",
- "state": "string",
- "zip_code": "string",
- "notes": "string",
- "agent_id": 0,
- "tags": [
- {
- "name": "string",
- "value": true
}
], - "custom_fields": [
- {
- "field_name": "string",
- "field_content": "string"
}
], - "outbound_status": "error",
- "campaign_id": 0,
- "campaign_url": "string",
- "error_message": "string",
- "creation_date": "2019-08-24",
- "sent_at": "2019-08-24",
- "delivered_at": "2019-08-24",
- "read_at": "2019-08-24"
}
}
Obtén los datos de un cliente en especifico buscado por phone
OK
Unauthorized
Not found
{- "message": "Customer found successfully",
- "customer": {
- "first_name": "string",
- "last_name": "string",
- "email": "string",
- "phone": "string",
- "id_type": "cedula",
- "id_number": "string",
- "address": "string",
- "city": "string",
- "state": "string",
- "zip_code": "string",
- "notes": "string",
- "agent_id": 0,
- "tags": [
- {
- "name": "string",
- "value": true
}
], - "custom_fields": [
- {
- "field_name": "string",
- "field_content": "string"
}
], - "outbound_status": "error",
- "campaign_id": 0,
- "campaign_url": "string",
- "error_message": "string",
- "creation_date": "2019-08-24",
- "sent_at": "2019-08-24",
- "delivered_at": "2019-08-24",
- "read_at": "2019-08-24"
}
}
Actualiza un nuevo customer buscado por email, id o phone. Puedes realizar la busqueda igual que los métodos get
OK
Unauthorized
{- "first_name": "string",
- "last_name": "string",
- "email": "string",
- "phone": "string",
- "id_type": "cedula",
- "id_number": "string",
- "address": "string",
- "city": "string",
- "state": "string",
- "zip_code": "string",
- "notes": "string",
- "agent_id": 0,
- "tags": [
- {
- "name": "string",
- "value": true
}
], - "custom_fields": [
- {
- "field_name": "string",
- "field_content": "string"
}
], - "outbound_status": "error",
- "campaign_id": 0,
- "campaign_url": "string",
- "error_message": "string",
- "creation_date": "2019-08-24",
- "sent_at": "2019-08-24",
- "delivered_at": "2019-08-24",
- "read_at": "2019-08-24"
}
{- "message": "Customer updated successfully",
- "customer": {
- "first_name": "string",
- "last_name": "string",
- "email": "string",
- "phone": "string",
- "id_type": "cedula",
- "id_number": "string",
- "address": "string",
- "city": "string",
- "state": "string",
- "zip_code": "string",
- "notes": "string",
- "agent_id": 0,
- "tags": [
- {
- "name": "string",
- "value": true
}
], - "custom_fields": [
- {
- "field_name": "string",
- "field_content": "string"
}
], - "outbound_status": "error",
- "campaign_id": 0,
- "campaign_url": "string",
- "error_message": "string",
- "creation_date": "2019-08-24",
- "sent_at": "2019-08-24",
- "delivered_at": "2019-08-24",
- "read_at": "2019-08-24"
}
}
En Mercately, los embudos permiten visualizar el recorrido que sigues a tus clientes a traves de las negociaciones. Este endpoint proporciona y permite el manejo de datos de las negociaciones en los diferentes embundos.
{- "total": 2,
- "total_page": 1,
- "deals": [
- {
- "id": "9fb882221",
- "name": "Neptu",
- "amount": "150000.0",
- "currency": "$",
- "funnel_name": "Negociaciones",
- "stage": "Calificado!",
- "agent": {
- "id": 9,
- "first_name": "Nicolas",
- "last_name": "Mena Garzon",
- "email": "nicolas@mercately.com",
- "active": true,
- "agent": false,
- "admin": true,
- "supervisor": true
}, - "customer": {
- "id": "91989a87",
- "first_name": "javier",
- "last_name": "Salinas",
- "email": "javier@example.com",
- "phone": 5933505692996
}, - "channel": "string"
}
]
}
Crea una nueva negociación
OK
No se pudo procesar el recurso
{- "funnel_name": "Negociaciones",
- "stage": "Calificado",
- "deal": {
- "amount": "150000",
- "name": "string",
- "customer_id": "91989a87",
- "agent_id": 0,
- "lead_status": "cold",
- "opening_date": "2024-05-16",
- "expected_close_date": "2024-05-23"
}
}
{- "message": "deal was created successfully",
- "deal": {
- "id": "9fb882221",
- "name": "Neptu",
- "amount": "150000.0",
- "currency": "$",
- "funnel_name": "Negociaciones",
- "stage": "Calificado!",
- "agent": {
- "id": 9,
- "first_name": "Nicolas",
- "last_name": "Mena Garzon",
- "email": "nicolas@mercately.com",
- "active": true,
- "agent": false,
- "admin": true,
- "supervisor": true
}, - "customer": {
- "id": "91989a87",
- "first_name": "javier",
- "last_name": "Salinas",
- "email": "javier@example.com",
- "phone": 5933505692996
}, - "channel": "string"
}
}
{- "message": "deal found successfully",
- "deal": {
- "id": "9fb882221",
- "name": "Neptu",
- "amount": "150000.0",
- "currency": "$",
- "funnel_name": "Negociaciones",
- "stage": "Calificado!",
- "agent": {
- "id": 9,
- "first_name": "Nicolas",
- "last_name": "Mena Garzon",
- "email": "nicolas@mercately.com",
- "active": true,
- "agent": false,
- "admin": true,
- "supervisor": true
}, - "customer": {
- "id": "91989a87",
- "first_name": "javier",
- "last_name": "Salinas",
- "email": "javier@example.com",
- "phone": 5933505692996
}, - "channel": "string"
}
}
Actualiza una negociación
OK
La negociación no existe
No se pudo procesar el recurso
{- "funnel_name": "Negociaciones",
- "stage": "Calificado",
- "deal": {
- "amount": "150000",
- "name": "Ricardo - pavo",
- "customer_id": "91989a87",
- "lead_status": "cold",
- "opening_date": "2024-05-16",
- "expected_close_date": "2024-05-23",
- "funnel_name": "Negociaciones",
- "stage": "Calificado"
}
}
{- "message": "deal was updated successfully",
- "deal": {
- "id": "9fb882221",
- "name": "Neptu",
- "amount": "150000.0",
- "currency": "$",
- "funnel_name": "Negociaciones",
- "stage": "Calificado!",
- "agent": {
- "id": 9,
- "first_name": "Nicolas",
- "last_name": "Mena Garzon",
- "email": "nicolas@mercately.com",
- "active": true,
- "agent": false,
- "admin": true,
- "supervisor": true
}, - "customer": {
- "id": "91989a87",
- "first_name": "javier",
- "last_name": "Salinas",
- "email": "javier@example.com",
- "phone": 5933505692996
}, - "channel": "string"
}
}
En Mercately, una vez vinculado con Messenger, este api permite realizar múltiples operaciones para acceder a las conversaciones de Messenger.
Obtén los clients que te han escrito por messenger
OK
Unauthorized
{- "page": 0,
- "results_per_page": 0,
- "unassigned": true
}
{- "results": 155,
- "total_pages": 2,
- "messenger_conversations": [
- {
- "id": "621osgzy4696283",
- "first_name": "Claudia",
- "last_name": "Funnel",
- "email": null,
- "message_count": 3,
- "last_interaction": "2023-04-17T05:08:17.085Z",
- "agent_id": 4637
}
]
}
En Mercately, una vez vinculado con WhatsApp, este api permite realizar múltiples operaciones para acceder a las conversaciones de WhatsApp y enviar mensajes.
Obtén los clients que te han escrito por whatsapp
OK
Unauthorized
{- "page": 0,
- "results_per_page": 0,
- "unassigned": true
}
{- "results": 155,
- "total_pages": 2,
- "messenger_conversations": {
- "id": "621osgzy4696283",
- "first_name": "Claudia",
- "last_name": "Funnel",
- "email": null,
- "message_count": 3,
- "last_interaction": "2023-04-17T05:08:17.085Z",
- "agent_id": 4637
}
}
Obtén los templates/plantillas creadas en WhatsApp Business API
OK
Unauthorized
{ }
{- "templates": [
- {
- "text": "Hola *! ✋",
- "status": "accepted",
- "template_type": "text",
- "internal_id": "c0c040f6-9809-404a-961c-637b109ef410"
}
]
}
Para enviar un mensaje de WhatsApp cuando se tiene una conexión oficial al API de WhatsApp, sólo se requieren los parámetros phone_number, internal_id y template_params; los demás son opcionales. Si se tiene una conexión vía QR, por favor revisa la sección de envío de mensajes vía QR.
OK
Unauthorized
{- "phone_number": "string",
- "internal_id": "string",
- "template_params": [
- "string"
], - "media_url": "string",
- "first_name": "string",
- "last_name": "string",
- "email": "string",
- "address": "string",
- "city": "string",
- "state": "string",
- "zip_code": "string",
- "notes": "string",
- "agent_id": 0,
- "funnel_name": "string",
- "stage": "string",
- "tags": [
- {
- "name": "string",
- "value": true
}
], - "custom_fields": [
- {
- "identifier": "string",
- "value": "string"
}
]
}
{- "message": "Ok",
- "info": {
- "channel": "whatsapp",
- "content": {
- "text": "Hola Juan! ✋"
}, - "direction": "outbound",
- "status": "submitted",
- "destination": "593999999999",
- "country": "EC",
- "created_time": "2022-09-23T16:34:16.768-04:00",
- "error": null
}
}
Enviar un mensaje de WhatsApp cuando tienes una conexión oficial por QR. Los únicos parametros requeridos son phone_number y message, el resto de parámetros son opcionales.
OK
Unauthorized
{- "phone_number": "string",
- "message": "string",
- "media_url": "string",
- "first_name": "string",
- "last_name": "string",
- "email": "string",
- "address": "string",
- "city": "string",
- "state": "string",
- "zip_code": "string",
- "notes": "string",
- "agent_id": 0,
- "funnel_name": "string",
- "stage": "string",
- "tags": [
- {
- "name": "string",
- "value": true
}
], - "custom_fields": [
- {
- "identifier": "string",
- "value": "string"
}
]
}
{- "message": "Ok",
- "info": {
- "channel": "whatsapp",
- "content": {
- "text": "Hola Juan! ✋"
}, - "direction": "outbound",
- "status": "submitted",
- "destination": "593999999999",
- "country": "EC",
- "created_time": "2022-09-23T16:34:16.768-04:00",
- "error": null
}
}
Crea un nuevo evento para el cliente
CREATED
Unauthorized
{- "category": "string",
- "subcategory": "string",
- "type_event": "string",
- "action": "string",
- "source": "string",
- "url_spec": "string",
- "created_at": "string"
}
{- "messages": "Customer event created successfully"
}