Lydira API
TR

Flight bookingStep 3 of 8

3Price the offer

POST/api/v1/flights/price

Reachable with a narrow key: flight_booking

Re-prices the chosen offer with the supplier and answers the total to show, its fare rules, and whether it can be held. Send the bill_to if you know it already: a customer the agency has on file can carry their own service fee, and the price follows it. Pricing only looks the customer up; it never opens one.

Body

  • company_iduuid

    The agency company that sells. Defaults to the account's default company.

  • search_idstringrequired

    From the search answer.

  • offer_keystringrequired

    The chosen offer's key.

  • bill_toobject

    Who pays, when you know already. Only looked up here, never created: a cari the agency has on file can carry its own service fee, and the price token is bound to it. Send the same bill-to to purchases.

    Show fields
    • typeenum

      individual (a person) or corporate (a company). Defaults to individual; a 10-digit tax_number reads as corporate.

      one ofindividualcorporate

    • legal_namestring

      The company's registered name. Corporate: required when tax_number is missing; finds the cari when the VKN does not.

    • tax_numberstring

      VKN (10 digits) for a company, TCKN (11 digits) for a person. The first key the cari is found by.

    • tax_officestring

      The company's tax office, for the invoice.

    • passport_numberstring

      Individual: finds the cari when there is no TCKN.

    • first_namestring

      Individual: the payer's first name, when it is not the first passenger.

    • last_namestring

      Individual: the payer's last name.

    • emailemail

      Written onto the cari for the invoice; never used to find one.

    • phonestring

      International format; never used to find a cari.

    • address_linestring

      Street and number, for the invoice.

    • districtstring

      District (ilçe).

    • citystring

      City (il).

    • zipstring

      Postal code.

    • countrystring

      ISO 3166 alpha-2.

  • customer_iduuid

    Instead of bill_to, when you hold the agency's id for the payer.

Response · 200

  • offerobject
    Show fields
    • keystring

      Pass back as offer_key.

    • fare_familystring

      The airline's brand for this fare, when it has one.

    • validating_carrierstring

      The airline that issues the ticket.

    • carriersstring[]

      Every marketing carrier on the offer.

    • stopsinteger

      Connections on the longest direction.

    • duration_minutesinteger

      Total journey time over every direction.

    • refundableboolean

      Whether the fare can be refunded at all (penalties may still apply; see rules).

    • changeableboolean

      Whether the fare can be changed at all (fees may apply; see rules).

    • baggage_allowancestring

      Checked baggage on the first segment, as the supplier states it.

    • seats_leftinteger

      As the supplier reports it; a hint, not a guarantee.

    • last_ticketing_datedate

      The airline's last day to ticket this fare.

    • itinerariesobject[]

      One entry per direction: outbound, then return, or each multi-city leg.

      Show fields
      • duration_minutesinteger

        Door to door for this direction, connections included.

      • originstring

        Where this direction starts (IATA).

      • destinationstring

        Where this direction ends (IATA).

      • segmentsobject[]

        The flights of this direction, in order.

        Show fields
        • airline_codestring

          Marketing carrier (IATA).

        • flight_numberstring

          Flight number, without the carrier code.

        • departure_airportstring

          IATA airport code.

        • arrival_airportstring

          IATA airport code.

        • departure_timedate-time

          Local departure time with its UTC offset.

        • arrival_timedate-time

          Local arrival time with its UTC offset.

        • duration_minutesinteger

          Time in the air for this segment.

        • cabin_classstring

          Cabin the fare books on this segment.

        • booking_classstring

          Fare class letter (RBD).

        • baggage_allowancestring

          Checked baggage as the supplier states it, e.g. 1PC or 20K.

        • operating_carrierstring

          The airline that flies the segment, when it differs from the marketing one.

    • priceobject

      What the traveller pays. Sell only.

      Show fields
      • totalstring

        What the traveller pays for every passenger on the offer, all taxes and the agency's fees included.

      • service_feestring

        The agency's service fee inside total.

      • taxesstring

        Taxes and carrier surcharges inside total.

      • currencystring

        ISO 4217 code.

  • totalstring

    The sell total to show your customer.

  • currencystring

    ISO 4217 code of total.

  • price_changedboolean

    True when total differs from what the search showed.

  • holdableboolean

    False: buy it with POST /api/v1/flights/purchases.

  • instant_ticketableboolean

    Whether the fare can be bought outright with purchases.

  • expires_atdate-time

    When this price lapses.

  • rulesobject
    Show fields
    • refundableboolean

      Whether a refund is possible.

    • changeableboolean

      Whether a change is possible.

    • textstring

      The fare rules as the supplier words them.

    • penaltiesobject[]

      Fees for a refund or a change, when the supplier states them.

      Show fields
      • kindstring

        refund or change.

      • amountstring

        The fee.

      • currencystring

        ISO 4217 code.

      • whenstring

        When the fee applies, as the supplier states it.

  • price_tokenstring

    Signed, valid for 15 minutes. Required by purchases.

Responses

  • 202The call is running. Read poll_url after Retry-After seconds until it answers anything but 202; after 3 minutes the call is lost and the poll says what to do.
  • 401Missing or invalid Bearer token
  • 403The key cannot reach the booking API: the account lacks an add-on (addon_required, with details.missing), the plan has no API access, or the key's scope is narrow.
  • 409The booking cannot go ahead as asked. price_changed: price again and confirm the new total with your customer. approval_required: the agency approves the ticket first, then call ticket again. hold_expired: search again.
  • 410The search or the offer has expired. Search again.
  • 422The request was refused before anything was booked, or the supplier refused it (provider_rejected, with its reason in error).
  • 429Rate limit exceeded
  • 503The supplier could not be reached, the call could not be queued, or a search, a price or the rules did not finish in 3 minutes (provider_unavailable). Nothing was booked: a search costs nothing, and a hold or a purchase is retried with the same Idempotency-Key.
curl -X POST 'https://YOUR-CELL.lydira.com/api/v1/flights/price' \
  -H 'Authorization: Bearer sek_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "company_id": "3f1c2b9a-6d4e-4c1a-9b2f-1a2b3c4d5e6f",
  "search_id": "eyJfcmFpbHMiOnsiZGF0YSI6eyJhY2NvdW50X2lkIjoi",
  "offer_key": "sbx_TK_1979_Y",
  "bill_to": {
    "type": "individual",
    "tax_number": "10000000146"
  }
}'
Response
200
{
  "offer": {
    "key": "sbx_TK_1979_Y",
    "fare_family": "EcoFly",
    "validating_carrier": "TK",
    "carriers": [
      "TK"
    ],
    "stops": 0,
    "duration_minutes": 250,
    "refundable": false,
    "changeable": true,
    "baggage_allowance": "1PC",
    "seats_left": 7,
    "last_ticketing_date": "2026-10-09",
    "itineraries": [
      {
        "duration_minutes": 250,
        "origin": "IST",
        "destination": "LHR",
        "segments": [
          {
            "airline_code": "TK",
            "flight_number": "1979",
            "departure_airport": "IST",
            "arrival_airport": "LHR",
            "departure_time": "2026-11-20T07:45:00+03:00",
            "arrival_time": "2026-11-20T09:55:00+00:00",
            "duration_minutes": 250,
            "cabin_class": "economy",
            "booking_class": "Y",
            "baggage_allowance": "1PC",
            "operating_carrier": "TK"
          }
        ]
      }
    ],
    "price": {
      "total": "412.50",
      "service_fee": "15.00",
      "taxes": "96.40",
      "currency": "EUR"
    }
  },
  "total": "412.50",
  "currency": "EUR",
  "price_changed": false,
  "holdable": true,
  "instant_ticketable": true,
  "expires_at": "2026-10-07T09:10:00Z",
  "rules": {
    "refundable": false,
    "changeable": true,
    "text": "Changes permitted before departure for a fee.",
    "penalties": [
      {
        "kind": "change",
        "amount": "50.00",
        "currency": "EUR",
        "when": "before_departure"
      }
    ]
  },
  "price_token": "eyJfcmFpbHMiOnsiZGF0YSI6eyJzZWxsX3RvdGFsIjoi"
}