Revalidate a flight fare
Re-price an itinerary right before you book to confirm the fare is still available.
POST/Air/AirRevalidate
Access requires the permission air_revalidate
Fares from search are a snapshot. Call revalidate at the moment the traveller confirms. If the price or availability changed, you find out here instead of at book time. Use the returned itinerary as the source of truth for what you charge.
Path parameters
None.
Query parameters
None.
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
SessionId | string | Yes | Your session id. |
FareSourceCode | string | Yes | The itinerary code from search. |
Request
curl -X POST https://api.hermeseus.com/api/Air/AirRevalidate \
-H "Content-Type: application/json" \
-d '{
"SessionId": "8f3c81d2-4a5b-4c6d-9e0f-1a2b3c4d5e6f",
"FareSourceCode": "dHA6ODc0NTE6ZmwxMjM0OjMyNw=="
}'const res = await fetch("https://api.hermeseus.com/api/Air/AirRevalidate", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
SessionId: "8f3c81d2-4a5b-4c6d-9e0f-1a2b3c4d5e6f",
FareSourceCode: "dHA6ODc0NTE6ZmwxMjM0OjMyNw=="
})
});
const data = await res.json();import requests
res = requests.post(
"https://api.hermeseus.com/api/Air/AirRevalidate",
json={
"SessionId": "8f3c81d2-4a5b-4c6d-9e0f-1a2b3c4d5e6f",
"FareSourceCode": "dHA6ODc0NTE6ZmwxMjM0OjMyNw==",
},
)
data = res.json()Response
| Field | Type | Description |
|---|---|---|
Success | boolean | true when the fare is still bookable. |
PricedItinerary | object | The re-priced itinerary. Same shape as a search result, including a FareSourceCode to book with. |
Services | array | Available ancillary services. |
MealTypeServices | array | Meal options. |
SeatServices | array | Seat options. |
Error | object | null on success. |
{
"Success": true,
"PricedItinerary": {
"FareSourceCode": "dHA6ODc0NTE6ZmwxMjM0OjMyNw==",
"ValidatingAirlineCode": "TK",
"AirItineraryPricingInfo": {
"ItinTotalFare": {
"BaseFare": 182.40,
"TotalTax": 37.20,
"TotalFare": 219.60,
"Currency": "USD"
}
}
},
"Services": [],
"MealTypeServices": [],
"SeatServices": [],
"Error": null
}
The price can move.
The
FareSourceCode here may differ from the one you sent. Always book with the code this call returns, and show the traveller the fare from this response before charging them.
Errors
| Code | Meaning | Fix |
|---|---|---|
Err0102002 | Invalid FareSourceCode. | Use a code from the latest search. |
Err0102003 | The fare is no longer available. | Search again. |
Err0102005 | The fare has expired. | Search again. |
Next step. Book the itinerary with the
FareSourceCode this call returned.
