Get Company Group
Retrieves the details of a single company group, including its price list, product visibility rules and payment settings.
HTTP Request
- URL:
/companyGroup/{id} - Method:
GET - Headers:
accessToken: Required. Your API access token.
- Required scope:
READ_COMPANYGROUPorREAD_WRITE_COMPANYGROUP
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | String | The ID of the company group to retrieve. |
cURL Example
curl --location '<BASE_URL>/companyGroup/66a6dd927d6c18df2d9eb836' \
--header 'accessToken: <ACCESS_TOKEN>'
Response
- 200 OK: The company group was returned successfully.
- 400 Bad Request: The access token is missing or invalid, or the company group ID is not valid.
Sample JSON Response
{
"success": true,
"data": {
"id": "66a6dd927d6c18df2d9eb836",
"name": "Wholesale",
"company": [],
"priceList": "66ad153dbf8641f96544341d",
"productGroups": {
"groups": [
{
"productGroup": "66cda944ee801563b8eec563",
"type": "include"
}
],
"restrictStoreProductVisibility": true
},
"status": true,
"taxZones": [],
"paymentAccess": {
"mode": "selected",
"methods": [
{ "method": "6650a1c2e4b0a1b2c3d4e5f6", "types": [] }
]
},
"createdAt": "2024-07-29T00:08:50.416Z",
"updatedAt": "2024-10-03T11:07:39.111Z"
}
}
Response Details
Company Group Data
| Field | Type | Description |
|---|---|---|
id | String | Unique identifier of the company group. |
name | String | Name of the company group. |
company | Array | Company IDs stored on the group. |
priceList | String | ID of the price list for the group, or null. |
productGroups | Object | Product visibility rules for the group. See below. |
status | Boolean | Whether the group is active. Default is true. |
taxZones | Array | IDs of the tax zones assigned to the group. |
paymentAccess | Object | Payment method access rule for the group. See below. |
createdAt | String | Date and time the group was created (ISO 8601). |
updatedAt | String | Date and time the group was last updated (ISO 8601). |
Product Groups Object
| Field | Type | Description |
|---|---|---|
groups | Array | Product group rules. Each has productGroup (ID) and type (include or exclude). |
restrictStoreProductVisibility | Boolean | When true, member companies only see products allowed by these rules. |
Payment Access Object
| Field | Type | Description |
|---|---|---|
mode | String | inherit uses the store setting. selected allows only the listed methods. |
methods | Array | Allowed methods. Each has method (payment method ID) and types (allowed payment types, empty for all). |
Notes
- If no company group matches the ID,
datais an empty object. - To list the companies in a group, use Get All Companies with the
companyGroupfilter. - A company's group, and the price lists and payment access it brings, apply to that company only. They are not inherited from or shared with its parent or sub-companies. See Corporate Hierarchy and Access.