Order status
Last update: 6 hours ago by Irais Aguirre
Integration summary
- Endpoint:
POST https://{{url}}/whatsapp-bsp-api-endpoint-ws/services/v1/messaging- Token: messaging token, in the
Authorization: Bearer {{wa-msg-api-token}}header (how to generate it)- Common fields:
from,to(phone number or BSUID) andtype(details)typevalues on this page:"interactive"- Response: the same for every message (see response)
Interactive order status message (order_status). All are sent with POST /v1/messaging; headers (Headers), common fields and the response (Response) are in HTTP connection.
Order status
After you send the order details, you can notify the buyer of changes to the order and payment status (for example, payment captured or order shipped) using the same reference_id. The type field must be "interactive" and the content goes in the order_status object with the "review_order" action.
Body
Fields for Order status:
| Name | Description | Type | Requirements |
|---|---|---|---|
| from | Phone number (with country code) the message is sent from. | String | Required |
| to | Recipient's phone number in E.164 format, without the + sign. You can also use the user's BSUID, for example, US.13491208655302741918. | String | Required |
| type | Message type. Must be "interactive". | String | Required |
| order_status | Object with the message content and the new order status. | Object | Required |
Order status object
| Name | Description | Type | Requirements |
|---|---|---|---|
| body | Main text of the message. | String | Required |
| footer | Footer text of the message. | String | Optional |
| action | Object with the action and its parameters. | Object | Required |
Action order status object
| Name | Description | Type | Requirements |
|---|---|---|---|
| name | Action name. Must be "review_order". | String | Required |
| parameters | Object with the order reference and new status. | Object | Required |
Parameters order status object
| Name | Description | Type | Requirements |
|---|---|---|---|
| reference_id | Order ID. Must be the same reference_id sent in the order details. | String | Required |
| order.status | Order status. Possible values:
| String | Required if order is sent |
| order.description | Description of the order status. | String |
|
| payment.status | Payment status. Possible values:
| String | Required if payment is sent |
| payment.timestamp | Payment date as a Unix timestamp. | Number | Optional |
Example
Complete Order status example:
HTTP request with order and payment status
curl -X POST 'https://{{url}}/whatsapp-bsp-api-endpoint-ws/services/v1/messaging' \-H 'Authorization: Bearer {{wa-msg-api-token}}' \-H 'Content-Type: application/json' \-d '{"from": "5511900000001","to": "5511900000002","type": "interactive","order_status": {"body": "Seu pagamento foi confirmado e o pedido está sendo preparado.","footer": "Obrigado pela sua compra","action": {"name": "review_order","parameters": {"reference_id": "link-br-full-001","order": {"status": "processing","description": "Pedido em preparação"},"payment": {"status": "captured","timestamp": 1762300800}}}}}'
