Bulk Companies by Id
POST/companies/bulk/id
The bulk endpoints offer an efficient way of importing/updating large amounts of companies with just a single API call. When using the bulk id
endpoint, the companies are identified by id
. If a company with such id
doesn't already exist, it will be created. If it does exist, the company found will be updated.
Company bulk endpoints support bulk change of attributes for multiple companies as well. To learn more about Attributes, go here.
Company bulk endpoints support bulk change of pricing for multiple companies as well. To learn more about Pricing, go here.
A single company'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 companies in a single call, this endpoint should be used.
Fields
Name | Required |
---|---|
companies (array of company objects) | yes |
id | yes |
name | no |
language | no |
parent | no |
taxNumber | no |
cocNumber | no |
debtorId | 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 |
sourceId | no |
source | only when sourceId is provided |
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 company that are not empty | array of field names e.g. name, office etc. |
skipMoveOnUpdate | On update, skip moving an existing company in the parent provided | empty array |
Request
- application/json
Body
Array [
]
Array [
]
companies
object[]
parent
object
directives
object[]
Responses
- 200
- 400
Bulk Companies by Id - 200
Response Headers
Alt-Svc
string
Via
string
alt-svc
string
content-length
string
date
string
return-format
string
x-request-id
string
- application/json
- Schema
- Example (from schema)
- Bulk Companies by Id - 200
Schema
Array [
]
data
object[]
{
"data": [
{
"action": "update",
"id": 9482,
"key": 9482,
"lookupKey": "id",
"success": true
}
],
"messages": [
"Completed"
],
"total": 1
}
{
"data": [
{
"action": "update",
"id": 9482,
"key": 9482,
"lookupKey": "id",
"success": true
}
],
"messages": [
"Completed"
],
"total": 1
}
Bulk Companies by Id - 400 (invalid schema)
Response Headers
Alt-Svc
string
Via
string
alt-svc
string
content-length
string
date
string
return-format
string
x-request-id
string
- application/json
- Schema
- Example (from schema)
- Bulk Companies by Id - 400 (invalid schema)
Schema
error
object
{
"error": {
"code": 10007,
"messages": [
"#/companies/0: extraneous key [company] is not permitted"
],
"moreInfo": "https://www.propel.us/docs/errors/10007",
"status": 400,
"type": "SchemaValidationException"
}
}
{
"error": {
"code": 10007,
"messages": [
"#/companies/0: extraneous key [company] is not permitted"
],
"moreInfo": "https://www.propel.us/docs/errors/10007",
"status": 400,
"type": "SchemaValidationException"
}
}