Hermeseus

Flight fare rules

Read the fare conditions for an itinerary, such as change and cancellation penalties.

POST/Air/AirRules

Access requires the permission air_rules

Show the traveller what they are buying before they book. Pass the FareSourceCode of a searched fare, or the UniqueId of a booking.

Path parameters

None.

Query parameters

None.

Body parameters

NameTypeRequiredDescription
SessionIdstringYesYour session id.
FareSourceCodestringOne ofA fare from search.
UniqueIdstringOne ofA booking id. Send either FareSourceCode or UniqueId.

Request

curl -X POST https://api.hermeseus.com/api/Air/AirRules \
  -H "Content-Type: application/json" \
  -d '{
    "SessionId": "8f3c81d2-4a5b-4c6d-9e0f-1a2b3c4d5e6f",
    "FareSourceCode": "dHA6ODc0NTE6ZmwxMjM0OjMyNw=="
  }'
const res = await fetch("https://api.hermeseus.com/api/Air/AirRules", {
  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/AirRules",
    json={
        "SessionId": "8f3c81d2-4a5b-4c6d-9e0f-1a2b3c4d5e6f",
        "FareSourceCode": "dHA6ODc0NTE6ZmwxMjM0OjMyNw==",
    },
)

data = res.json()

Response

FieldTypeDescription
Successbooleantrue on success.
FareTypeintegerFare category code.
FareRulesarray of objectThe rule sections. The exact fields depend on the validating airline, so treat each entry as a titled block of text to display.
Errorobjectnull on success.
{
  "Success": true,
  "FareType": 1,
  "FareRules": [
    {
      "Category": "Penalties",
      "Rules": "Changes permitted for a fee. Cancellation permitted before departure with a penalty."
    }
  ],
  "Error": null
}

Errors

CodeMeaningFix
Err0102002Invalid FareSourceCode.Use a code from the latest search.