Company Bulk Addresses
POST/companies/:lookupKey/:lookupValue/addresses/bulk
Use this endpoint to create multiple company 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
.
Fields
Name | Required |
---|---|
type | yes |
code | yes |
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
Lookup key. Read more about company lookup keys
The value of the key (id or sourceId)
- application/json
Body
Array [
]
addresses
object[]
Responses
- 200
- 400
- 404
Company Bulk Addresses - 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)
- Company Bulk Addresses - 200
Schema
Array [
]
data
object[]
{
"data": [
{
"action": "update",
"id": 106076,
"key": "11234",
"lookupKey": "code",
"success": true
},
{
"action": "create",
"id": 106078,
"key": "11235",
"lookupKey": "code",
"success": true
}
],
"messages": [
"Completed"
],
"total": 2
}
{
"data": [
{
"action": "update",
"id": 106076,
"key": "11234",
"lookupKey": "code",
"success": true
},
{
"action": "create",
"id": 106078,
"key": "11235",
"lookupKey": "code",
"success": true
}
],
"messages": [
"Completed"
],
"total": 2
}
Company Bulk Addresses - 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)
- Company Bulk Addresses - 400 (invalid schema)
Schema
error
object
{
"error": {
"code": 10007,
"messages": [
"#/addresses/0/isDefault: U is not a valid enum value"
],
"moreInfo": "https://www.propel.us/docs/errors/10007",
"status": 400,
"type": "SchemaValidationException"
}
}
{
"error": {
"code": 10007,
"messages": [
"#/addresses/0/isDefault: U is not a valid enum value"
],
"moreInfo": "https://www.propel.us/docs/errors/10007",
"status": 400,
"type": "SchemaValidationException"
}
}
Company Bulk Addresses - 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)
- Company Bulk Addresses - 404
Schema
error
object
{
"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"
}
}