Ejemplos
Last update: 7 days ago by Irais Aguirre
Lista de mensajes
Petición HTTP lista mensajes
curl -X POST 'http://{{url}}/whatsapp-bsp-api-endpoint-ws/services/v1/messaging' \-H 'Authorization: Bearer {{wa-msg-api-token}}' \-H 'Content-Type: application/json' \-d '{"from": "5215500000001","to": "5215500000002","type": "contacts","listMessages": {"headerText": "Header test","body": "Body test","footer": "Footer test","buttonText": "Ingles","sections": [{"title": "Cursos Online","messages": [{"id": "1","title": "Intensivos","description": "Clases en vivo de una hora diaria de lunes a viernes"},{"id": "2","title": "Sabatino","description": "Clases en vivo de 3 hora el sábado"},{"id": "3","title": "Alpha 12","description": "Clases en vivo, 12 horas divididas en 4 semanas"},{"id": "4","title": "Alpha 20","description": "Clases en vivo, 20 horas divididas en 4 semanas"},{"id": "5","title": "Alpha 40","description": "Clases en vivo, 40 horas divididas en 4 semanas"},{"id": "6","title": "Intensivos","description": "Clases en vivo de una hora diaria de lunes a viernes"},{"id": "7","title": "Sabatino","description": "Clases en vivo de 3 hora el sábado"},{"id": "8","title": "Alpha 12","description": "Clases en vivo, 12 horas divididas en 4 semanas"},{"id": "9","title": "Alpha 20","description": "Clases en vivo, 20 horas divididas en 4 semanas"},{"id": "10","title": "Alpha 40","description": "Clases en vivo, 40 horas divididas en 4 semanas"}]}]}}'
Body lista mensajes
{"from": "5215500000001","to": "5215500000002","type": "contacts","listMessages": {"headerText": "Header test","body": "Body test","footer": "Footer test","buttonText": "Ingles","sections": [{"title": "Cursos Online","messages": [{"id": "1","title": "Intensivos","description": "Clases en vivo de una hora diaria de lunes a viernes"},{"id": "2","title": "Sabatino","description": "Clases en vivo de 3 hora el sábado"},{"id": "3","title": "Alpha 12","description": "Clases en vivo, 12 horas divididas en 4 semanas"},{"id": "4","title": "Alpha 20","description": "Clases en vivo, 20 horas divididas en 4 semanas"},{"id": "5","title": "Alpha 40","description": "Clases en vivo, 40 horas divididas en 4 semanas"},{"id": "6","title": "Intensivos","description": "Clases en vivo de una hora diaria de lunes a viernes"},{"id": "7","title": "Sabatino","description": "Clases en vivo de 3 hora el sábado"},{"id": "8","title": "Alpha 12","description": "Clases en vivo, 12 horas divididas en 4 semanas"},{"id": "9","title": "Alpha 20","description": "Clases en vivo, 20 horas divididas en 4 semanas"},{"id": "10","title": "Alpha 40","description": "Clases en vivo, 40 horas divididas en 4 semanas"}]}]}}
Botones de réplica
Botones de réplica con imagen
Petición HTTP con imagen
curl -X POST 'http://{{url}}/whatsapp-bsp-api-endpoint-ws/services/v1/messaging' \-H 'Authorization: Bearer {{wa-msg-api-token}}' \-H 'Content-Type: application/json' \-d '{"from": "5215500000001","to": "5215500000002","type": "interactive","replyButtons":{"headerImage":{"link": "https://www.ejemplo.com/ejemplo_imagen.png"},"body": "Nuestras sopas son las mejores del lugar","footer": "Buen provecho","buttons":[{"id": "1","title": "Sopa de fideo"},{"id": "2","title": "Sopa de tortilla"},{"id": "3","title": "Sopa de pasta"}]}}'
Body con imagen
{"from": "5215500000001","to": "5215500000002","type": "interactive","replyButtons":{"headerImage":{"link": "https://www.ejemplo.com/ejemplo_imagen.png"},"body": "Nuestras sopas son las mejores del lugar","footer": "Buen provecho","buttons":[{"id": "1","title": "Sopa de fideo"},{"id": "2","title": "Sopa de tortilla"},{"id": "3","title": "Sopa de pasta"}]}}
Botones de réplica con video
Petición HTTP con video
curl -X POST 'http://{{url}}/whatsapp-bsp-api-endpoint-ws/services/v1/messaging' \-H 'Authorization: Bearer {{wa-msg-api-token}}' \-H 'Content-Type: application/json' \-d '{"from": "5215500000001","to": "5215500000002","type": "interactive","replyButtons":{"headerVideo":{"link": "https://www.ejemplo.com/ejemplo_video_3.7_MB.mp4"},"body": "Nuestras sopas son las mejores del lugar","footer": "Buen provecho","buttons":[{"id": "1","title": "Sopa de fideo"},{"id": "2","title": "Sopa de tortilla"},{"id": "3","title": "Sopa de pasta"}]}}'
Body con video
{"from": "5215500000001","to": "5215500000002","type": "interactive","replyButtons":{"headerVideo":{"link": "https://www.ejemplo.com/ejemplo_video_3.7_MB.mp4"},"body": "Nuestras sopas son las mejores del lugar","footer": "Buen provecho","buttons":[{"id": "1","title": "Sopa de fideo"},{"id": "2","title": "Sopa de tortilla"},{"id": "3","title": "Sopa de pasta"}]}}
Botones de réplica con documento
Petición HTTP con documento
curl -X POST 'http://{{url}}/whatsapp-bsp-api-endpoint-ws/services/v1/messaging' \-H 'Authorization: Bearer {{wa-msg-api-token}}' \-H 'Content-Type: application/json' \-d '{"from": "5215500000001","to": "5215500000002","type": "interactive","replyButtons":{"headerDocument":{"link": "https://www.ejemplo.com/ejemplo_documento.pdf","fileName": "mi doc"},"body": "Nuestras sopas son las mejores del lugar","footer": "Buen provecho","buttons":[{"id": "1","title": "Sopa de fideo"},{"id": "2","title": "Sopa de tortilla"},{"id": "3","title": "Sopa de pasta"}]}}'
Body con documento
{"from": "5215500000001","to": "5215500000002","type": "interactive","replyButtons":{"headerDocument":{"link": "https://www.ejemplo.com/ejemplo_documento.pdf","fileName": "mi doc"},"body": "Nuestras sopas son las mejores del lugar","footer": "Buen provecho","buttons":[{"id": "1","title": "Sopa de fideo"},{"id": "2","title": "Sopa de tortilla"},{"id": "3","title": "Sopa de pasta"}]}}
WhatsApp Flows
Petición HTTP WhatsApp Flows
curl -X POST 'http://{{url}}/whatsapp-bsp-api-endpoint-ws/services/v1/messaging' \-H 'Authorization: Bearer {{wa-msg-api-token}}' \-H 'Content-Type: application/json' \-d '{"from": "5215500000001","to": "5215500000002","type": "interactive","flow": {"body": "Agenda una sesión de asesoría de la API de WhastApp con uno de nuestros agentes de Concepto Móvil para familiarizarte con nuestras soluciones","action": {"name": "flow","parameters": {"mode": "draft","flow_message_version": "3","flow_id": "1","flow_token": "AQAAAAACS5FpgQ_cAAAAAD0QI3s.","flow_cta": "Agendar ahora","flow_action": "navigate","flow_action_payload": {"screen": "screen name","data": {"product_name": "name","product_description": "description","product_price": 100}}}}}}'
Body WhatsApp Flows
{"from": "5215500000001","to": "5215500000002","type": "interactive","flow":{"body": "Agenda una sesión de asesoría de la API de WhastApp con uno de nuestros agentes de Concepto Móvil para familiarizarte con nuestras soluciones","action": {"name": "flow","parameters": {"mode": "draft","flow_message_version": "3","flow_id": "1","flow_token": "AQAAAAACS5FpgQ_cAAAAAD0QI3s.","flow_cta": "Agendar ahora","flow_action": "navigate","flow_action_payload": {"screen": "screen name","data": {"product_name": "name","product_description": "description","product_price": 100}}}}}}