Skip to content

Update a location

Request

Partially updates partner-relevant Location settings with a merge-patch body. Requires If-Match with the ETag from a previous read.

timezone, country, and currency are read-only and intentionally absent from the update schema — they follow city_id. Changing city_id to a city that would alter the country or currency is rejected with 422 immutable_after_finance once financial data exists for the Location; before that the move is allowed and the derived values follow.

Security
OAuth2(Required scopes: locations:write) or RestrictedKey
Path
location_idintegerrequired

Identifier of the Location. Verified against the credential on every call — a Location the credential cannot access responds with 404.

Headers
If-Matchstringrequired

ETag value of the resource version the change is based on. A stale value fails with 412 stale_version; a missing header fails with 428 precondition_required.

Bodyapplication/merge-patch+jsonrequired
namestring
descriptionstring or null
business_type_idinteger or null
addressstring or null
coordinatesobject or null
phonesArray of strings
sitestring or null
city_idinteger

New city in the same country.

languagestring

BCP 47 language tag.

datetime_formatstring
unique_visit_time_intervalinteger

Visit grouping interval in seconds: -1 groups all appointments of the day, 0 keeps each appointment separate, positive values group by interval.

curl -i -X PATCH \
  'https://developer.alteg.io/_mock/en/b2b-v3/openapi/locations/{location_id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/merge-patch+json' \
  -H 'If-Match: string' \
  -d '{
    "name": "Lisbon Center",
    "phones": [
      "+351210000000"
    ]
  }'

Responses

The updated Location.

Headers
RateLimit-Remaininginteger, (int32), >= 0

Requests left in the most constrained policy window that applies to this request.

RateLimit-Resetinteger, (int32), >= 0

On 429, seconds until the most constrained policy frees up; it equals Retry-After there. On a successful response it reports the length of that policy's window rather than the time left in the current one, so treat it as the window size, not as a countdown — the counter to pace against is RateLimit-Remaining.

RateLimit-Policystring

Most constrained policy applied to the request, as <limit>;w=<window in seconds>.

Example:"10;w=60"
ETagstring

Version tag of the returned resource. Send it back in If-Match on the next PATCH or DELETE.

X-Request-Idstring

Request identifier for support and log correlation.

Bodyapplication/json
idintegerread-onlyrequired
objectstringread-onlyrequired
Value:"location"
namestringrequired
timezonestringread-onlyrequired

Canonical IANA timezone of the Location (e.g. Europe/Lisbon).

country_codestringread-onlyrequired

ISO 3166-1 alpha-2 country code. Derived from city.

currencystringread-onlyrequired

ISO 4217 currency of the Location. Server-controlled.

city_idintegerrequired

City dictionary id.

languagestringrequired

BCP 47 language tag.

datetime_formatstringrequired
unique_visit_time_intervalintegerrequired

Visit grouping interval in seconds: -1 groups all appointments of the day, 0 keeps each appointment separate, positive values group by interval.

descriptionstring or null
business_type_idinteger or null

Business category of the Location.

addressstring or null
coordinatesobject or null
phonesArray of strings

Business contact phone numbers in international format.

sitestring or null
created_atstring, (date-time)read-only

UTC.

updated_atstring, (date-time)read-only

UTC.

Response
{ "id": 4321, "object": "location", "name": "Demo Beauty Studio Lisbon", "description": null, "business_type_id": 1, "address": "Av. da Liberdade 100, Lisbon", "coordinates": { "latitude": 38.7223, "longitude": -9.1393 }, "phones": [ "+351210000000" ], "site": "https://demo.example.com", "timezone": "Europe/Lisbon", "currency": "EUR", "created_at": "2025-01-15T10:00:00Z", "updated_at": "2026-07-01T08:00:00Z", "city_id": 6201, "language": "en-PT", "datetime_format": "DD.MM.YYYY HH:mm", "unique_visit_time_interval": 0, "country_code": "PT" }