Skip to content

EditProduct#

Test Postman Apidog

Beta version

This functionality is in beta mode. Features may be changed and may work unstably.

To use this method, you must have a WhatsApp Business account.

The method is designed to edit an existing product in the catalog.

Request#

To edit a product in the catalog, you need to send a request to the address:

POST
{{baseUrl}}/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 (e.g., EUR)
retailerId string No Product identifier from the retailer
url string No Product page URL
countryCode string No Country of origin code (e.g., ENG)
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

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