6Ödenmeyen opsiyonu bırakın
DELETE
/api/v1/flights/holds/{id}Dar kapsamlı anahtarla da çalışır: flight_booking
Müşteri ödemezse koltuğu geri verin. Kendi hâline bırakılan opsiyon süresi dolunca düşer; bırakmak ise koltuğu hemen boşaltır ve acentenin tedarikçi kaydını temiz tutar.
Parametreler
Yol
iduuidzorunlu
Yanıt · 200
releasedbooleanstatusstring
Yanıtlar
202The call is running. Readpoll_urlafterRetry-Afterseconds until it answers anything but202; after 3 minutes the call is lost and the poll says what to do.401Missing or invalid Bearer token403The key cannot reach the booking API: the account lacks an add-on (addon_required, withdetails.missing), the plan has no API access, or the key's scope is narrow.404Resource not found409The 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.502The supplier's answer is unknown: the booking may or may not exist, and money may already have moved. It is also whatpoll_urlanswers when a hold, a ticket, a release or a purchase did not finish in 3 minutes, and what a hold, a ticket or a purchase sent again with itsIdempotency-Keyanswers once its call can no longer be read. Read the booking (GET /api/v1/flights/bookings/{booking_id}) before you retry or refund anything, and refund the card only if it was not ticketed. A hold, a ticket or a purchase keeps this answer under itsIdempotency-Key, so a new attempt takes a new key; a release is sent again. With nobooking_id, no booking was found under the key: hold again with a new key, and ask the agency before you refund a purchase.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 sameIdempotency-Key.
curl -X DELETE 'https://YOUR-CELL.lydira.com/api/v1/flights/holds/2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f' \
-H 'Authorization: Bearer sek_YOUR_API_KEY'Yanıt
200
{
"released": true,
"status": "cancelled"
}