Lydira API
EN

Uçuş rezervasyonuAdım 8 / 8

8Geri okuyun

GET/api/v1/flights/bookings/{id}

Dar kapsamlı anahtarla da çalışır: flight_booking

Durum, rezervasyon kodu, bilet numaraları ve opsiyonun bitişi. pending: true ödemenin yapıldığını ama numaraların henüz çıkmadığını söyler; çıktıklarında bilet webhook'u gelir (Webhook'lar). Burada yalnız rezervasyon API'siyle açılmış rezervasyonlar cevap verir.

Parametreler

Yol

  • iduuidzorunlu

Yanıt · 200

  • iduuid

    The booking id.

  • statusenum

    held waits for payment, ticketing is paid and waiting for numbers, ticketed is done; cancelled, expired and failed are closed.

    şunlardan biripendingheldawaiting_approvalticketingticketedpartially_ticketedcancelledexpiredfailed

  • record_locatorstring

    The airline booking reference (PNR).

  • ticketing_time_limitdate-time

    While held: ticket before this, or the hold lapses.

  • sale_iduuid

    The sale in the agency's books.

  • totalstring

    The sell total of the booking.

  • currencystring

    ISO 4217 code of total.

  • pendingboolean

    Paid, ticket numbers not issued yet. The ticket webhook fires when they are.

  • ticketsobject[]

    One per passenger once issued.

    Alanları göster
    • ticket_numberstring

      The e-ticket number.

    • passenger_namestring

      As printed on the ticket (SURNAME/GIVEN).

Yanıtlar

  • 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.
  • 404Resource not found
curl -X GET 'https://YOUR-CELL.lydira.com/api/v1/flights/bookings/2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f' \
  -H 'Authorization: Bearer sek_YOUR_API_KEY'
Yanıt
200
{
  "id": "2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f",
  "status": "ticketed",
  "record_locator": "ABC123",
  "ticketing_time_limit": "2026-10-08T18:00:00Z",
  "sale_id": "7e6d5c4b-3a2f-4e1d-8c0b-9a8f7e6d5c4b",
  "total": "412.50",
  "currency": "EUR",
  "pending": false,
  "tickets": [
    {
      "ticket_number": "235-1234567890",
      "passenger_name": "ARSLAN/DENIZ"
    }
  ]
}