Skip to main content

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_COMPANYGROUP or READ_WRITE_COMPANYGROUP

Path Parameters​

ParameterTypeDescription
idStringThe 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​

FieldTypeDescription
idStringUnique identifier of the company group.
nameStringName of the company group.
companyArrayCompany IDs stored on the group.
priceListStringID of the price list for the group, or null.
productGroupsObjectProduct visibility rules for the group. See below.
statusBooleanWhether the group is active. Default is true.
taxZonesArrayIDs of the tax zones assigned to the group.
paymentAccessObjectPayment method access rule for the group. See below.
createdAtStringDate and time the group was created (ISO 8601).
updatedAtStringDate and time the group was last updated (ISO 8601).

Product Groups Object​

FieldTypeDescription
groupsArrayProduct group rules. Each has productGroup (ID) and type (include or exclude).
restrictStoreProductVisibilityBooleanWhen true, member companies only see products allowed by these rules.

Payment Access Object​

FieldTypeDescription
modeStringinherit uses the store setting. selected allows only the listed methods.
methodsArrayAllowed methods. Each has method (payment method ID) and types (allowed payment types, empty for all).

Notes​

  • If no company group matches the ID, data is an empty object.
  • To list the companies in a group, use Get All Companies with the companyGroup filter.
  • 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.