Skip to content

Create a service

Request

Creates a service in the Location catalog: a simple service (type: simple) or a package of simple services (type: package with a package block). The response is the new service as getService returns it; the Location header holds its URL.

  • Team Members. A simple service is created without Team Members: link them through updateTeamMemberServices, since a service without a bookable Team Member link does not appear in availability search. A package is linked to every Team Member who provides at least one of its components.
  • Names. A link in name or online_booking_name fails with 422 at the field: Altegio would cut it out of the name. A link is a URL or any word.word without a space, such as Dr.Lash. Without online_booking_name, or with null, the service shows name in online booking. Characters outside the Basic Multilingual Plane (emoji and other 4-byte UTF-8 characters) in name, online_booking_name and online_booking_description fail with 422 at the field.
  • Prices. Integer minor units of the Location currency. Omit price_max_minor for a single price, send null for a "from X" price without an upper bound, or send price_min_minor: 0 with price_max_minor for an "up to Y" price. Altegio stores two decimals: in a currency with three, an amount that is not a multiple of 10 fails with 422 and field code invalid_value. An amount above what Altegio can store fails with 422.
  • Packages. Altegio computes the package duration from its components (parallel: the longest component, otherwise the sum) and, unless pricing_type is manual, the package price.
  • A new service gets weight 0, like one created in Altegio, so it is listed after the services the business has ordered. It is never a group-event service. Permissions on single fields are not checked on creation. When the plan of the Location does not allow switching online booking of services, online_booking_enabled must be false: true, or an omitted field, fails with 422 and field code invalid_value.

A category_id or component service_id that is not listed in this Location fails with the same 422 validation_failed at its pointer, whether it belongs to another Location, is deleted, or does not exist; a chain category (chain_id set) fails the same way. The body must be a JSON object sent as application/json: 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.

Bodyapplication/jsonrequired
typestringrequired

Service kind. Immutable after creation.

Value:"simple"
Example:"simple"
Discriminator
namestring, [ 1 .. 16000 ] charactersrequired

Internal name shown to the business in Altegio. A link (a URL or any word.word without a space, such as Dr.Lash) fails with 422, as do a blank name, a name of 0 alone, and characters outside the Basic Multilingual Plane (emoji).

category_idintegerrequired

A category listed by listServiceCategories in this Location, other than a chain category. Any other id fails with 422 validation_failed at /category_id.

duration_secondsinteger, multiple of 300, [ 0 .. 86400 ]required

Duration in seconds, from 0 to 86400 in 5-minute steps; 0 for a service without a duration.

price_min_minorinteger, [ 0 .. 99999999999999 ]required

Price, or the lower bound of a price range, in integer minor units of the Location currency; 0 for a free service.

online_booking_namestring or null, [ 1 .. 16000 ] characters

Client-facing name for online booking. Omit it or send null to show name; an empty or blank string and 0 alone fail with 422. A link (a URL or any word.word without a space, such as Dr.Lash) fails with 422. Characters outside the Basic Multilingual Plane (emoji) fail with 422.

online_booking_descriptionstring or null, <= 16000 characters

Description of the service for clients in online booking. Plain text. A < must be followed by a space: Altegio treats any other < as the start of an HTML tag and drops everything up to the next >, or to the end of the text, so such a value fails with 422. null or an empty string stores no description. Characters outside the Basic Multilingual Plane (emoji) fail with 422.

online_booking_enabledboolean

Whether clients can book the service online.

Default:true
price_max_minorinteger or null, [ 0 .. 99999999999999 ]

Upper bound of the price in integer minor units. Omit it for a single price (stored equal to price_min_minor); send null for a "from X" price without an upper bound. A value below price_min_minor fails with 422.

curl -i -X POST \
  'https://developer.alteg.io/_mock/en/b2b-v3/openapi/locations/{location_id}/services' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "type": "simple",
    "name": "Men'\''s haircut",
    "online_booking_name": "Haircut for men",
    "online_booking_description": "Wash, cut and styling.",
    "category_id": 205,
    "duration_seconds": 3600,
    "price_min_minor": 250000,
    "price_max_minor": 300000
  }'

Responses

The created service. Location holds its URL, /api/v3/locations/{location_id}/services/{id}.

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"
Locationstring

URL of the created resource.

X-Request-Idstring

Request identifier for support and log correlation.

Bodyapplication/json
idintegerread-onlyrequired
objectstringread-onlyrequired
Value:"service"
typestringrequired

Service kind. Immutable after creation (422 field_immutable). A package service bundles several simple services of the same Location; it appears in the same list and is scheduled by the same service_id.

Default:"simple"
Enum:"simple""package"
namestringrequired

Internal name shown to the business in Altegio, as the business entered it; not translated.

online_booking_namestringrequired

Client-facing name shown in online booking, as the business entered it; equals name when no separate online booking name is set. Not translated.

online_booking_descriptionstring or nullrequired

Description of the service for clients in online booking, as the business entered it in Altegio; plain text. null when there is none.

category_idinteger or nullrequired

Service category (listServiceCategories); null when the category is not listed in this Location.

chain_idinteger or nullread-onlyrequired

Id of the chain that manages the service; null for a service of this Location alone. A chain service is edited in the chain: updateService fails with 422 field_immutable on the fields the chain manages, deleteService with 409 conflict.

duration_secondsintegerrequired

Default duration of the service in seconds (the Location-wide default, 3600 when none is set). For a package, Altegio computes it from the components.

weightintegerread-onlyrequired

Display order the business set in Altegio (higher first). Lists are ordered by id; sort by weight on the client. A service created through createService gets 0, like one created in Altegio.

price_min_minorintegerrequired

Base price of the service in this Location, integer minor units of the Location currency, as set by the business: a single price or the lower bound of a range; 0 for a free service and for an "up to Y" price. For a package, the package price stored in Altegio. Team Member prices by grade can differ.

price_max_minorinteger or nullrequired

Upper bound of the base price, integer minor units of the Location currency. Equals price_min_minor for a single price; greater for a range from price_min_minor to this value, or for an "up to Y" price when price_min_minor is 0; 0 for a free service (both bounds 0); null for a "from X" price without an upper bound (price_min_minor above 0).

currencystringread-onlyrequired

ISO 4217, server-controlled by the Location.

online_booking_enabledbooleanrequired

The business's online booking setting for this service in the Location. It does not mean that free time is available; free slots come from the availability operations.

team_member_idsArray of integersread-onlyrequired

Team Members providing this service. Read-only here; links are written through updateTeamMemberServices.

packageServicePackage (object) or nullrequired
One of:

Package settings and components of a service with type: package.

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

UTC; null when the creation date is not stored.

team_membersArray of objects(ServiceTeamMemberLink)read-only

Settings of each Team Member from team_member_ids for this service. Present only when requested with include[]=team_members.

Response
{ "id": 101, "object": "service", "type": "simple", "name": "Men's haircut", "online_booking_name": "Haircut for men", "online_booking_description": "Wash, cut and styling.", "category_id": 205, "chain_id": null, "duration_seconds": 3600, "weight": 0, "currency": "EUR", "online_booking_enabled": true, "team_member_ids": [], "package": null, "created_at": "2026-11-03T08:00:00Z", "price_min_minor": 250000, "price_max_minor": 300000 }