EditProduct#
To use this method, you must have a WhatsApp Business account.
The method is designed to edit an existing product in the catalog.
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 edit a product in the catalog, you need to send a request to the address:
POST
{{apiUrl}}/waInstance{{idInstance}}/editProduct/{{apiTokenInstance}}
To obtain the request parameters idInstance and apiTokenInstance, refer to the section Before you start.
Request parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
productId | string | Yes | Unique identifier of the product to be edited |
name | string | No | New product name |
price | string | No | New price (regular format, e.g., "950" = 950 Euro) |
description | string | No | New product description |
imageUrl | string | No | New product image URL |
currency | string | No | Currency code in ISO 4217 format (e.g., EUR). If not specified, it is determined by countryCode; otherwise the product keeps its current currency |
retailerId | string | No | Product identifier from the retailer |
url | string | No | Product page URL. Must start with http:// or https:// |
countryCode | string | No | Country of origin code in ISO 3166-1 alpha-2 format (e.g., GB) |
isHidden | boolean | No | Whether the product is hidden (default false) |
Request body example#
{
"productId": "26304465135919794",
"name": "Handmade Ceramic Mug - Large",
"price": "950",
"description": "Hand-painted ceramic mug, 450ml. New larger size.",
"imageUrl": "https://images.unsplash.com/photo-1514228742587-6b1558fcca3d?w=800",
"currency": "USD",
"retailerId": "12345",
"url": "https://example.com",
"countryCode": "ENG",
"isHidden": true
}
Response#
Response fields#
| Field | Type | Description |
|---|---|---|
edited | boolean | Returns true if the edit was successful |
productId | string | ID of the edited product (matches the one passed in the request) |
Response body example#
{
"edited": true,
"productId": "26304465135919794"
}
EditProduct errors#
For a list of common errors for all methods, see the section Common errors
| HTTP code | Error identifier | Description |
|---|---|---|
| 400 | Catalog mutations require a business account | WhatsApp-side restriction that occurs when catalog methods are called frequently. Returned even when the request is made from a Business account |
Code examples#
import requests
url = "{{apiUrl}}/waInstance{{idInstance}}/editProduct/{{apiTokenInstance}}"
payload = {
"productId": "26304465135919794",
"name": "Handmade Ceramic Mug - Large",
"price": "950",
"description": "Hand-painted ceramic mug, 450ml. New larger size.",
"imageUrl": "https://images.unsplash.com/photo-1514228742587-6b1558fcca3d?w=800",
"currency": "USD",
"retailerId": "12345",
"url": "https://example.com",
"countryCode": "ENG",
"isHidden": True
}
headers = {
'Content-Type': 'application/json'
}
response = requests.post(url, json=payload, headers=headers)
print(response.text.encode('utf8'))
curl --location '{{apiUrl}}/waInstance{{idInstance}}/editProduct/{{apiTokenInstance}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"productId": "26304465135919794",
"name": "Handmade Ceramic Mug - Large",
"price": "950",
"description": "Hand-painted ceramic mug, 450ml. New larger size.",
"imageUrl": "https://images.unsplash.com/photo-1514228742587-6b1558fcca3d?w=800",
"currency": "USD",
"retailerId": "12345",
"url": "https://example.com",
"countryCode": "ENG",
"isHidden": true
}'