Skip to main content
POST
/
instances
/
{instanceId}
/
token
/
{token}
/
order-status-update
Update order status
curl --request POST \
  --url https://api.z-api.io/instances/{instanceId}/token/{token}/order-status-update \
  --header 'Client-Token: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "phone": "<string>",
  "messageId": "<string>",
  "referenceId": "<string>",
  "orderRequestId": "<string>",
  "orderStatus": "<string>",
  "paymentStatus": "<string>",
  "order": {
    "currency": "<string>",
    "products": [
      {
        "name": "<string>",
        "value": 123,
        "quantity": 123,
        "productId": "<string>",
        "isCustomItem": true
      }
    ],
    "discount": 123,
    "tax": 123,
    "shipping": 123
  }
}
'

Overview

With this method you can send order status update messages.
This method is only available for WhatsApp Business accounts. All original order data must be resent with the additional mandatory parameters returned via webhook.

Attributes

instanceId
string
required
Your instance ID. Available in the Z-API panel under Instances.
token
string
required
Your Z-API instance token.

Required

phone
string
required
Recipient’s phone number in DDI DDD NUMBER format. E.g.: 551199999999
messageId
string
required
Original order message ID from WhatsApp
referenceId
string
required
Order reference ID (obtained via webhook)
orderRequestId
string
required
Order request reference ID (obtained via webhook)
orderStatus
string
required
New order status: pending, processing, shipped, completed or canceled
paymentStatus
string
required
Payment status: pending or paid
order
object
required
Order data

Optional

message
string
Order update text message

Request Body

{
  "phone": "554499999999",
  "messageId": "3EB0F91BBA791BB0A787FC",
  "message": "Order update text message",
  "referenceId": "4N8FCTW1WM6",
  "orderRequestId": "4N8FCTW22W4",
  "orderStatus": "processing",
  "paymentStatus": "pending",
  "order": {
    "currency": "BRL",
    "discount": 10,
    "tax": 10,
    "shipping": 5,
    "products": [
      {
        "value": 150,
        "quantity": 2,
        "name": "order 1",
        "isCustomItem": true,
        "productId": "custom-item-4N8FCTW23N7"
      },
      {
        "productId": "23940797548900636",
        "value": 150,
        "quantity": 2,
        "name": "order 2",
        "isCustomItem": false
      }
    ]
  }
}

Response

200

{
  "zaapId": "3999984263738042930CD6ECDE9VDWSA",
  "messageId": "D241XXXX732339502B68",
  "id": "D241XXXX732339502B68"
}

405

Make sure you are correctly sending the method specification, that is, verify that you sent POST or GET as specified at the beginning of this topic.

415

If you receive a 415 error, make sure to add the “Content-Type” header to your request, which in most cases is “application/json”.