Skip to content

Update a service category

Request

Partially updates a service category with a merge-patch body (RFC 7396); application/json is accepted with the same semantics. A missing field is left unchanged, so {} changes nothing; null on name or weight fails with 422 field_not_nullable. The name rules of createServiceCategory apply.

A category managed by its chain fails with 422 field_immutable at /name on a name change; its weight is a setting of this Location and can be changed. Sending the stored value passes. A category of another Location, a deleted category, a service id, a chain category not linked to this Location, or a missing id fails with the same 404 resource_not_found. Another media type fails with 415 unsupported_media_type, broken JSON or a body that is not an object with 400 malformed_request.

Security
OAuth2(Required scopes: services: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.

service_category_idintegerrequired

Identifier of the service category.

Bodyrequired
namestring, [ 1 .. 16000 ] characters

Name of the category. Leading and trailing spaces are trimmed. A link (a URL or any word.word without a space), an empty name and characters outside the Basic Multilingual Plane (emoji) fail with 422. Immutable for a category managed by its chain.

weightinteger, [ 0 .. 2147483647 ]

Display order (higher first).

curl -i -X PATCH \
  'https://developer.alteg.io/_mock/en/b2b-v3/openapi/locations/{location_id}/service_categories/{service_category_id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/merge-patch+json' \
  -d '{
    "name": "Cuts & styling"
  }'

Responses

The updated service category.

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:"service_category"
namestringrequired
chain_idinteger or nullread-onlyrequired

Id of the chain that manages the category; null for a category of this Location alone. A chain category is not accepted by createService or updateService.

weightintegerrequired

Display order the business set in Altegio (higher first). Lists are ordered by id; sort by weight on the client.

Response
{ "id": 205, "object": "service_category", "name": "Cuts & styling", "chain_id": null, "weight": 10 }