Skip to main content

Unassign Products from Brand

Removes the brand from one or more products and updates the brand's product count. The products are left without a brand.

HTTP Request​

  • URL: /brands/unassign-products
  • Method: POST
  • Headers:
    • accessToken: Required. Your API access token.
    • Content-Type: application/json
  • Required scope: None. Any valid access token can call this endpoint.

Request Body​

Send a JSON object with the following fields.

FieldTypeRequiredDescription
idStringYesID of the brand.
productIdsArrayYesIDs of the products to remove from the brand.

cURL Example​

curl --location '<BASE_URL>/brands/unassign-products' \
--header 'accessToken: <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"id": "663a0f1e4587085935a4fa21",
"productIds": [
"65f1c9a2b7e4d3a1c2f00a11",
"65f1c9a2b7e4d3a1c2f00a12"
]
}'

Response​

  • 200 OK: The products were unassigned successfully.
  • 400 Bad Request: The access token is missing or invalid, or the request body is not valid.

Sample JSON Response​

{
"success": true,
"message": "Products unassigned from brand successfully"
}

Response Details​

FieldTypeDescription
successBooleantrue when the products were unassigned.
messageStringConfirmation message.

Notes​

  • Include only products that belong to the brand in id.
  • To move products to a different brand, use Assign Products to Brand directly. You don't need to unassign them first.