v1Resources/Locations/postCreate a location

Create a location

Creates a new location for an existing client and submits it for publishing.

post/api/v1/locations
locations:write
Request body
clientIdstringrequired
ID of the client to create this location under. Look it up with GET /api/v1/clients.
namestringrequired
The location's business name.
countryIsostringrequired
ISO country code, e.g. US.
streetstringrequired
Street address.
street1stringoptional
Street address, line 2.
citystringrequired
City.
stateIsostringrequired
State or region code.
postalCodestringrequired
Postal or ZIP code.
phonestringoptional
Phone number.
additionalPhonesarray of stringoptional
Any additional phone numbers beyond the primary one.
websitestringoptional
Website URL.
categoryIdstringoptional
General category id — look it up with GET /api/v1/locations/categories.
categoryNamestringoptional
General category display name.
publisherCategoriesobjectoptional
Per-publisher categories, one per publisher, each an { id, name } looked up via GET /api/v1/locations/publisher-categories.
googleobjectoptional
idstringoptional
namestringoptional
facebookobjectoptional
idstringoptional
namestringoptional
appleobjectoptional
idstringoptional
namestringoptional
bingobjectoptional
idstringoptional
namestringoptional
additionalCategoriesarray of objectoptional
Up to 9 extra categories, each an { id?, name }. A bare name is accepted and its id is resolved from the category catalog where one matches. Look up ids yourself with GET /api/v1/locations/categories.
idstringoptional
namestringoptional
descriptionstringoptional
A short description of the business.
tagsarray of stringoptional
Internal tags for your own organization — not shown publicly.
latitudenumberoptional
Latitude, in decimal degrees. Derived automatically from the address if omitted.
longitudenumberoptional
Longitude, in decimal degrees. Derived automatically from the address if omitted.
customFieldsobjectoptional
Custom field values to set on this location, keyed by field id.
Response
dataobjectoptional
locationIdstringoptional
ID of the newly created location.
Errors
401Missing, invalid, expired, or revoked API key.
403The key lacks the required scope, or isn't authorized for this client/location.
404The resource wasn't found, or doesn't belong to your agency.
422The request is missing a required parameter or is otherwise malformed.
429Too many requests. Retry after the number of seconds in the Retry-After header.
post/api/v1/locations
Your API key
Request body*
{
  "data": {
    "locationId": "loc_456"
  }
}