POST/v1/transfers/flights/verify

Verify a transfer flight

Check whether a flight fits the requested pickup time.

Share
POST/v1/transfers/flights/verify

API console

Try it

Send a real request to the sandbox API and inspect the response.

Credentials

Log in to pick from your saved API keys instead of pasting them.

Request body

cURL request

cURL
bash
curl -X POST 'https://api.sandbox.travelandz.com/v1/transfers/flights/verify' \
  -H 'Authorization: Bearer YOUR_SECRET_KEY' \
  -H 'X-Travelandz-Id: YOUR_PUBLIC_KEY:YOUR_PROFILE_CODE' \
  -H 'Content-Type: application/json' \
  -d '{"returnVoyage":true,"pickupDatetime":"2026-06-26T08:00:00+07:00","airlineCode":"5J","airportCode":"BKK","flightDirection":"dep","flightNumber":"930","currency":"USD"}'

Add your credentials to send a request.

Response

Click "Try it!" to send a request and see the response here.

Check whether a flight fits the requested pickup time.

Authentication and headers

HeaderDescription
AuthorizationBearer <secret_key>. Keep the secret on the server and never write it to client logs.
X-Travelandz-Id<public_key>:<profile_code>, where the persisted profile code has the form dp_<12 alphanumeric>.
LANGPreferred locale header. Accept-Language is also supported.
Content-Typeapplication/json for requests with a JSON body.

Request

Send the flight identity and the pickup time you intend to book. Set returnVoyage when you are checking the return leg.

Request Body Schema

pickupDatetime
string
Format: ISO 8601
Yes
airlineCode
string
Format: IATA (2 characters)
Yes
airportCode
string
Format: IATA (3 characters)
Yes
flightDirection
enum
arrivingdepartingarrdep
Yes
flightNumber
stringYes
returnVoyage
booleanNo
True when checking the return leg.
searchId
stringNo
Search context, when available.
currency
enum
EURUSDINRCHFJPYGBPAUDCADCNYSGDNZDMXN
No
Lowercase values are accepted and normalized. Defaults to USD on a new search and is inherited afterwards.
language
enum
en-USes-ESde-DEfr-FRpt-BRzh-CNit-IT
No
Legacy field. Prefer the LANG or Accept-Language header.

Request example

json
json
{
  "returnVoyage": true,
  "pickupDatetime": "2026-06-26T08:00:00+07:00",
  "airlineCode": "5J",
  "airportCode": "BKK",
  "flightDirection": "dep",
  "flightNumber": "930",
  "currency": "USD"
}

Success response

isValid: false is a successful verification, not an error: the flight and the pickup time do not fit together. When that happens, possiblePickupDatetime suggests a pickup time that would work, and message explains the problem in the requested language.

Response Body Schema

isValid
booleanYes
False is a valid HTTP 200 outcome: the flight does not fit the pickup time.
messageTitle
stringNo
message
stringNo
Localized explanation. May contain basic HTML tags.
possiblePickupDatetime
string
Format: ISO 8601
No
Suggested pickup time when the current one does not fit.

Response examples

json
json
{
  "isValid": false,
  "messageTitle": "Late Arrival!",
  "message": "You're expected to arrive at the airport at <b>9:30AM</b>.<br/>This gives you 1 hours and 45 minutes until your flight.<br/>To ensure you don't miss it, we recommend arriving 3 hours before departure.",
  "possiblePickupDatetime": "2026-06-26T06:45:00+07:00"
}

Errors

HTTPCodeMeaningRecommended action
400The body, query or path is invalid, or contains an unknown property.Fix the request using the message array.
400transfer_invalid_currencyThe currency is outside the supported list.Use a supported currency.
400transfer_invalid_languageThe requested language is not supported.Use one of the documented language values.
429transfer_provider_errorThe service is temporarily rate limited.Retry with exponential backoff.
502transfer_provider_errorThe request could not be completed.Do not assume success. Keep your identifiers and read the reservation when the operation could have been created.

Usage notes

message can contain basic HTML tags, so render it as rich text or strip the tags before displaying it. Verify the flight before booking so the traveller can adjust the pickup time instead of discovering the problem on the day of travel.

cURL example

bash
bash
curl --request POST \
  --url "https://api.sandbox.travelandz.com/v1/transfers/flights/verify" \
  -H "Authorization: Bearer $TRAVELANDZ_SECRET_KEY" \
  -H "X-Travelandz-Id: $TRAVELANDZ_PUBLIC_KEY:$TRAVELANDZ_PROFILE_CODE" \
  -H "Content-Type: application/json" \
  --data '{
  "returnVoyage": true,
  "pickupDatetime": "2026-06-26T08:00:00+07:00",
  "airlineCode": "5J",
  "airportCode": "BKK",
  "flightDirection": "dep",
  "flightNumber": "930",
  "currency": "USD"
}'