Get the routing trace for a booking
curl --request GET \
--url https://api.cal.com/v2/bookings/{bookingUid}/routing-trace \
--header 'Authorization: <authorization>' \
--header 'cal-api-version: <cal-api-version>'import requests
url = "https://api.cal.com/v2/bookings/{bookingUid}/routing-trace"
headers = {
"cal-api-version": "<cal-api-version>",
"Authorization": "<authorization>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'cal-api-version': '<cal-api-version>', Authorization: '<authorization>'}
};
fetch('https://api.cal.com/v2/bookings/{bookingUid}/routing-trace', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cal.com/v2/bookings/{bookingUid}/routing-trace",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"cal-api-version: <cal-api-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cal.com/v2/bookings/{bookingUid}/routing-trace"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cal-api-version", "<cal-api-version>")
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cal.com/v2/bookings/{bookingUid}/routing-trace")
.header("cal-api-version", "<cal-api-version>")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cal.com/v2/bookings/{bookingUid}/routing-trace")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cal-api-version"] = '<cal-api-version>'
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"steps": [
{
"message": "Account found by website match: acme.com",
"round": "Exact Match",
"domain": "salesforce",
"step": "account_found_by_website",
"timestamp": 1717000000000,
"data": {}
}
],
"groups": [
{
"round": "Exact Match",
"domain": "salesforce",
"steps": [
{
"message": "Account found by website match: acme.com",
"round": "Exact Match",
"domain": "salesforce",
"step": "account_found_by_website",
"timestamp": 1717000000000,
"data": {}
}
]
}
],
"formSubmission": {
"form": {
"name": "Sales Routing Form",
"description": "Routes leads to the right sales rep"
},
"responses": [
{
"fieldId": "Company Size",
"label": "Company Size",
"displayValue": "Enterprise (1000+)"
}
]
}
}
}Bookings
Get the routing trace for a booking
Retrieve the step-by-step routing trace for a booking identified by its UID. Shows how the booking was routed through routing forms, CRM lookups, and host selection logic.
Returns presented (human-readable) trace steps grouped by routing round, along with the routing form submission if one was used.
If no routing trace exists for the booking, empty steps and groups are returned.
The cal-api-version header is required for this endpoint.
If accessed using an OAuth access token, the BOOKING_READ scope is required.
GET
/
v2
/
bookings
/
{bookingUid}
/
routing-trace
Get the routing trace for a booking
curl --request GET \
--url https://api.cal.com/v2/bookings/{bookingUid}/routing-trace \
--header 'Authorization: <authorization>' \
--header 'cal-api-version: <cal-api-version>'import requests
url = "https://api.cal.com/v2/bookings/{bookingUid}/routing-trace"
headers = {
"cal-api-version": "<cal-api-version>",
"Authorization": "<authorization>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'cal-api-version': '<cal-api-version>', Authorization: '<authorization>'}
};
fetch('https://api.cal.com/v2/bookings/{bookingUid}/routing-trace', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cal.com/v2/bookings/{bookingUid}/routing-trace",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"cal-api-version: <cal-api-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cal.com/v2/bookings/{bookingUid}/routing-trace"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cal-api-version", "<cal-api-version>")
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cal.com/v2/bookings/{bookingUid}/routing-trace")
.header("cal-api-version", "<cal-api-version>")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cal.com/v2/bookings/{bookingUid}/routing-trace")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cal-api-version"] = '<cal-api-version>'
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"steps": [
{
"message": "Account found by website match: acme.com",
"round": "Exact Match",
"domain": "salesforce",
"step": "account_found_by_website",
"timestamp": 1717000000000,
"data": {}
}
],
"groups": [
{
"round": "Exact Match",
"domain": "salesforce",
"steps": [
{
"message": "Account found by website match: acme.com",
"round": "Exact Match",
"domain": "salesforce",
"step": "account_found_by_website",
"timestamp": 1717000000000,
"data": {}
}
]
}
],
"formSubmission": {
"form": {
"name": "Sales Routing Form",
"description": "Routes leads to the right sales rep"
},
"responses": [
{
"fieldId": "Company Size",
"label": "Company Size",
"displayValue": "Enterprise (1000+)"
}
]
}
}
}Headers
Must be set to 2024-08-13 or later.
Example:
"2024-08-13"
value must be Bearer <token> where <token> is api key prefixed with cal_, managed user access token, or OAuth access token
Path Parameters
Was this page helpful?
⌘I