openapi: 3.0.0 info: title: LeanData BookIt 🗓️ Availability 🗓️ Availability One Time Routing 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: One Time Routing description: '
This section describes the endpoints used to trigger 1x Routing for creating a custom orchestration experience, as well as to retrieve the status of the resulting job. When invoked, the 1x Routing endpoint returns basic job metadata—including the jobId—which can be used to check the job’s status.
orchestration/v1/one-time-routing — Use this endpoint to invoke 1x routing for a particular SFDC org
orchestration/v1/one-time-routing/:jobId — Use this endpoint to retrieve the job status of a 1x routing for a particular SFDC org
❗️ Important: The API does not validate FlowBuilder graphs before triggering routing. If you invoke 1x Routing to an invalid or misconfigured graph, the request will still be processed—but routing will fail silently. No error response will be returned from the API.
âś… To avoid unexpected behavior, please ensure the graph is valid and functioning as expected within the LeanData application before using it in API-triggered routing.
Endpoint: POST https://api.leandata.com/orchestration/v1/one-time-routing
❗️ Important: The API does not validate FlowBuilder graphs before triggering routing. If you invoke 1x Routing to an invalid or misconfigured graph, the request will still be processed—but routing will fail silently. No error response will be returned from the API.
âś… To avoid unexpected behavior, please ensure the graph is valid and functioning as expected within the LeanData application before using it in API-triggered routing.
x-api-key (required) — Your unique API key for authentication.
Content-Type (required) — Must be application/json.
objectType (required) — A string value representing the type of object to route (e.g., "Lead", "Contact", "Opportunity"). This must correspond to an object type configured in your LeanData instance.
condition (required) — A string value containing a SOQL (Salesforce Object Query Language) WHERE clause to find the object(s) to be routed. For example: Id = ''00Q5f000006KnPbEAK'' or Status = ''New Lead''.
graphName (required if graphId is not provided) — A string value that is the exact name of the routing graph (configured in the LeanData Flowbuilder) to use for this one-time routing operation. If graphId is provided, graphName is ignored, even if included in the request.
graphId (required if graphName is not provided) — string value representing the unique ID of the routing graph to use for this one-time routing operation. If both graphId and graphName are provided, graphId is utilized and graphName is ignored.
notificationsDisabled (required) — A boolean value. When true, all notifications (e.g., email alerts, Slack messages, MSFT messages, etc) that are configured within the specified routing graph will be suppressed for this one-time routing execution. Set to false to allow notifications.
nodeType (required) — A string value representing the entry point type for the routing graph. Common values include ''TRIGGER'' (for standard trigger-based routing) or ''UPDATE TRIGGER'' (for routing based on updates to an object).
edgeName (required) — A string value that is the name of the specific edge (transition) from the Trigger Node within the specified routing graph that should be followed as the starting point for this one-time routing. For example: ''Lead is MQL''.
allowDedupe (optional) — A boolean value. If true, LeanData''s deduplication logic will be applied to prevent duplicate record processing during routing. Defaults to false if not provided.
businessUnitId (optional) — A string value or null. This is the unique identifier of a specific business unit graph to route the object(s) through. This is useful for routing within a specific organizational segment. Defaults to null (no specific business unit filter) if not provided. If Multi-Graph is enabled for objectType, businessUnitId is required.
orderBy (optional) — A string value containing a SOQL ORDER BY clause to sort the records found by the condition. For example: "CreatedDate DESC" to process newer records first.
queryLimit (optional) — A number value that limits the number of records found by the condition that will be routed. Useful for testing or processing smaller batches. If omitted, all records matching the condition will be considered.
respectSchedules (optional) — A boolean value. When true, records will only be routed to users who are currently available according to their configured schedules within LeanData. If false, scheduling availability will be ignored. Defaults to false if not provided.
sendEmail (optional) - A boolean value. When true, sends an email to the job owner (in this case, the Routing token user) when 1x Routing is completed.
The response is a JSON string containing a result object, which provides details about the initiated one-time routing job:
condition — A string value that is the SOQL condition that was used to select the objects for routing.
nRecords — A string value representing the number of records that were found by the routing job.
jobId — A string value that is the unique identifier for the asynchronous one-time routing job. You can use this ID to query for the status of the job if such an endpoint is available.
objectType — A string value indicating the type of object that was routed.
Endpoint: GET https://api.leandata.com/orchestration/v1/one-time-routing/:jobId
This endpoint is used to obtain the status of a One-Time Routing job.
đź’ˇ The :jobId path parameter should be replaced with the unique ID of the One-Time Routing job you want to read.
x-api-key (required) — Your unique API key for authentication.result — An object that contains metadata about the status of the One-Time Routing job.
completedAt — Timestamp of the job''s completion.
successCount — A string value representing the number of records that were successfully processed by the routing job.
nRecords — A string value representing the number of records that were found by the routing job.
status — A string value representing the status of the One-Time Routing job. Because the API does not validate FlowBuilder graphs, invalid graphs will be marked as "Complete".
"Complete"
"Complete with Errors"
"Canceled"
"Failed"
"Processing"
jobId — A string value that is the unique identifier for the asynchronous One-Time Routing job. You can use this ID to query for the status of the job if such an endpoint is available.