logo
enes

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) and type (details)
  • type values 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:

NameDescriptionTypeRequirements
fromPhone number (with country code) the message is sent from.StringRequired
toRecipient's phone number in E.164 format, without the + sign. You can also use the user's BSUID, for example, US.13491208655302741918.StringRequired
typeMessage type. Must be "interactive".StringRequired
order_statusObject with the message content and the new order status.ObjectRequired

Order status object

NameDescriptionTypeRequirements
bodyMain text of the message.StringRequired
footerFooter text of the message.StringOptional
actionObject with the action and its parameters.ObjectRequired

Action order status object

NameDescriptionTypeRequirements
nameAction name. Must be "review_order".StringRequired
parametersObject with the order reference and new status.ObjectRequired

Parameters order status object

NameDescriptionTypeRequirements
reference_idOrder ID. Must be the same reference_id sent in the order details.StringRequired
order.statusOrder status. Possible values:
  • pending
  • processing
  • partially_shipped
  • shipped
  • completed
  • canceled
StringRequired if order is sent
order.descriptionDescription of the order status.String
  • Optional
  • Maximum 120 characters.
payment.statusPayment status. Possible values:
  • pending
  • captured
  • failed
StringRequired if payment is sent
payment.timestampPayment date as a Unix timestamp.NumberOptional

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
}
}
}
}
}'


WhatsApp — Previous
Order details and payment
Next — WhatsApp
Payment templates