Skip to main content

Edit a product

This endpoint will let you edit an existing product in your catalog.

info

To use this API, you must connect a number that uses the free version of WhatsApp Business. This API does not need a WhatsApp Business API account to work.

info

You will need the product ID to do this. You can obtain it finding the product in your list of products.

caution

Just like with the app, each modification you make will go through a verification process made by WhatsApp that can take between a few minutes to a few hours.

Available fields

FieldDescription
nameName field of the product. You can't set this field to NULL
image_urlAn URL pointing to the first image of the product. You can't set this field to NULL
descriptionA description of the product
priceThe price of your product. If the price was never set, editing it may not work unless you edit it using the app
is_hiddenWhether this product is hidden from your customers or not
urlURL field of the product. For example, the link to the product in your Shopify store
retailer_idyour custom ID for this product. For example, its SKU value

Invocation

Make a PUT request to https://api.p.2chat.io/open/whatsapp/catalog/product/<product-id> and specify any of the following fields in the request body:

Request body

For each request, you must specify the phone number you connected to 2Chat that has the product you want to edit inside its catalog.

{
"from_number": "+595981461442",
"product": {
"name": "PUMA > SUEDE CLASSIC REGAL (new)",
"image_url": "https://2chat.co/img/2chat-logo.png",
"price": "150.00",
"description": "First introduced in 1968, the Puma Suede Classic is Puma's most epic sneaker with its athletic inspired design and smooth suede. The Puma Suede Classic Regal Red/White is constructed with a suede upper and contrasting low profile rubber sole, and fat laces, the classic continues to make its mark on the streets today.",
"retailer_id": "puma1.1"
}
}

In the following examples, we are using 6489529801134316 as the product ID.

curl --location --request PUT 'https://api.p.2chat.io/open/whatsapp/catalog/product/6489529801134316' \
--header 'X-User-API-Key: your_api_key_here' \
--data '{
"from_number": "+595981461442",
"product": {
"name": "PUMA > SUEDE CLASSIC REGAL (new)",
"image_url": "https://2chat.co/img/2chat-logo.png",
"price": "140.00",
"description": "First introduced in 1968, the Puma Suede Classic is Puma'\''s most epic sneaker with its athletic inspired design and smooth suede. The Puma Suede Classic Regal Red/White is constructed with a suede upper and contrasting low profile rubber sole, and fat laces, the classic continues to make its mark on the streets today.",
"retailer_id": "puma1.1"
}

}'

Response

{
"success": true
}