openapi: 3.0.0 info: title: LeanData BookIt ποΈ Availability ποΈ Availability ποΈ Availability API description: Programmatic scheduling, availability lookup, and meeting management for the LeanData BookIt scheduling product. Power custom UIs with server-to-server access to availability, round-robin, and meeting CRUD. version: 1.0.0 servers: - url: https://api.leandata.com tags: - name: ποΈ Availability description: '
The availability endpoints return meeting configuration and open time slots used to render booking pages or refresh availability. Depending on the request context (routing, direct link, or reschedule), the response includes meeting details, eligible hosts, and available time windows.
POST /v1/scheduling/route-and-fetch-availability
POST /v1/scheduling/fetch-availability
Use this endpoint when you want LeanData BookIt to determine the correct routing outcome (who/what should be booked) and return the current availability of determined host.
Common use cases:
First-time booking when routing is required
Agentic flows that need to decide who to book and when
Generating a token that can be reused to refresh availability without re-running routing
Notes:
token that can be passed to POST /v1/scheduling/fetch-availability to refetch availability without triggering routing again.Before sending form data to the BookIt API, ensure the following requirements are met:
Requirement:
Specifications:
Format: Universally Unique Identifier (UUID)
Example: c149cd78-377c-4549-ae62-3910ebe3b6ed
Generation: Can be arbitrarily created by your system
Integration: Must be populated on the prospect''s Salesforce record through your marketing automation platform, preferably simultaenously as your first BookIt API callout.
βοΈ Note: if a prospect submits multiple times, each subsequent Log ID must replace the previous ID in Salesforce.
βοΈIf you are using Marketo as your Marketing Automation, please reach out to your LeanData team.
Best Practices:
Use a reliable UUID generation method to ensure uniqueness
Validate the ID format before submission
triggerNode (required) β A string value that contains the name of your Trigger Node in the BookIt Flowbuilder. This value must exactly match the configured Trigger Node name in the LeanData application.
uid (required) β A string value that contains your BookIt Unique Log ID.
prospect (required) β An object that contains all prospect data required for routing and availability retrieval.
β οΈ Important: The fields included inside the prospect object must exactly match the input field definitions returned by the /v1/scheduling/retrieve-inputs endpoint.
Field names are case-sensitive and must be passed exactly as returned in the inputs[].name response.
Field values must match the corresponding inputs[].type response.
Missing required fields may result in routing failure or incomplete availability results.
βοΈAvailability data is returned only when routing.responseType = "calendar"****.
If responseType is "redirect" or "none", the scheduling object will be null, and no availability data will be returned. Always check routing.responseType before accessing scheduling data.
routing β An object that contains the routing outcome determined by the BookIt routing graph.
responseType β A string that indicates the routing outcome determined by the BookIt routing graph. Possible values are:
"calendar" β The routing graph reached a "Schedule" node. Encrypted scheduling parameters are returned in the token field.
"redirect" β The routing graph reached a "Redirect to URL" node. A redirect URL is returned in the redirect field.
"none" β The routing graph reached an "End of Flow" node. No scheduling or redirect data is returned. This can be used to trigger a fallback experience in your UI.
token (optional) β A string value that is used to refresh availability without re-running routing.
routing.responseType is "calendar".calendarLink (optional) β A string containing the URL that renders the hosted LeanData BookIt scheduling page. Use this link if you prefer to leverage LeanDataβs native scheduling UI instead of building a custom booking experience using the scheduling object. Redirecting a user to this URL will load the full BookIt calendar experience.
routing.responseType is "calendar".redirect (optional) β A string containing the URL configured in the "Redirect to URL" node of the BookIt routing graph.
Only present when responseType is "redirect".
Redirect users to this URL to continue the scheduling process as defined by your routing configuration.
scheduling (optional) β An object (or null) that contains the full scheduling page configuration and availability data required to render a booking experience.
Present only when routing.responseType = "calendar".
Returns null when responseType is "redirect" or "none".
β οΈ Note: All data in the scheduling object is sourced directly from the Meeting Type configuration in the LeanData application (and related LeanData configuration). Any updates or changes to this information must be made in LeanData. This data cannot be modified through the API.
meeting β An object that contains metadata about the meeting type.
name β A string that contains the name of the meeting type.
duration β An object that describes the meeting duration.
unit β A string that represents the time unit (e.g., min).
value β A number that represents the duration value.
formFields β An array of form field objects that represent the input fields required to finalize the booking of the meeting. These form fields should appear on the final confirmation screen before the meeting is booked.
β οΈ Important: You must send back values for all defined fields when booking a meeting.
name β A string of the Field label.
type β A string that represents the input type (e.g., text)
required β A boolean that signifies whether a field is mandatory. This value is based on the settings defined in the Meeting Type configuration.
description β A string that contains the calendar event description
pageStyle β An object that defines branding settings for the scheduling page. This is set in the LeanData application.
styleColor β A string representing the primary hex color code used to theme UI elements (e.g. buttons, highlights) on the scheduling page.
logo β A string representing the URL of the company logo (uploaded in the LeanData application) to be displayed on the scheduling page. If empty, no logo was uploaded to the application.
pageInfo β An object that contains general page metadata.
displayAllPoolAvailability β A boolean/null that indicates to show all availability for all pool members. If this value is true, then you will need to use the /v1/round-robin-meeting endpoint to book the meeting.
userIds β An array that contains user IDs involved in the meeting (hosts or pool members). This array can be used to display representative names on the scheduling calendar.
prefillFields β An object that contains form submission data for the prospect, specifically their "First Name", "Last Name", and "Email". These values can be used to pre-populate the prospect''s information before finalizing the meeting booking.
availability β An object that contains available time slots and a mapping of user indices to user IDs.
βοΈNote: If this object is empty, then this is an indicator that either the meeting type expired or there are no availability in the pool (e.g. all members are on vacations). In this scenario, please revert to your fallback experience.
indexToUserIdMap β An object that maps numeric indices (used in timeSlots.users) to user IDs from the userIdToInfoMap object.
timeSlots β An array of time slot objects that represent available meeting windows. You can use this data to render available times on your scheduling UI.
start_time β A number that represents the start time in Unix epoch milliseconds.
end_time β A number that represents the end time in Unix epoch milliseconds.
users β An array of numbers that reference user indices from indexToUserIdMap. These represent the users who are available during this time slot.
indexToUserIdMap) as part of the request payload when booking the meeting.userIdToInfoMap β An object that maps user IDs to user-specific details used for scheduling.
βοΈNote: The information in userIdToInfoMap is not required to build the core calendar UI. It is provided as supplementary context.
[userId] β An object where each key is a user ID and each value is a user object.
FirstName β A string that represents the user''s first name.
LastName β A string that represents the user''s last name.
Email β A string that represents the user''s email address.
TimeZoneSidKey β A string that represents the user''s primary time zone, using the IANA Time Zone Database format. (e.g. America/Los_Angeles)
ConferenceLink β A string that represents the user''s conferencing URL
Use this endpoint to:
refresh times after routing, using the token returned by v1/scheduling/route-and-fetch-availability to refetch availability without re-running routing
fetch availability for single-meeting-type BookIt Links only by passing the linkId
reschedule flow: pass meetingId to fetch availability for rescheduling an existing meeting
βοΈ Important: The request body must include exactly one of the following parameters:
token β A string value returned by the /v1/scheduling/route-and-fetch-availability endpoint.
Use this parameter to refresh availability after routing and before a meeting has been booked. This token represents the previously computed routing + scheduling context.
β οΈ The token is valid only until a meeting is successfully booked for that routed outcome.
If a meeting has already been created, the token can no longer be used.
For rescheduling a booked meeting, use meetingId instead.
When token is provided, linkId and meetingId must not be included.
linkId β A string that represents the ID of a single-meeting-type BookIt Link.
Use this parameter to fetch availability for standalone BookIt Links.
This value is derived from the BookIt Link URL and corresponds to the path segment immediately following /l/. For example, given the BookIt Link https://leandata.my.leandata.com/l/Lw5mjKK, the linkId is Lw5mjKK.
When linkId is provided, token and meetingId must not be included.
meetingId β A string that represents the ID of an existing scheduled meeting.
Use this parameter to fetch updated availability after a meeting has already been booked, for use in a reschedule flow.
This returns updated availability for the meetingβs associated meeting type and host(s).
When meetingId is provided, token and linkId must not be included.
The response structure varies depending on whether the request used token, linkId, or meetingId.
pageInfo Propertiesmeeting Objectavailability ObjecttimeSlots Structure