Skip to main content
POST
/
instances
/
{instanceId}
/
token
/
{token}
/
catalogs
/
collection
/
remove-product
Remove products from collection
curl --request POST \
  --url https://api.z-api.io/instances/{instanceId}/token/{token}/catalogs/collection/remove-product \
  --header 'Client-Token: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "collectionId": "<string>",
  "productIds": [
    {}
  ]
}
'
{
  "success": true,
  "collectionId": "<string>"
}

Overview

This method is responsible for removing products from an existing collection in the WhatsApp Business catalog.
When adding or removing products from a collection, its ID is changed by WhatsApp. Use the returned ID for subsequent operations.

Attributes

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

Required

collectionId
string
required
Collection ID
productIds
array
required
IDs of the products to be removed

Request Body

{
  "collectionId": "658387616418640",
  "productIds": ["6643149779134830"]
}

Response

200

success
boolean
true if successful, false if it failed
collectionId
string
New collection ID after the change
{
  "success": true,
  "collectionId": "1798362193933497"
}

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”.