Availability
Ask what can be booked before you show times to a customer. The same engine checks every booking, so a time it offers will be accepted unless someone takes it first.
Find open times
/v1/availabilityEvery start time on a grid where all segments fit, with the candidates free at each. Give several resources in a segment for “anyone available”. Give the length on each segment, or once as duration_minutes when everything runs together; then duration_overrides gives candidates who take a different time their own length, and each slot is one possible booking (a start can appear once per length). Pass a booking id in exclude_bookings to search as if it weren’t there, for rescheduling. The grid is the business’s (slot_interval_minutes and slot_alignment on the account) unless the search gives interval_minutes or slot_alignment.
Send the business’s id in Tiempo-Account.
Body parameters
fromtimestamprequiredStart of the window.
totimestamprequiredEnd of the window.
timezonestringIANA name, for example Europe/London.
interval_minutesintegerSpacing of start times. Defaults to the business’s slot_interval_minutes.
slot_alignmentstringmidnight: starts every interval from local midnight. opening: from the start of each stretch of working hours, so a 09:20 opening offers 09:20. A business defaults to midnight; a search, to its business’s.
locationstringA location id.
segmentsarray of objectsrequiredThe time to hold: one entry per resource and period. Segments can be on different resources and needn’t touch.
resourcesarray of stringsrequiredCandidate resource ids in your order of preference; Tiempo takes the first that fits.
offset_minutesintegerMinutes after the start time the segment begins. Defaults to 0.
duration_minutesintegerLength of the segment; or, on a search, one length for every segment when they all run together (then segments give no length or offset).
quantityintegerUnits of capacity to take. Defaults to 1 (for blocks, the whole capacity).
buffer_before_minutesintegerMinutes the resource is also held before the time (travel, setup), 0–1440. On a booking segment it overrides the resource’s default; the appointment’s start and end don’t change.
buffer_after_minutesintegerMinutes the resource is also held after the time (cleanup, turnaround), 0–1440. On a booking segment it overrides the resource’s default. Buffers must fit in working hours and can’t overlap blocks or other bookings.
exclude_bookingsarray of stringsBooking ids to ignore, for example the one being rescheduled.
duration_minutesintegerLength of the segment; or, on a search, one length for every segment when they all run together (then segments give no length or offset).
duration_overridesmapWith duration_minutes on a search: a different length for some candidates of one segment, by resource id (a stylist who’s quicker). The other segments run for the same length as whoever it is.
Get a calendar
/v1/availability/calendarFor each resource over up to 62 days: working hours, blocks, remaining free capacity, and a status per local day (available, fully booked, blocked, not working). Repeat resource for several.
Send the business’s id in Tiempo-Account.
Query parameters
resourcestringOnly those involving this resource. On the calendar, repeat it for several.
fromtimestampOnly those ending after this instant.
totimestampOnly those starting before this instant.
locationstringOnly those at this location.
timezonestringThe timezone of from_date and to_date. Defaults to the business’s (for the calendar, the location’s first).