Create or update a facility
Create or update a single facility, keyed on the externalId you send. An externalId not yet seen for your brokerage creates a facility; one already stored updates it.
This is a whole-record replace, not a partial update. Any field omitted from the body is cleared on an existing facility rather than left as it was. Send the complete record on every call. Posting a facility without notes, for example, erases notes already stored against it.
Body·
required
application/json
- Type: stringexternal
Id max length:255requiredYour identifier for the facility. Used as the upsert key.
- Type: stringnamemax length:255required
- Type:addressProperties: 6
Address as posted. An omitted
countryresolves to US. - Type: stringFormat: emailnullableemail
- Type: stringnullablenotes
- Type: stringnullablephone
Normalized to E.164.
- Type: stringphone
Extension max length:30nullable
Responses
- application/json
- application/json
- application/json
- application/json
- application/json
Request Example for post/v2/facilities
curl https://api.prod.goaugment.com/v2/facilities \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic username:password' \
--data '{
"externalId": "EXP-00142",
"name": "Houston Distribution Center",
"address": {
"street1": "1200 W Loop S",
"street2": "Suite 400",
"city": "Houston",
"stateOrProvince": "TX",
"postalCode": "77027",
"country": "US"
},
"email": "dock@example.com",
"phone": "+17135550100",
"phoneExtension": "204",
"notes": ""
}'
{
"facilityId": "string",
"externalId": "string",
"name": "string",
"address": {
"street1": "string",
"street2": "string",
"city": "string",
"stateOrProvince": "string",
"postalCode": "string",
"country": "string"
},
"email": "string",
"phone": "string",
"phoneExtension": "string",
"notes": "string"
}