En Mercately, todo contacto proveniente de conversaciones, compras o creados directamente se clasifica como cliente.
Mercately Retailers API (1.0.0)
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.
Download OpenAPI description
Overview
Languages
Servers
Production server
https://app.mercately.com/
Shops API Production server
https://mercately.shop/
- Production serverhttps://app.mercately.com/retailers/api/v1/customers
- Shops API Production serverhttps://mercately.shop/retailers/api/v1/customers
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://app.mercately.com/retailers/api/v1/customers?page=0&start_date=2019-08-24&end_date=2019-08-24&id_type=cedula&id_number=string&platform=whatsapp&order_by_last_interaction=asc' \
-H 'api-key: YOUR_API_KEY_HERE'Response
application/json
{ "results": 1, "total_pages": 1, "customers": [ { … } ] }
- Production serverhttps://app.mercately.com/retailers/api/v1/customers
- Shops API Production serverhttps://mercately.shop/retailers/api/v1/customers
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://app.mercately.com/retailers/api/v1/customers \
-H 'Content-Type: application/json' \
-H 'api-key: YOUR_API_KEY_HERE' \
-d '{
"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",
"customer_addresses_attributes": [
{
"address": "string",
"city": "string",
"state": "string",
"zip_code": "string",
"country_id": 0,
"latitude": "string",
"longitude": "string",
"description": "string",
"main": true
}
],
"notes": "string"
},
"agent_id": 0,
"tags": [
{
"name": "string",
"value": true
}
],
"custom_fields": [
{
"field_name": "string",
"field_content": "string"
}
]
}'Response
application/json
{ "message": "Customer created successfully", "customer": { "id": "string", "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", "country_id": "string", "notes": "string", "whatsapp_opt_in": true, "whatsapp_name": "string", "customer_addresses": [ … ], "tags": [ … ], "custom_fields": [ … ], "agent": { … }, "outbound_status": "error", "campaign_id": 0, "error_message": "string", "campaign_url": "string", "creation_date": "2019-08-24T14:15:22Z", "sent_at": "2019-08-24T14:15:22Z", "delivered_at": "2019-08-24T14:15:22Z", "read_at": "2019-08-24T14:15:22Z", "last_chat_interaction": "2019-08-24T14:15:22Z" } }
- Production serverhttps://app.mercately.com/retailers/api/v1/customers/:id
- Shops API Production serverhttps://mercately.shop/retailers/api/v1/customers/:id
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://app.mercately.com/retailers/api/v1/customers/:id \
-H 'api-key: YOUR_API_KEY_HERE'Response
application/json
{ "id": "string", "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", "country_id": "string", "notes": "string", "whatsapp_opt_in": true, "whatsapp_name": "string", "customer_addresses": [ { … } ], "tags": [ { … } ], "custom_fields": [ { … } ], "agent": { "id": 0, "email": "string" }, "outbound_status": "error", "campaign_id": 0, "error_message": "string", "campaign_url": "string", "creation_date": "2019-08-24T14:15:22Z", "sent_at": "2019-08-24T14:15:22Z", "delivered_at": "2019-08-24T14:15:22Z", "read_at": "2019-08-24T14:15:22Z", "last_chat_interaction": "2019-08-24T14:15:22Z" }
- Production serverhttps://app.mercately.com/retailers/api/v1/customers/:email
- Shops API Production serverhttps://mercately.shop/retailers/api/v1/customers/:email
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://app.mercately.com/retailers/api/v1/customers/:email \
-H 'api-key: YOUR_API_KEY_HERE'Response
application/json
{ "message": "Customer found successfully", "customer": { "id": "string", "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", "country_id": "string", "notes": "string", "whatsapp_opt_in": true, "whatsapp_name": "string", "customer_addresses": [ … ], "tags": [ … ], "custom_fields": [ … ], "agent": { … }, "outbound_status": "error", "campaign_id": 0, "error_message": "string", "campaign_url": "string", "creation_date": "2019-08-24T14:15:22Z", "sent_at": "2019-08-24T14:15:22Z", "delivered_at": "2019-08-24T14:15:22Z", "read_at": "2019-08-24T14:15:22Z", "last_chat_interaction": "2019-08-24T14:15:22Z" } }
- Production serverhttps://app.mercately.com/retailers/api/v1/customers/:phone
- Shops API Production serverhttps://mercately.shop/retailers/api/v1/customers/:phone
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://app.mercately.com/retailers/api/v1/customers/:phone \
-H 'api-key: YOUR_API_KEY_HERE'Response
application/json
{ "message": "Customer found successfully", "customer": { "id": "string", "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", "country_id": "string", "notes": "string", "whatsapp_opt_in": true, "whatsapp_name": "string", "customer_addresses": [ … ], "tags": [ … ], "custom_fields": [ … ], "agent": { … }, "outbound_status": "error", "campaign_id": 0, "error_message": "string", "campaign_url": "string", "creation_date": "2019-08-24T14:15:22Z", "sent_at": "2019-08-24T14:15:22Z", "delivered_at": "2019-08-24T14:15:22Z", "read_at": "2019-08-24T14:15:22Z", "last_chat_interaction": "2019-08-24T14:15:22Z" } }
- Production serverhttps://app.mercately.com/retailers/api/v1/customers/:phone
- Shops API Production serverhttps://mercately.shop/retailers/api/v1/customers/:phone
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
https://app.mercately.com/retailers/api/v1/customers/:phone \
-H 'Content-Type: application/json' \
-H 'api-key: YOUR_API_KEY_HERE' \
-d '{
"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",
"customer_addresses_attributes": [
{
"address": "string",
"city": "string",
"state": "string",
"zip_code": "string",
"country_id": 0,
"latitude": "string",
"longitude": "string",
"description": "string",
"main": true
}
],
"notes": "string"
},
"agent_id": 0,
"tags": [
{
"name": "string",
"value": true
}
],
"custom_fields": [
{
"field_name": "string",
"field_content": "string"
}
]
}'Response
application/json
{ "message": "Customer updated successfully", "customer": { "id": "string", "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", "country_id": "string", "notes": "string", "whatsapp_opt_in": true, "whatsapp_name": "string", "customer_addresses": [ … ], "tags": [ … ], "custom_fields": [ … ], "agent": { … }, "outbound_status": "error", "campaign_id": 0, "error_message": "string", "campaign_url": "string", "creation_date": "2019-08-24T14:15:22Z", "sent_at": "2019-08-24T14:15:22Z", "delivered_at": "2019-08-24T14:15:22Z", "read_at": "2019-08-24T14:15:22Z", "last_chat_interaction": "2019-08-24T14:15:22Z" } }
- Production serverhttps://app.mercately.com/retailers/api/v1/customers/:id/whatsapp_conversations
- Shops API Production serverhttps://mercately.shop/retailers/api/v1/customers/:id/whatsapp_conversations
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://app.mercately.com/retailers/api/v1/customers/:id/whatsapp_conversations?page=0&results_per_page=0' \
-H 'api-key: YOUR_API_KEY_HERE'Response
application/json
{ "whatsapp_conversations": [ { … } ], "total_pages": 1 }
- Production serverhttps://app.mercately.com/retailers/api/v1/customers/:phone/whatsapp_conversations
- Shops API Production serverhttps://mercately.shop/retailers/api/v1/customers/:phone/whatsapp_conversations
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://app.mercately.com/retailers/api/v1/customers/:phone/whatsapp_conversations?page=0&results_per_page=0' \
-H 'api-key: YOUR_API_KEY_HERE'Response
application/json
{ "whatsapp_conversations": [ { … } ], "total_pages": 1 }
- Production serverhttps://app.mercately.com/retailers/api/v1/customers/:id/messenger_conversations
- Shops API Production serverhttps://mercately.shop/retailers/api/v1/customers/:id/messenger_conversations
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://app.mercately.com/retailers/api/v1/customers/:id/messenger_conversations?page=0&results_per_page=0' \
-H 'api-key: YOUR_API_KEY_HERE'Response
application/json
{ "messenger_conversations": [ { … } ], "total_pages": 1 }
- Production serverhttps://app.mercately.com/retailers/api/v1/customers/:id/instagram_conversations
- Shops API Production serverhttps://mercately.shop/retailers/api/v1/customers/:id/instagram_conversations
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://app.mercately.com/retailers/api/v1/customers/:id/instagram_conversations?page=0&results_per_page=0' \
-H 'api-key: YOUR_API_KEY_HERE'Response
application/json
{ "instagram_messages": [ { … } ], "total_pages": 1 }