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.
https://app.mercately.com/
https://mercately.shop/
- Production server
https://app.mercately.com/retailers/api/v1/whatsapp_templates
- Shops API Production server
https://mercately.shop/retailers/api/v1/whatsapp_templates
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://app.mercately.com/retailers/api/v1/whatsapp_templates \
-H 'Content-Type: application/json' \
-H 'api-key: YOUR_API_KEY_HERE' \
-d '{}'
{ "templates": [ { … } ] }
Request
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.
- Production server
https://app.mercately.com/retailers/api/v1/whatsapp/send_notification_by_id
- Shops API Production server
https://mercately.shop/retailers/api/v1/whatsapp/send_notification_by_id
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://app.mercately.com/retailers/api/v1/whatsapp/send_notification_by_id \
-H 'Content-Type: application/json' \
-H 'api-key: YOUR_API_KEY_HERE' \
-d '{
"id": "false_5219997466670@c.us_3A581ECA7FABCA92B2FE",
"status": "read",
"direction": "inbound",
"channel": "whatsapp",
"message_type": "conversation",
"message_identifier": "msg_123456789",
"created_time": "2023-06-13T19:59:04.000Z",
"replied_message": "Hello, how can I help you?",
"filename": "image123.jpg",
"content_type": "media",
"content_text": "This is a sample text message.",
"content_media_url": "https://example.com/media/image123.jpg",
"content_media_caption": "Check out this image!",
"content_media_type": "sticker",
"content_location_longitude": "-99.1332",
"content_location_latitude": "19.4326",
"content_location_label": "Zócalo CDMX",
"content_location_address": "Plaza de la Constitución, Centro, Ciudad de México",
"account_uid": "false_5219997466670@c.us_3A581ECA7FABCA92B2FE",
"contacts_information": "[{\"name\": \"John Doe\", \"phone\": \"+5219997466670\"}]",
"error_code": "ERR_001",
"error_message": "Invalid media type"
}'
{ "id": "false_5219997466670@c.us_3A581ECA7FABCA92B2FE", "status": "read", "direction": "inbound", "channel": "whatsapp", "message_type": "conversation", "message_identifier": "msg_123456789", "created_time": "2023-06-13T19:59:04.000Z", "replied_message": "Hello, how can I help you?", "filename": "image123.jpg", "content_type": "media", "content_text": "This is a sample text message.", "content_media_url": "https://example.com/media/image123.jpg", "content_media_caption": "Check out this image!", "content_media_type": "sticker", "content_location_longitude": "-99.1332", "content_location_latitude": "19.4326", "content_location_label": "Zócalo CDMX", "content_location_address": "Plaza de la Constitución, Centro, Ciudad de México", "account_uid": "false_5219997466670@c.us_3A581ECA7FABCA92B2FE", "contacts_information": "[{\"name\": \"John Doe\", \"phone\": \"+5219997466670\"}]", "error_code": "ERR_001", "error_message": "Invalid media type" }
- Production server
https://app.mercately.com/retailers/api/v1/whatsapp/send_message
- Shops API Production server
https://mercately.shop/retailers/api/v1/whatsapp/send_message
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://app.mercately.com/retailers/api/v1/whatsapp/send_message \
-H 'Content-Type: application/json' \
-H 'api-key: YOUR_API_KEY_HERE' \
-d '{
"id": "false_5219997466670@c.us_3A581ECA7FABCA92B2FE",
"status": "read",
"direction": "inbound",
"channel": "whatsapp",
"message_type": "conversation",
"message_identifier": "msg_123456789",
"created_time": "2023-06-13T19:59:04.000Z",
"replied_message": "Hello, how can I help you?",
"filename": "image123.jpg",
"content_type": "media",
"content_text": "This is a sample text message.",
"content_media_url": "https://example.com/media/image123.jpg",
"content_media_caption": "Check out this image!",
"content_media_type": "sticker",
"content_location_longitude": "-99.1332",
"content_location_latitude": "19.4326",
"content_location_label": "Zócalo CDMX",
"content_location_address": "Plaza de la Constitución, Centro, Ciudad de México",
"account_uid": "false_5219997466670@c.us_3A581ECA7FABCA92B2FE",
"contacts_information": "[{\"name\": \"John Doe\", \"phone\": \"+5219997466670\"}]",
"error_code": "ERR_001",
"error_message": "Invalid media type"
}'
{ "id": "false_5219997466670@c.us_3A581ECA7FABCA92B2FE", "status": "read", "direction": "inbound", "channel": "whatsapp", "message_type": "conversation", "message_identifier": "msg_123456789", "created_time": "2023-06-13T19:59:04.000Z", "replied_message": "Hello, how can I help you?", "filename": "image123.jpg", "content_type": "media", "content_text": "This is a sample text message.", "content_media_url": "https://example.com/media/image123.jpg", "content_media_caption": "Check out this image!", "content_media_type": "sticker", "content_location_longitude": "-99.1332", "content_location_latitude": "19.4326", "content_location_label": "Zócalo CDMX", "content_location_address": "Plaza de la Constitución, Centro, Ciudad de México", "account_uid": "false_5219997466670@c.us_3A581ECA7FABCA92B2FE", "contacts_information": "[{\"name\": \"John Doe\", \"phone\": \"+5219997466670\"}]", "error_code": "ERR_001", "error_message": "Invalid media type" }