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
Languages
Servers
Production server
https://app.mercately.com/
Shops API Production server
https://mercately.shop/

Agents

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.

Operations

Customers

En Mercately, todo contacto proveniente de conversaciones, compras o creados directamente se clasifica como cliente.

Operations

Deals

En Mercately, los embudos permiten visualizar el recorrido que sigues a tus clientes a traves de las negociaciones.

Operations

Messenger

En Mercately, una vez vinculado con Messenger, este api permite realizar múltiples operaciones para acceder a las conversaciones de Messenger.

Operations

WhatsApp

En Mercately, una vez vinculado con WhatsApp, este api permite realizar múltiples operaciones para acceder a las conversaciones de WhatsApp y enviar mensajes.

Operations

WhatsApp Business Api Templates

Request

Obtén los templates/plantillas creadas en WhatsApp Business API

Bodyapplication/json
object(WhatsApp Business Api templates)
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 '{}'

Responses

OK

Bodyapplication/json
templatesArray of objects
Response
application/json
{ "templates": [ {} ] }

Send WhatsApp Message for WhatsApp Business API

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.

Bodyapplication/json
idstring
Example: "false_5219997466670@c.us_3A581ECA7FABCA92B2FE"
statusstring
Example: "read"
directionstring
Example: "inbound"
channelstring
Example: "whatsapp"
message_typestring
Example: "conversation"
message_identifierstring
Example: "msg_123456789"
created_timestring
Example: "2023-06-13T19:59:04.000Z"
replied_messagestring
Example: "Hello, how can I help you?"
filenamestring
Example: "image123.jpg"
content_typestring
Example: "media"
content_textstring
Example: "This is a sample text message."
content_media_urlstring
Example: "https://example.com/media/image123.jpg"
content_media_captionstring
Example: "Check out this image!"
content_media_typestring
Example: "sticker"
content_location_longitudestring
Example: "-99.1332"
content_location_latitudestring
Example: "19.4326"
content_location_labelstring
Example: "Zócalo CDMX"
content_location_addressstring
Example: "Plaza de la Constitución, Centro, Ciudad de México"
account_uidstring
Example: "false_5219997466670@c.us_3A581ECA7FABCA92B2FE"
contacts_informationstring
Example: "[{\"name\": \"John Doe\", \"phone\": \"+5219997466670\"}]"
error_codestring
Example: "ERR_001"
error_messagestring
Example: "Invalid media type"
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"
  }'

Responses

OK

Bodyapplication/json
idstring
Example: "false_5219997466670@c.us_3A581ECA7FABCA92B2FE"
statusstring
Example: "read"
directionstring
Example: "inbound"
channelstring
Example: "whatsapp"
message_typestring
Example: "conversation"
message_identifierstring
Example: "msg_123456789"
created_timestring
Example: "2023-06-13T19:59:04.000Z"
replied_messagestring
Example: "Hello, how can I help you?"
filenamestring
Example: "image123.jpg"
content_typestring
Example: "media"
content_textstring
Example: "This is a sample text message."
content_media_urlstring
Example: "https://example.com/media/image123.jpg"
content_media_captionstring
Example: "Check out this image!"
content_media_typestring
Example: "sticker"
content_location_longitudestring
Example: "-99.1332"
content_location_latitudestring
Example: "19.4326"
content_location_labelstring
Example: "Zócalo CDMX"
content_location_addressstring
Example: "Plaza de la Constitución, Centro, Ciudad de México"
account_uidstring
Example: "false_5219997466670@c.us_3A581ECA7FABCA92B2FE"
contacts_informationstring
Example: "[{\"name\": \"John Doe\", \"phone\": \"+5219997466670\"}]"
error_codestring
Example: "ERR_001"
error_messagestring
Example: "Invalid media type"
Response
application/json
{ "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" }

Send WhatsApp Message for WhatsApp Business QR

Request

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.

Bodyapplication/json
idstring
Example: "false_5219997466670@c.us_3A581ECA7FABCA92B2FE"
statusstring
Example: "read"
directionstring
Example: "inbound"
channelstring
Example: "whatsapp"
message_typestring
Example: "conversation"
message_identifierstring
Example: "msg_123456789"
created_timestring
Example: "2023-06-13T19:59:04.000Z"
replied_messagestring
Example: "Hello, how can I help you?"
filenamestring
Example: "image123.jpg"
content_typestring
Example: "media"
content_textstring
Example: "This is a sample text message."
content_media_urlstring
Example: "https://example.com/media/image123.jpg"
content_media_captionstring
Example: "Check out this image!"
content_media_typestring
Example: "sticker"
content_location_longitudestring
Example: "-99.1332"
content_location_latitudestring
Example: "19.4326"
content_location_labelstring
Example: "Zócalo CDMX"
content_location_addressstring
Example: "Plaza de la Constitución, Centro, Ciudad de México"
account_uidstring
Example: "false_5219997466670@c.us_3A581ECA7FABCA92B2FE"
contacts_informationstring
Example: "[{\"name\": \"John Doe\", \"phone\": \"+5219997466670\"}]"
error_codestring
Example: "ERR_001"
error_messagestring
Example: "Invalid media type"
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"
  }'

Responses

OK

Bodyapplication/json
idstring
Example: "false_5219997466670@c.us_3A581ECA7FABCA92B2FE"
statusstring
Example: "read"
directionstring
Example: "inbound"
channelstring
Example: "whatsapp"
message_typestring
Example: "conversation"
message_identifierstring
Example: "msg_123456789"
created_timestring
Example: "2023-06-13T19:59:04.000Z"
replied_messagestring
Example: "Hello, how can I help you?"
filenamestring
Example: "image123.jpg"
content_typestring
Example: "media"
content_textstring
Example: "This is a sample text message."
content_media_urlstring
Example: "https://example.com/media/image123.jpg"
content_media_captionstring
Example: "Check out this image!"
content_media_typestring
Example: "sticker"
content_location_longitudestring
Example: "-99.1332"
content_location_latitudestring
Example: "19.4326"
content_location_labelstring
Example: "Zócalo CDMX"
content_location_addressstring
Example: "Plaza de la Constitución, Centro, Ciudad de México"
account_uidstring
Example: "false_5219997466670@c.us_3A581ECA7FABCA92B2FE"
contacts_informationstring
Example: "[{\"name\": \"John Doe\", \"phone\": \"+5219997466670\"}]"
error_codestring
Example: "ERR_001"
error_messagestring
Example: "Invalid media type"
Response
application/json
{ "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" }

Flows

En Mercately, una vez creado uno o más flows, esta api permite realizar múltiples operaciones para obtener todos los flows.

Operations

Orders

Crea, actualiza y elimina órdenes en Mercately

Operations

Products

Crea, actualiza y elimina productos en Mercately

Operations

Categories

Obtén todas las categorías creadas en Mercately

Operations

Customer events

Operations