Assign companies to a shared catalog
A shared catalog must be assigned to one or more companies before it can be accessed by the company users.
Service name:
sharedCatalogCompanyManagementV1
REST endpoints:
Copied to your clipboardPOST /V1/sharedCatalog/:sharedCatalogId/assignCompaniesPOST /V1/sharedCatalog/:sharedCatalogId/unassignCompaniesGET /V1/sharedCatalog/:sharedCatalogId/companies
Company parameters:
Although you can specify other parameters defined within a categories
object, the id
is the only one used to assign or unassign a category to a shared catalog.
Name | Description | Format | Requirements |
---|---|---|---|
id | The company ID number | integer | Required to assign or unassign a company to a shared catalog |
Assign companies to shared catalog
This action works as an update. It does not replace companies that have already been assigned.
If a specified company is already assigned to a different shared catalog, this request unassigns the company from the previous catalog and assigns to the new one.
Sample usage:
POST <host>/rest/<store_code>/V1/sharedCatalog/2/assignCompanies
Copied to your clipboard{"companies": [{"id": 1},{"id": 2}]}
Copied to your clipboard// `true`, indicating the request was successful
Unassign companies from a shared catalog
When you unassign a company from a custom catalog, the system automatically assigns this company to the public shared catalog. You cannot unassign a company from the public catalog.
Sample usage:
POST <host>/rest/<store_code>/V1/sharedCatalog/2/unassignCompanies
Copied to your clipboard{"companies": [{"id": 2}]}
Copied to your clipboard// `true`, indicating the request was successful
List the shared catalog companies
The GET
call returns an array of company IDs.
Sample Usage:
GET <host>/rest/<store_code>/V1/sharedCatalog/2/companies
Copied to your clipboard// Not applicable
Copied to your clipboard"[\"1\",\"2\"]"