Ejemplos
Last update: a year ago by Irais Aguirre
Crear Template
Petición HTTP crear template
curl -X POST "https://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services/v1/templates" \-H 'Content-Type: application/json' \-H 'Authorization: Bearer {{wa-msg-api-token}}' \-H 'phone_number_id: 5215500000000'
Ejemplo body crear template
{"name": "notificacion_de_pedido","language": "es_MX","category": "ACCOUNT_UPDATE","structure":{"header":{"format": "TEXT|IMAGE|DOCUMENT|VIDEO|LOCATION","text": "PEDIDO: {{1}}","example":{"header_handler":["file-handle"],"header_text":["header-example"]}},"body":{"text": "Tu pedido {{1}} esta por llegar","example":{"body_text":[[ "123"]]}},"footer": "Mi empresa","buttons":[{"type": "PHONE_NUMBER|URL|QUICK_REPLY","text": "phone-button-text|url-button-text","url": "https://www.website.com/{{1}}","phone_number": "+52(1) 555-1111","example":["https://www.website.com/dynamic-url-example"]}]}}
Eliminar Template
Petición HTTP eliminar template
curl -X DELETE "https://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services/v1/templates/{{wab_id}}/{{id}}/{{template_name}}" \-H 'Content-Type: application/json' \-H 'Authorization: Bearer {{wa-msg-api-token}}'
Consultar Template
Petición HTTP consultar template
curl "https://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services/v1/template/{{wba_id}}" \-H 'Authorization: Bearer {{wa-msg-api-token}}'