Last updated:
24-Aug-2026
Recent changes:
Merge branch 'feature/NSK-76937' into 'main'
move to public
Closes NSK-76937
See merge request api-program/apigee/flight/newskies-apis/flight-checkinhandler!22
Code Examples
Authentication
Obtain an OAuth 2.0 access token using client credentials:
curl -X POST "https://oauth.api.tui/oauth/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET"
cURL
Get Record Locator
curl -X GET "https://test.api.tui/flight/newskies/checkinhandler/recordlocator?bookingId=ABC123&lastName=Smith" \
-H "Authorization: Bearer <access_token>"
Check-in Availability
curl -X GET "https://test.api.tui/flight/newskies/checkinhandler/checkinavailability?bookingId=ABC123&lastName=Smith" \
-H "Authorization: Bearer <access_token>"
Check-in Overview
curl -X GET "https://test.api.tui/flight/newskies/checkinhandler/checkinoverview?bookingid=ABC123&lastname=Smith" \
-H "Authorization: Bearer <access_token>"
JavaScript / Node.js
const BASE_URL = 'https://test.api.tui/flight/newskies/checkinhandler';
async function getCheckInAvailability(bookingId, lastName, accessToken) {
const params = new URLSearchParams({ bookingId, lastName });
const response = await fetch(`${BASE_URL}/checkinavailability?${params}`, {
headers: { 'Authorization': `Bearer ${accessToken}` },
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const data = await response.json();
if (!data.loginStatus.success) {
throw new Error(`Login failed: ${data.loginStatus.errorMessage}`);
}
// Route based on product type
if (data.checkInStatus.productType === 'Legacy') {
window.location.href = data.checkInStatus.deepLinkUrl;
} else {
// Proceed with harmonised check-in flow
return data;
}
}
C# / .NET
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text.Json;
public class CheckInHandlerClient
{
private readonly HttpClient _httpClient;
public CheckInHandlerClient(string baseUrl, string accessToken)
{
_httpClient = new HttpClient { BaseAddress = new Uri(baseUrl) };
_httpClient.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", accessToken);
}
public async Task<CheckInValidation> GetCheckInAvailabilityAsync(string bookingId, string lastName)
{
var response = await _httpClient.GetAsync(
$"checkinavailability?bookingId={bookingId}&lastName={lastName}");
response.EnsureSuccessStatusCode();
return await response.Content.ReadFromJsonAsync<CheckInValidation>()
?? throw new InvalidOperationException("Empty response");
}
public async Task<string?> GetRecordLocatorAsync(string bookingId, string lastName)
{
var response = await _httpClient.GetAsync(
$"recordlocator?bookingId={bookingId}&lastName={lastName}");
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync<RecordLocatorResponse>();
return result?.RecordLocator;
}
}
public record RecordLocatorResponse(string? RecordLocator);
public record LoginStatus(bool Success, string? ErrorMessage);
public record CheckInStatus(string? ProductType, string? DeepLinkUrl, List<CheckInSegment>? Segments);
public record CheckInSegment(string? DepartureStation, string? ArrivalStation,
DateTime? DepartureDateUtc, int? CheckInOpensMinutesBeforeDeparture,
int? CheckInClosesMinutesBeforeDeparture, bool CheckInAvailable, string? ErrorMessage);
public record CheckInValidation(string? RecordLocator, LoginStatus LoginStatus, CheckInStatus CheckInStatus);
Python
import requests
class CheckInHandlerClient:
def __init__(self, base_url, access_token):
self.base_url = base_url
self.session = requests.Session()
self.session.headers.update({"Authorization": f"Bearer {access_token}"})
def get_record_locator(self, booking_id, last_name):
response = self.session.get(
f"{self.base_url}/recordlocator",
params={"bookingId": booking_id, "lastName": last_name},
)
response.raise_for_status()
return response.json()["recordLocator"]
def check_availability(self, booking_id, last_name):
response = self.session.get(
f"{self.base_url}/checkinavailability",
params={"bookingId": booking_id, "lastName": last_name},
)
response.raise_for_status()
return response.json()
def check_overview(self, booking_id, last_name):
response = self.session.get(
f"{self.base_url}/checkinoverview",
params={"bookingid": booking_id, "lastname": last_name},
)
response.raise_for_status()
return response.json()
# Usage
client = CheckInHandlerClient(
base_url="https://test.api.tui/flight/newskies/checkinhandler",
access_token="your_token_here",
)
# Check availability
result = client.check_availability("ABC123", "Smith")
if result["loginStatus"]["success"]:
product_type = result["checkInStatus"]["productType"]
if product_type == "Legacy":
print(f"Redirect to: {result['checkInStatus']['deepLinkUrl']}")
else:
print("Proceed with harmonised check-in")
Error Handling with Retry
async function callWithRetry(fn, maxRetries = 3) {
for (let attempt = 1; attempt <= maxRetries; attempt++) {
try {
return await fn();
} catch (error) {
if (attempt === maxRetries) throw error;
if (error.status === 429 || error.status >= 500) {
await new Promise(r => setTimeout(r, Math.pow(2, attempt) * 1000));
} else {
throw error;
}
}
}
}