GetOrderDetails#
The method is designed to retrieve detailed information about an order received via the orderMessage webhook.
WhatsApp-side limitations
If catalog methods are called frequently, WhatsApp may temporarily restrict access to the Business Catalog API. Do not send a large number of requests to catalog methods over a short period of time.
Request#
To get order details, you need to send a request to the address:
POST
{{apiUrl}}/waInstance{{idInstance}}/getOrderDetails/{{apiTokenInstance}}
To obtain the request parameters idInstance and apiTokenInstance, refer to the section Before you start.
Request parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
orderId | string | Yes | Order ID from the orderMessage webhook |
token | string | Yes | Order token from the orderMessage webhook |
sellerJid | string | No | JID of the seller who owns the catalog, in the format 79876543210@c.us. If not specified, the JID of the instance itself is used. Required when requesting an order placed by a buyer โ in that case, take the value from the sellerJid field of the orderMessage webhook |
Request body example#
{
"orderId": "1292422363001382",
"token": "AeBD7tvosdPMN4rv276nLCiEHI+ce79oubkPDL7B8YXLOQ==",
"sellerJid": "79876543210@c.us"
}
Response#
Response fields#
| Field | Type | Description |
|---|---|---|
creation_time_stamp | integer | Order creation timestamp (Unix timestamp) |
products | array | Array of products included in the order |
price_details | object | Order cost information |
Product object (products):
| Field | Type | Description |
|---|---|---|
id | string | Product identifier in WhatsApp |
name | string | Product name |
price | string | Price per unit (in the smallest currency unit) |
currency | string | Currency code |
quantity | integer | Quantity of the product in the order |
variant_info | object | Variant information (if any) |
media | object | Product media files (images) |
Price object (price_details):
| Field | Type | Description |
|---|---|---|
subtotal_amount | integer | Order subtotal (without discounts and shipping) |
total_amount | integer | Order total amount |
currency | string | Currency code |
Response body example#
{
"creation_time_stamp": 1776746617,
"products": [
{
"id": "26437451389197252",
"name": "Handmade Ceramic Mug - Large+",
"price": "1000",
"currency": "USD",
"variant_info": {
"variant_properties": []
},
"media": {
"images": [
{
"id": "26756491040611445",
"request_image_url": "https://mmg.whatsapp.net/v/t45.5328-4/675237262_26756491060611443_8396636402251856458_n.jpg?stp=dst-jpg_p110x80_tt6&ccb=1-7&_nc_sid=657aed&_nc_ohc=OR_UxF8HkhAQ7kNvwGT0Iz-&_nc_oc=AdoB9laMlKIU2Gkq8gMalfFEqG1gEqO-1qVuumBjOwQ7zYn8WuMh6Uri4TcLkvmZG4w&_nc_zt=23&_nc_ht=mmg.whatsapp.net&_nc_gid=lYlNvn2JD92bwcs5IHAfIA&_nc_ss=73120&oh=01_Q5Aa4QF3y2KR-dP2cBvLAT4KWB_m3aPQPqADaD0qWICzVtylTA&oe=69F616B9"
}
]
},
"quantity": 1
},
{
"id": "26316026244746883",
"name": "Cotton Tote Bag",
"price": "45000",
"currency": "USD",
"variant_info": {
"variant_properties": []
},
"media": {
"images": [
{
"id": "2160393548084268",
"request_image_url": "https://mmg.whatsapp.net/v/t45.5328-4/676524068_2160393551417601_2654589292030186593_n.jpg?stp=dst-jpg_s168x128_tt6&ccb=1-7&_nc_sid=657aed&_nc_ohc=7WzR_hoP1PMQ7kNvwE1d3CE&_nc_oc=AdoKHhXc3dIEtlh8sz53WgF3HfMaVOC2fiv_QO84JN44ivMRTQucrGChOyLn25SUW5w&_nc_zt=23&_nc_ht=mmg.whatsapp.net&_nc_gid=lYlNvn2JD92bwcs5IHAfIA&_nc_ss=73120&oh=01_Q5Aa4QExm1SyZ1jirayxqlTiP6ggIojSHC1um9dMG2NJ8q7xkg&oe=69F5FD10"
}
]
},
"quantity": 1
}
],
"price_details": {
"subtotal_amount": 140000,
"currency": "USD",
"total_amount": 140000
}
}
GetOrderDetails errors#
For a list of common errors for all methods, see the section Common errors
Code examples#
import requests
url = "{{apiUrl}}/waInstance{{idInstance}}/getOrderDetails/{{apiTokenInstance}}"
payload = {
"orderId": "1292422363001382",
"token": "AeBD7tvosdPMN4rv276nLCiEHI+ce79oubkPDL7B8YXLOQ==",
"sellerJid": "79876543210@c.us"
}
headers = {
'Content-Type': 'application/json'
}
response = requests.post(url, json=payload, headers=headers)
print(response.text.encode('utf8'))
curl --location '{{apiUrl}}/waInstance{{idInstance}}/getOrderDetails/{{apiTokenInstance}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"orderId": "1292422363001382",
"token": "AeBD7tvosdPMN4rv276nLCiEHI+ce79oubkPDL7B8YXLOQ==",
"sellerJid": "79876543210@c.us"
}'