Usergroups
Usergroups are used to group users or other usergroups together. This parent - child relationship i.e. tree organizational structure is very powerful because it allows inheriting settings, permissions, pricing, etc. A usergroup can even represent a company in a B2B environment, although this concept will soon be deprecated and a dedicated Companies
resource will be introduced.
Usergroup Lookup keys
Key | Type | Description |
---|---|---|
id | integer | Propeller usergroup id |
sourceId | string | External system unique id. sourceId should be combined with source |
Fields
Name | Description | Type |
---|---|---|
name | Usergroup name | string |
language | Default system language | string ISO 639-1 |
parent | Parent usergroup | JSON object that identifies the parent. id or sourceId in combination with source |
company | Company | string |
department | Department | string |
office | Office | string |
notes | Notes | string |
inheritProductList | Indicates whether pricing should be inherited from parent usergroup | enum Y = Yes N = No |
inheritOrderList | Indicates whether the order list should be inherited from the parent usergroup | enum Y = Yes N = No |
budget | Usergroup budget settings | enum Y = Users in usergroup use budget and may only order products within budget H = Users in usergroup use budget and may also order products outside budget N = Users in usergroup do not use budgets |
budgetInherit | Indicates whether budget settings should be inherited from parent usergroup | enum Y = Yes N = No |
orderListAllowAll | Order list settings | enum N = Order everything within the order list Y = Order everything outside the order list A = Order everything, but products outside the order list must be authorized U = Order everything P = Order restricted products |
sourceId | External system unique id | string |
source | External system | string |
Usergroup Errors
This section describes error codes specific for the Usergroup
resource.
Code | Error Type | Status Code | Message | Reason |
---|---|---|---|---|
20004 | UsergroupExists | 400 | Usergroup already exists | Usergroup with such lookup key already exists |
20005 | UsergroupMultipleFound | 400 | Multuple usergroups found. Please provide additional filters | Multiple usergroups with such lookup key exist |
20006 | UsergroupNotFound | 404 | Usergroup does not exist | Usergroup with such lookup key not found |
20007 | ParentUsergroupNotFound | 404 | Parent usergroup not found | Parent usergroup with such lookup key not found. This error is typical when working with usergroup sub-resources (e.g. attributes, addresses) |
90006 | AddressNotFound | 404 | Address does not exist | Usergroup address does not exist |
📄️ Get Usergroup Addresses by type
Use this endpoint to retrieve a list of all usergroup addresses. Addresses can be filtered by type.
📄️ Create Usergroup Address
Use this endpoint to create an address for a usergroup. If the address is successfully created, the response will include the address `id`.
📄️ Bulk Usergroup Addresses
Use this endpoint to create multiple usergroup addresses with a single API request. If an address with the code provided is found, it will be updated, otherwise a new address will be created. If the code is not provided, a new address will be created. When a new address is successfully created, the response will include the address `id`.
📄️ Get Usergroup Address by Id
Use this endpoint to retrieve details for a usergroup address. The address is identified by `id`.
📄️ Update Usergroup Address
Use this endpoint to update a usergroup address. The address is identified by `id`.
📄️ Create Usergroup Pricing
Use this endpoint to define [pricing](/rest/pricesheets) for an existing usergroup. The usergroup can be identified by it's lookup key. It is required to provide either `categories` or `products` or both in the payload.
📄️ Delete Usergroup Pricing
Use this endpoint to delete pricing for an existing usergroup. The usergroup can be identified by it's lookup key.
📄️ Create Usergroup
Use this endpoint to create a single usergroup. If a usergroup is successfully created, the response will include the usergroup `id`.
📄️ Get Usergroup by lookup key
Use this endpoint to retrieve usergroup details by lookup key. If multiple usergroups with the same lookup key exist, use additional filtering depending on the lookup key to uniquely identify the usergroup (e.g. `source` and `language` for lookup key `source`).
📄️ Delete Usergroup by lookup key
Delete a usergroup by a specific lookupKey / lookupId combination. A deleted usergroup will be moved to the Propeller Recycle bin. This means the deleted usergroup can be restored, however, only via the Propeller backoffice.
📄️ Update Usergroup by lookup key
Use this endpoint to update usergroup by lookup key. If multiple usergroups with the same lookup key exist, use additional filtering depending on the lookup key to uniquely identify the usergroup (e.g. `source` and `language` for lookup key `source`).
📄️ Bulk Usergroups by source id
The bulk endpoints offer an efficient way of importing/updating large amounts of usergroups with just a single API call. When using the bulk `sourceId` endpoint, the usergroups are identified by `sourceId`, `source` and `language`. If a usergroup doesn't already exist, it will be created. If it does exist, the usergroup found will be updated.
📄️ Bulk Usergroups by Id
The bulk endpoints offer an efficient way of importing/updating large amounts of usergroups with just a single API call. When using the bulk `id` endpoint, the usergroups are identified by `id`. If a usergroup with such `id` doesn't already exist, it will be created. If it does exist, the usergroup found will be updated.
📄️ Search Usergroups
> The usergroups search endpoint is only available on the Propeller cloud version.