Booking sessions
Send travellers
For your own payment UI. One traveller per seat. International trips also need passportNumber, passportExpiry and passportCountry, valid on the travel date. Send before any payment.
POST
/
bookings
/
session
/
{id}
/
details
Send travellers
curl --request POST \
--url https://api.flyskye.ai/v1/bookings/session/{id}/details \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contact": {
"email": "asha@example.com",
"phoneNumber": "9876543210"
},
"travellers": [
{
"givenName": "Asha",
"familyName": "Rao",
"bornOn": "1992-04-18",
"title": "Ms",
"passportNumber": "<string>",
"passportExpiry": "2023-12-25",
"passportCountry": "<string>",
"nationality": "<string>",
"passportIssueDate": "2023-12-25",
"pan": "<string>"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
contact: {email: 'asha@example.com', phoneNumber: '9876543210'},
travellers: [
{
givenName: 'Asha',
familyName: 'Rao',
bornOn: '1992-04-18',
title: 'Ms',
passportNumber: '<string>',
passportExpiry: '2023-12-25',
passportCountry: '<string>',
nationality: '<string>',
passportIssueDate: '2023-12-25',
pan: '<string>'
}
]
})
};
fetch('https://api.flyskye.ai/v1/bookings/session/{id}/details', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.flyskye.ai/v1/bookings/session/{id}/details"
payload = {
"contact": {
"email": "asha@example.com",
"phoneNumber": "9876543210"
},
"travellers": [
{
"givenName": "Asha",
"familyName": "Rao",
"bornOn": "1992-04-18",
"title": "Ms",
"passportNumber": "<string>",
"passportExpiry": "2023-12-25",
"passportCountry": "<string>",
"nationality": "<string>",
"passportIssueDate": "2023-12-25",
"pan": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"travelerIds": [
"<string>"
]
}{
"error": {
"code": "invalid_request",
"message": "departDate cannot be in the past",
"field": "departDate"
}
}{
"error": {
"code": "invalid_request",
"message": "departDate cannot be in the past",
"field": "departDate"
}
}{
"error": {
"code": "invalid_request",
"message": "departDate cannot be in the past",
"field": "departDate"
}
}{
"error": {
"code": "invalid_request",
"message": "departDate cannot be in the past",
"field": "departDate"
}
}Body
application/json
⌘I
Send travellers
curl --request POST \
--url https://api.flyskye.ai/v1/bookings/session/{id}/details \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contact": {
"email": "asha@example.com",
"phoneNumber": "9876543210"
},
"travellers": [
{
"givenName": "Asha",
"familyName": "Rao",
"bornOn": "1992-04-18",
"title": "Ms",
"passportNumber": "<string>",
"passportExpiry": "2023-12-25",
"passportCountry": "<string>",
"nationality": "<string>",
"passportIssueDate": "2023-12-25",
"pan": "<string>"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
contact: {email: 'asha@example.com', phoneNumber: '9876543210'},
travellers: [
{
givenName: 'Asha',
familyName: 'Rao',
bornOn: '1992-04-18',
title: 'Ms',
passportNumber: '<string>',
passportExpiry: '2023-12-25',
passportCountry: '<string>',
nationality: '<string>',
passportIssueDate: '2023-12-25',
pan: '<string>'
}
]
})
};
fetch('https://api.flyskye.ai/v1/bookings/session/{id}/details', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.flyskye.ai/v1/bookings/session/{id}/details"
payload = {
"contact": {
"email": "asha@example.com",
"phoneNumber": "9876543210"
},
"travellers": [
{
"givenName": "Asha",
"familyName": "Rao",
"bornOn": "1992-04-18",
"title": "Ms",
"passportNumber": "<string>",
"passportExpiry": "2023-12-25",
"passportCountry": "<string>",
"nationality": "<string>",
"passportIssueDate": "2023-12-25",
"pan": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"travelerIds": [
"<string>"
]
}{
"error": {
"code": "invalid_request",
"message": "departDate cannot be in the past",
"field": "departDate"
}
}{
"error": {
"code": "invalid_request",
"message": "departDate cannot be in the past",
"field": "departDate"
}
}{
"error": {
"code": "invalid_request",
"message": "departDate cannot be in the past",
"field": "departDate"
}
}{
"error": {
"code": "invalid_request",
"message": "departDate cannot be in the past",
"field": "departDate"
}
}