Account locations
In addition to the primary location, an account may have any number of additional locations.
Querying for account locations
Use the following endpoints to retrieve information about locations for a specific account:
- GET
/accounts/{accountId}/locations
- GET
/accounts/{accountId}/locations/{locationId}
Creating account locations
Use the following endpoint to create an AccountLocation for a given account:
- POST
/accounts/{accountId}/locations
Minimum creation criteria
The required information for a location varies based on the locale. For example, for US locations, the minimum amount of information you must specify is:
addressLine1
city
state
postalCode
For example, the following request creates a new location for account pc:202.
POST /account/v1/accounts/pc:202/locations
{
"data": {
"attributes": {
"addressLine1": "2870 S. Delaware St.",
"city": "San Mateo",
"postalCode": "94403",
"state": {
"code": "CA"
}
}
}
}
Modifying account locations
Use the following endpoints to modify an account location:
- PATCH
/accounts/{accountId}/locations/{locationId}
For example, the following request assigns a location name for account location pc:717 on account pc:202.
POST /account/v1/accounts/pc:202/contacts/pc:717
{
"data": {
"attributes": {
"locationName": "Employee parking lot"
}
}
}