Skip to content

Derive Booking Url

POST
/api/v1/booking-urls
agent-data call bd63936c-8611-45a8-8ad8-083aa4c51aa9 derive-booking-url --booking_token <booking_token>

Generate a booking URL for an offer. Send the offer’s booking_token; the response contains a link to a third-party page where the trip can be booked. This endpoint calls the source directly and typically returns in 2-6 seconds, so call it only for the offer the user actually wants to book. Booking tokens start with “bk_”, stay valid for about 30 minutes, and stop working when the server restarts. An expired or unknown token returns 410 booking_token_expired; run a new search (and resolve, for round trips) to get a fresh token. Prices on the booking page come from individual vendors and can differ somewhat from the confirmed offer price.

Media type application/json
BookingUrlRequest
object
booking_token
required
Booking Token

Provide the bk_-prefixed booking_token returned with a PriceOffer from a prior flight-search or resolve result. Send the 19-character value verbatim. Tokens are valid for about 30 minutes from issuance and are invalidated by server restarts. Expired or unknown tokens return 410 with code booking_token_expired; values that do not match the issued format return 400 with code invalid_booking_token. The resulting booking page lists live per-vendor prices for the same flights which may differ modestly from the quote carried on the resolved offer.

string
>= 1 characters
Example generated
{
"booking_token": "example"
}

Successful Response

Media type application/json
Envelope[BookingUrlResponse]
object
data
required
BookingUrlResponse
object
booking_url
required
Booking Url

The third-party booking URL Skiplagged returns for the offer identified by the supplied token. Hand this to the end user as a redirect target; do not parse it for stability — the path, query parameters, and host may change as Skiplagged rotates partner deeplinks. The landing page lists live per-vendor prices for the same flights and those rows may differ modestly from the resolved quote.

string
meta
required
ResponseMeta
object
cache
Any of:
CacheMetadata
object
hit
required
Hit
boolean
ttl_seconds
required
Ttl Seconds
integer
resource
required
Resource
string
returned
Any of:
integer
request_id
Request Id
string
sources_used
Sources Used
Array<string>
total_results
Any of:
integer
data_freshness
Any of:
string format: date-time
processing_time_ms
required
Processing Time Ms
integer
warnings
Warnings
Array<object>
WarningItem
object
code
required
Code
string
source
required
Source
string
message
required
Message
string
Example generated
{
"data": {
"booking_url": "example"
},
"meta": {
"cache": {
"hit": true,
"ttl_seconds": 1
},
"resource": "example",
"returned": 1,
"request_id": "example",
"sources_used": [
"example"
],
"total_results": 1,
"data_freshness": "2026-04-15T12:00:00Z",
"processing_time_ms": 1
},
"warnings": [
{
"code": "example",
"source": "example",
"message": "example"
}
]
}

Validation Error

Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
Example generated
{
"detail": [
{
"ctx": {},
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example"
}
]
}