Bulk Usergroups by source id
POST/usergroups/bulk/sourceId
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.
Usergroup Bulk endpoints support bulk change of attributes for multiple usergroups as well. To learn more about Attributes, go here.
Usergroup Bulk endpoints support bulk change of pricing for multiple usergroups as well. To learn more about Pricing, go here.
A single usergroup's attributes can be modified as explained in Bulk resource attribute values by resource lookup key, but if it's needed to modify attributes for multiple usergroups in a single call, this endpoint should be used.
Fields
Name | Required |
---|---|
usergroups (array of usergroup objects) | yes |
source | yes |
sourceId | yes |
name | no |
language | yes |
parent | no |
company | no |
department | no |
office | no |
notes | no |
inheritProductList | no Default is Y |
inheritOrderList | no Default is Y |
budget | no Default is N |
budgetInherit | no Default is Y |
orderListAllowAll | no Default is U |
attributes Read more about attributes | no |
pricing Read more about pricing | no |
addresses Read more about addresses | no |
Directives
Name | Description | Fields |
---|---|---|
skipIfNotEmpty | On update, skip updating fields of an existing usergroup that are not empty | array of field names e.g. name, company etc. |
skipMoveOnUpdate | On update, skip moving an existing usergroup in the parent provided | empty array |
Request
- application/json
Body
Array [
]
Array [
]
directives
object[]
usergroups
object[]
parent
object
Responses
- 200
- 400
Bulk Usergroups by source id - 200
Response Headers
Alt-Svc
string
Via
string
alt-svc
string
content-length
string
date
string
return-format
string
server
string
x-request-id
string
- application/json
- Schema
- Example (from schema)
- Bulk Usergroups by source id - 200
Schema
Array [
]
data
object[]
{
"data": [
{
"action": "update",
"id": 215,
"key": 100001,
"lookupKey": "sourceId",
"success": true
}
],
"messages": [
"Completed"
],
"total": 1
}
{
"data": [
{
"action": "update",
"id": 215,
"key": 100001,
"lookupKey": "sourceId",
"success": true
}
],
"messages": [
"Completed"
],
"total": 1
}
Bulk Usergroups by source id - 400 (invalid schema)
Response Headers
Alt-Svc
string
Via
string
alt-svc
string
content-length
string
date
string
return-format
string
server
string
x-request-id
string
- application/json
- Schema
- Example (from schema)
- Bulk Usergroups by source id - 400 (invalid schema)
Schema
error
object
{
"error": {
"code": 10007,
"messages": [
"#/usergroups/0: required key [sourceId] not found",
"#/usergroups/0: required key [id] not found"
],
"moreInfo": "https://www.propel.us/docs/errors/10007",
"status": 400,
"type": "SchemaValidationException"
}
}
{
"error": {
"code": 10007,
"messages": [
"#/usergroups/0: required key [sourceId] not found",
"#/usergroups/0: required key [id] not found"
],
"moreInfo": "https://www.propel.us/docs/errors/10007",
"status": 400,
"type": "SchemaValidationException"
}
}