Remove Product Group Rules
Removes the access rule for a product group from specific companies, company groups or customers.
HTTP Request
- URL:
/productGroup/{id}/rules/remove - Method:
POST - Headers:
accessToken: Required. Your API access token.Content-Type:application/json
- Required scope:
READ_WRITE_PRODUCTGROUP
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | String | Required. The ID of the product group. |
Request Body
Send at least one list of IDs.
| Field | Type | Required | Description |
|---|---|---|---|
companies | Array | No | IDs of companies. Up to 500 unique IDs. |
companyGroups | Array | No | IDs of company groups. Up to 500 unique IDs. |
customers | Array | No | IDs of customers. Up to 500 unique IDs. |
cURL Example
curl --location '<BASE_URL>/productGroup/66d220c8f57178681728212e/rules/remove' \
--header 'accessToken: <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"companies": ["6650b1c2d3e4f5a6b7c8d9e1"]
}'
Response
- 200 OK: The rules were removed successfully.
- 400 Bad Request: The access token is missing or invalid, the request body is not valid, or a company, company group or customer was not found.
- 404 Not Found: No product group matches the ID.
Sample JSON Response
{
"success": true,
"message": "Product group rules removed",
"data": {
"companies": 1
}
}
Response Details
| Field | Type | Description |
|---|---|---|
success | Boolean | Whether the request succeeded. |
message | String | Result message. |
data | Object | Number of companies, company groups and customers processed. |
Notes
- Both
includeandexcluderules for this product group are removed. Rules for other product groups are not affected. - After a rule is removed, the target follows its company's or company group's rule, or the group's default visibility.
- If any ID is not found, no rules are removed.