Create Company
POST/companies/
Use this endpoint to create a single company. If a company is successfully created, the response will include the usergroup id
.
Fields
Name | Required |
---|---|
name | no |
language | no |
parent | no |
taxNumber | no |
cocNumber | no |
debtorId | no |
phone | no |
email | 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 |
Request
- application/json
Body
budget string
budgetInherit string
cocNumber number
debtorId string
inheritOrderList string
inheritProductList string
language string
name string
notes string
parent
object
id number
taxNumber string
Responses
- 201
- 400
Create Company - 201
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)
- Create Company - 201
Schema
data
object
budget string
budgetInherit string
cocNumber string
debtorId string
id number
inheritOrderList string
inheritProductList string
language string
name string
notes string
parent
object
id number
taxNumber string
messages string[]
total number
{
"data": {
"budget": "N",
"budgetInherit": "N",
"cocNumber": "75564998",
"debtorId": "75564998",
"id": 151,
"inheritOrderList": "N",
"inheritProductList": "Y",
"language": "NL",
"name": "Propeller B.V.",
"notes": "Company created from API",
"parent": {
"id": 209
},
"taxNumber": "NL860325386B01"
},
"messages": [
"Company created"
],
"total": 1
}
{
"data": {
"budget": "N",
"budgetInherit": "N",
"cocNumber": "75564998",
"debtorId": "75564998",
"id": 151,
"inheritOrderList": "N",
"inheritProductList": "Y",
"language": "NL",
"name": "Propeller B.V.",
"notes": "Company created from API",
"parent": {
"id": 209
},
"taxNumber": "NL860325386B01"
},
"messages": [
"Company created"
],
"total": 1
}
Create Company - 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)
- Create Company - 400 (invalid schema)
Schema
error
object
code number
messages string[]
moreInfo string
status number
type string
{
"error": {
"code": 10007,
"messages": [
"#/cocNumber: expected type: String, found: Integer"
],
"moreInfo": "https://www.propel.us/docs/errors/10007",
"status": 400,
"type": "SchemaValidationException"
}
}
{
"error": {
"code": 10007,
"messages": [
"#/cocNumber: expected type: String, found: Integer"
],
"moreInfo": "https://www.propel.us/docs/errors/10007",
"status": 400,
"type": "SchemaValidationException"
}
}
Loading...