HomeGuidesAPI ReferenceChangelogDiscussions
HomeLog In
Guides

Bulk Assign Product to Category

POST /v1/categories/bulk_assign


Update multiple product to the same lists of categories

Request Example

curl --location --request POST '<<api_domain>>/v1/categories/bulk_assign' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ${token}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "category_ids": [
        "5fd1ee381bafc178701ae1a1"
    ],
    "product_ids": [
        "6038ba6d759965004525f2e6",
        "5f86b369e388097aeebc59aa"
    ]
}'

Request Parameters

category_ids Required Array Array of category Ids e.g. ["5fd1ee381bafc178701ae1a1"]
product_ids Required Array Array of product Ids e.g. ["5f86b369e388097aeebc59aa"] maximum 100 product can be updated at the same time
is_bulk_remove Boolean bulk remove or add, default false indicating bulk add
unset_other_categories Boolean Reset product categories instead of adding categories. Default: false indicating add the product

Response Example

{
  "message":"Success"
}