When to use
- The brand has no locations recorded yet, or is missing some.
- An address has changed, or a location has closed.
- The brand’s headquarters has moved.
Auth
X-API-Key header or OAuth token. Reading needs any member of the organization
that owns the brand (or any API key of it). Writing needs an OWNER, MANAGER or
EDITOR (or an API key with the EDITOR role or above): a read-only key gets
403. A brand of an organization the caller does not belong to is 404.
Flow
GET .../locations— every location, headquarters first:id,name,address,city,state_province,postal_code,country,is_headquarters,created,modified.POST .../locations— add a location.name,address,city,postal_codeandcountryare required and may not be empty;state_provinceandis_headquartersare optional. Marking it the headquarters clears the flag on the previous one. Returns201.PATCH .../locations/{id}— send only the fields you are changing.null, or an empty required field, is422.DELETE .../locations/{id}— delete the location (204).
Verify
GET .../locationsagain and confirm each location you added or changed reads back with the address you intended, and at most one is the headquarters.- Confirm no location you did not mean to touch changed or disappeared.