OBTÉN DATOS DE TUS CONVERSACIONES DE WHATSAPP
En Mercately, cuando ingresa una conversación, puedes obtener los datos de la misma.
Puedes enviar en la estructura del GET los siguientes parámetros:
page
results_per_page
unassigned
Obtener conversaciones de WhatsApp
Headers
Api-Key: Your API KEY
Response 200
Json
{
"results": 3,
"total_pages": 1,
"whatsapp_conversations": [
{
"id": null,
"customer_id": 1370,
"message_count": 1,
"last_interaction": "2022-09-23T00:34:13.097Z",
"first_name": "Vicente",
"last_name": "Griego",
"email": "[email protected]",
"phone": "+593789584759",
"agent_id": 962
},
{
"id": null,
"customer_id": 1371,
"message_count": 1,
"last_interaction": "2022-09-22T19:34:13.034Z",
"first_name": "Alfredo",
"last_name": "Medrano",
"email": "[email protected]",
"phone": "+593452365897",
"agent_id": null
},
{
"id": null,
"customer_id": 1369,
"message_count": 1,
"last_interaction": "2022-09-22T15:34:12.873Z",
"first_name": "Luis",
"last_name": "Barreto",
"email": "[email protected]",
"phone": "+593123458475",
"agent_id": 962
}
]
}
Obtener conversaciones no asignadas de WhatsApp
GET https:/app.mercately.com/retailers/api/v1/whatsapp_conversations?page=1&results_per_page=100&unassigned=true
Response 200
Json
{
"results": 1,
"total_pages": 1,
"whatsapp_conversations": [
{
"id": null,
"customer_id": 1374,
"message_count": 1,
"last_interaction": "2022-09-22T19:34:13.605Z",
"first_name": "Alejandro",
"last_name": "Delacrúz",
"email": "[email protected]",
"phone": "+593452365897",
"agent_id": null
}
]
}
OBTÉN LOS MENSAJES DE UNA CONVERSACIÓN
Headers
Api-Key: Your API KEY
Response Body
Json
{
"whatsapp_conversations": [
{
"id": "MyString",
"status": "submitted",
"direction": "inbound",
"channel": "MyString",
"message_type": "conversation",
"message_identifier": null,
"created_time": "2022-09-22T15:34:14.124Z",
"replied_message": null,
"filename": "",
"content_type": "text",
"content_text": "Hola TEST",
"content_media_url": "",
"content_media_caption": "",
"content_media_type": "",
"content_location_longitude": "",
"content_location_latitude": "",
"content_location_label": "",
"content_location_address": "",
"account_uid": "MyString",
"contacts_information": [],
"error_code": "",
"error_message": ""
},
{
"id": "MyString",
"status": "submitted",
"direction": "inbound",
"channel": "MyString",
"message_type": "conversation",
"message_identifier": null,
"created_time": "2022-09-22T15:34:14.124Z",
"replied_message": null,
"filename": "",
"content_type": "text",
"content_text": "Hola TEST",
"content_media_url": "",
"content_media_caption": "",
"content_media_type": "",
"content_location_longitude": "",
"content_location_latitude": "",
"content_location_label": "",
"content_location_address": "",
"account_uid": "MyString",
"contacts_information": [],
"error_code": "",
"error_message": ""
},
{
"id": "MyString",
"status": "submitted",
"direction": "inbound",
"channel": "MyString",
"message_type": "conversation",
"message_identifier": null,
"created_time": "2022-09-22T15:34:14.124Z",
"replied_message": null,
"filename": "",
"content_type": "text",
"content_text": "Hola TEST",
"content_media_url": "",
"content_media_caption": "",
"content_media_type": "",
"content_location_longitude": "",
"content_location_latitude": "",
"content_location_label": "",
"content_location_address": "",
"account_uid": "MyString",
"contacts_information": [],
"error_code": "",
"error_message": ""
},
{
"id": "MyString",
"status": "submitted",
"direction": "inbound",
"channel": "MyString",
"message_type": "conversation",
"message_identifier": null,
"created_time": "2022-09-22T15:34:14.124Z",
"replied_message": null,
"filename": "",
"content_type": "text",
"content_text": "Hola TEST",
"content_media_url": "",
"content_media_caption": "",
"content_media_type": "",
"content_location_longitude": "",
"content_location_latitude": "",
"content_location_label": "",
"content_location_address": "",
"account_uid": "MyString",
"contacts_information": [],
"error_code": "",
"error_message": ""
},
{
"id": "MyString",
"status": "submitted",
"direction": "inbound",
"channel": "MyString",
"message_type": "conversation",
"message_identifier": null,
"created_time": "2022-09-22T15:34:14.124Z",
"replied_message": null,
"filename": "",
"content_type": "text",
"content_text": "Hola TEST",
"content_media_url": "",
"content_media_caption": "",
"content_media_type": "",
"content_location_longitude": "",
"content_location_latitude": "",
"content_location_label": "",
"content_location_address": "",
"account_uid": "MyString",
"contacts_information": [],
"error_code": "",
"error_message": ""
}
],
"total_pages": 1
}