https://api.[tenant].getomneo.com/api/v3.
Create a definition
Send aPOST to /appointment-definitions. Only handle, name, duration_minutes, and booking_type are required. Everything else has a default or can be added later.
201 with the saved definition, including its generated id. Use that id on the nested endpoints below and as appointment_definition_id when creating appointments.
Field reference
min_lead_minutes, max_advance_days, the buffers, and the opening hours together define which slots the availability endpoints return.
Booking type and capability flags
booking_type sets how customers book against the definition.
Independent capability flags layer on top of the booking type.
Set
max_concurrent_bookings to null for group services with no fixed cap, such as a class or an event. Leave it unset or null unless the service has a real per-slot limit.Opening hours
A definition carries two sets of hours, both scoped to the definition itself.- Normal hours are the weekly pattern, one entry per
day_of_week. - Special hours are dated overrides such as public holidays or a one-off change. A special hour takes precedence over the normal hour when a date matches.
day_of_week accepts MON, TUE, WED, THU, FRI, SAT, or SUN. Times such as available_from are plain local times at the location. Each nested collection also supports GET, and each entry supports PUT and DELETE at .../normal-hours/{id} and .../special-hours/{id}.
Locations and staff
A definition is offered at one or more locations and, when it requires staff, draws from a staff pool. Attach both on create withlocation_ids and staff_ids:
Both collections support
GET, and each attachment supports PUT and DELETE at .../locations/{id} and .../staff/{id}.
Where staff come from depends on use_staff_from_location:
When
use_staff_from_location is true, you do not attach staff to the definition. Availability draws from the location’s staff for the requested date. When it is false, attach the staff explicitly; their own hours still gate availability.Booking questionnaire
To capture answers at booking, attach a booking questionnaire. Send abooking_questionnaire object on the definition, either inline as a new questionnaire or by referencing an existing questionnaire’s questions.
question_id, question_handle, or a specific question_version_id. Group questions into pages when the form needs sections. Omneo pins the questionnaire by version, so a booked appointment keeps the form version that was active when it was booked.
Each slot needs a mapping_key: the slot’s name inside the form, written in lowercase letters, digits, and underscores only, and unique across the whole booking_questionnaire payload, including across pages. It is the variable name a slot’s visibility_condition reads, as answers.<mapping_key>. It does not decide where the answer is written, which comes from the Question’s link_type and link_target. See Slot keys.
For how questions and questionnaires are built and how answers are routed, see Building questionnaires and the Questionnaires concept.
Notification targets
A definition can send a notification for each lifecycle event by pointing at a Target and setting an offset. Each event has a target field and a matching pair of offset fields in days and hours.Visibility conditions
To control which definitions a Profile sees in a customer-facing booking flow, set avisibility_condition: a JsonLogic rule evaluated against the requesting Profile’s attributes.
visibility_condition evaluates to true for that Profile. A null visibility_condition never passes the check, so a definition with null is excluded from the visibility endpoint. To make a definition visible to every qualifying Profile, use a rule that always returns true, such as {"==": [1, 1]}. See Visibility conditions in the concept for how the rule is evaluated.
Publishing a definition
Two flags control whether a definition is live.filter[is_published]=1&filter[is_archived]=0 to fetch only live definitions.
The definition resource
AGET /appointment-definitions/{definitionId} returns the full definition wrapped in a data object: every configured field, a has_booking_questionnaire flag, and the loaded normal_hours, special_hours, locations, staff, and booking_questionnaire relations.
booking_type, the capability flags, the notification targets and offsets, visibility_condition, is_published, is_archived, and meta, plus created_at and updated_at in UTC. The relations below are loaded on the read.
End-to-end example: build and publish a definition
Build a definition in a draft state, configure it through the nested endpoints, then publish it once it is complete.1
Create a draft
201 with the generated id. Configure everything else while is_published is false.2
Add opening hours
special-hours for holidays.3
Attach the booking questionnaire and notifications
4
Publish
normal_hours, locations, staff, and booking_questionnaire are all in place before customers can book.Errors
Edge cases and gotchas
max_concurrent_bookings: nullmeans unlimited. Leave itnullfor group services with no per-slot cap. Set an integer only when a slot has a real limit. It has no effect on staff-required definitions, where capacity is one per staff member per slot.customer_must_select_staffneedsrequires_staff. The customer can only be forced to pick a staff member on a definition that assigns staff, so setrequires_staff: trueas well.- Opening hours are plain local times.
available_fromandavailable_untilare local to the location’s timezone and carry no timezone themselves, unlike appointment datetimes, which are stored in UTC. - Special hours win. When a date matches both a normal-hours day and a special-hours entry, the special hour takes precedence for that date.
- Booking questionnaires are pinned by version. A booked appointment keeps the questionnaire version that was active at booking, so editing the form later never rewrites historical answers.
- A
nullvisibility_conditionis excluded. Such a definition never passes the profile-scoped visibility check. Use{"==": [1, 1]}to make it visible to every qualifying Profile.
Related
- Appointments concept
- Working with appointments
- Walk-in queues and waitlists
- Building questionnaires
- Targets
- Add appointment definition API
- Browse appointment definitions API
- Add appointment definition normal hour API
- Add appointment definition staff API
- Browse available appointment slots API
- Browse available appointment staff API
- Browse visible appointment definitions API