Skip to main content

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​

ParameterTypeDescription
idStringRequired. The ID of the product group.

Request Body​

Send at least one list of IDs.

FieldTypeRequiredDescription
companiesArrayNoIDs of companies. Up to 500 unique IDs.
companyGroupsArrayNoIDs of company groups. Up to 500 unique IDs.
customersArrayNoIDs 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​

FieldTypeDescription
successBooleanWhether the request succeeded.
messageStringResult message.
dataObjectNumber of companies, company groups and customers processed.

Notes​

  • Both include and exclude rules 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.