Create Company Address
POST/companies/:lookupKey/:lookupValue/addresses/
Use this endpoint to create an address for a company. If the address is successfully created, the response will include the address id
.
Fields
Name | Required |
---|---|
type | yes |
code | no |
firstName | no |
middleName | no |
lastName | no |
gender | no Default is U |
street | yes |
number | no |
numberExtension | no |
postalCode | no |
city | yes |
country | yes |
region | no |
icp | no Default is N |
phone | no |
mobile | no |
email | no |
company | no |
url | no |
isDefault | no Default is N |
notes | no |
Request
Path Parameters
lookupKey stringrequired
Lookup key. Read more about company lookup keys
lookupValue stringrequired
The value of the key (id or sourceId)
- application/json
Body
city string
code string
company string
country string
email string
firstName string
icp string
isDefault string
lastName string
middleName string
mobile string
notes string
number string
numberExtension string
phone string
postalCode string
region string
street string
type string
url string
Responses
- 201
- 400
- 404
Create Company Address - 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 Address - 201
Schema
data
object
city string
code string
company string
country string
email string
firstName string
icp string
id number
isDefault string
lastName string
middleName string
mobile string
notes string
number string
numberExtension string
phone string
postalCode string
region string
street string
type string
url string
messages string[]
total number
{
"data": {
"city": "Arnhem",
"code": "11234",
"company": "Propel",
"country": "NL",
"email": "miles@propel.us",
"firstName": "Miles",
"icp": "N",
"id": 106076,
"isDefault": "Y",
"lastName": "McCoy",
"middleName": "",
"mobile": "0038975648",
"notes": "Address notes",
"number": "34",
"numberExtension": "A",
"phone": "0032445888",
"postalCode": "6822 DE",
"region": "",
"street": "Noordpad",
"type": "delivery",
"url": "www.propel.us"
},
"messages": [
"Address created"
],
"total": 1
}
{
"data": {
"city": "Arnhem",
"code": "11234",
"company": "Propel",
"country": "NL",
"email": "miles@propel.us",
"firstName": "Miles",
"icp": "N",
"id": 106076,
"isDefault": "Y",
"lastName": "McCoy",
"middleName": "",
"mobile": "0038975648",
"notes": "Address notes",
"number": "34",
"numberExtension": "A",
"phone": "0032445888",
"postalCode": "6822 DE",
"region": "",
"street": "Noordpad",
"type": "delivery",
"url": "www.propel.us"
},
"messages": [
"Address created"
],
"total": 1
}
Create Company Address - 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 Address - 400 (invalid schema)
Schema
error
object
code number
messages string[]
moreInfo string
status number
type string
{
"error": {
"code": 10007,
"messages": [
"#/isDefault: U is not a valid enum value"
],
"moreInfo": "https://www.propel.us/docs/errors/10007",
"status": 400,
"type": "SchemaValidationException"
}
}
{
"error": {
"code": 10007,
"messages": [
"#/isDefault: U is not a valid enum value"
],
"moreInfo": "https://www.propel.us/docs/errors/10007",
"status": 400,
"type": "SchemaValidationException"
}
}
Create Company Address - 404
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 Address - 404
Schema
error
object
code number
messages string[]
moreInfo string
status number
type string
{
"error": {
"code": 40007,
"messages": [
"Parent resource [Company] with id [9484] not found"
],
"moreInfo": "https://www.propel.us/docs/errors/40007",
"status": 404,
"type": "ParentCompanyNotFound"
}
}
{
"error": {
"code": 40007,
"messages": [
"Parent resource [Company] with id [9484] not found"
],
"moreInfo": "https://www.propel.us/docs/errors/40007",
"status": 404,
"type": "ParentCompanyNotFound"
}
}
Loading...