Skip to content

Update a location

Request

Partially updates the Location's name, description, address, coordinates, phones, site, and city with a merge-patch body. Returns the same Location representation as getLocation.

city_id must identify an existing, non-deleted, non-hidden city in the Location's current country. An unknown or unavailable city, or a city in another country, fails with 422 validation_failed, field code invalid_value, pointer /city_id. Changing the city preserves timezone, country_code, and currency, including an existing timezone override. Cross-country moves are not supported, even before financial data exists; this operation does not return immutable_after_finance.

Requires the acting user's Location edit access, settings access, and information settings access, the same access the Altegio Information settings page requires. Every field, including city_id, needs only these permissions.

Omitted fields are unchanged. null clears only description, address, site, and coordinates; null for name, phones, or city_id fails with 422 field_not_nullable, with the same field code and its pointer in errors[]. Use [] to clear phones. Unknown fields, including business_type_id, language, datetime_format, timezone, country_code, and currency, fail with 422 validation_failed, field code unknown_field. Both request media types use these merge-patch rules.

The patch is atomic. An empty object or unchanged effective values returns 200 without writes, events, or webhooks. A changed patch emits one company update webhook after commit. This preview does not require If-Match or Idempotency-Key.

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

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

Bodyrequired
namestring, [ 1 .. 100 ] characters^[\u0000-\uD7FF\uE000-\uFFFF]*$

Trimmed before storing; must remain non-empty. As in v1, links are stripped when the Location has never paid and the acting user is not linked to a paid Location. A name left blank by trimming or link removal is rejected.

descriptionstring or null, <= 65535 characters^[\u0000-\uD7FF\uE000-\uFFFF]*$

HTML fragment, sanitized with the same rules as the Altegio editor. Untrusted on read; sanitize before rendering. null or an empty string clears it. The input and sanitized stored value must each fit 65535 UTF-8 bytes.

addressstring or null, <= 400 characters^[\u0000-\uD7FF\uE000-\uFFFF]*$

Links are stripped as in Altegio settings. null clears the address.

coordinatesobject or null

Send both coordinates together. Each value is rounded to eight decimal places when stored. null clears both coordinates. The stored pair zero/zero is represented as null on read; a single zero coordinate is valid.

phonesArray of strings, <= 4 items

E.164 numbers, validated with the same phone parser as getLocation. An invalid number fails the whole patch with 422 validation_failed, field code invalid_value, at /phones/<index>. Order and duplicates are preserved. [] clears the array; null is rejected.

sitestring or null, <= 65535 characters^[\u0000-\uD7FF\uE000-\uFFFF]*$

Stored as supplied, including a protocol when present, as in Altegio settings. No URL scheme is required. Must fit 65535 UTF-8 bytes. null clears it.

city_idinteger, [ 1 .. 4294967295 ]

Existing, non-deleted, non-hidden city in the Location's current country. Changing it preserves the timezone, country, and currency.

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' \
  -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"
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.

descriptionstring or nullrequired

HTML fragment as entered in the Altegio editor; untrusted, sanitize it before rendering. null when empty.

business_type_idinteger or nullrequired

Business category of the Location.

addressstring or nullrequired
coordinatesobject or nullrequired
phonesArray of stringsrequired

Business contact phone numbers in E.164 (+ and digits, no separators). Numbers that cannot be parsed as E.164 are omitted.

sitestring or nullrequired
created_atstring or null, (date-time)read-onlyrequired

UTC; null when the creation date is not stored.

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", "city_id": 6201, "country_code": "PT" }