Unassign products from the category

POST https://app.ecwid.com/api/v3/{storeId}/categories/{categoryId}/unassignProducts

Request and response example

Request:

POST /api/v3/1003/categories/9691094/unassignProducts HTTP/1.1
Authorization: Bearer secret_token
Host: app.ecwid.com
Content-Type: application/json
Cache-Control: no-cache

{
  "productIds": [
    37208345
  ]
}

Response:

{
  "deleteCount": 1
}

Required access scopes

Your app must have the following access scopes to make this request: update_catalog

Path params

All path params are required.

Param
Type
Description

storeId

number

Ecwid store ID.

categoryId

number

Internal category ID.

Headers

The Authorization header is required.

Header
Format
Description

Authorization

Bearer secret_ab***cd

Access token of the application.

Request JSON

A JSON object with the following fields:

Field
Type
Description

productIds

array of numbers

List of products that will be unassigned to the category. Note 1: Unassigned products are not deleted from the store. Note 2: Unassigned product without any categories are automatically assigned to the top-level category.

Response JSON

A JSON object with the following fields:

Field
Type
Description

deleteCount

number

Defines if the request was successful. One of:

1 if any products were unassigned,

0 if no products were unassigned.

Last updated

Was this helpful?