{"openapi":"3.0.3","info":{"title":"FlyNDeal B2B Reseller API","version":"1.0.0","description":"External partner API for agencies integrating FlyNDeal inventory into their own portal.\n\nRecommended flow:\n1. Call `GET /api/b2b/health`\n2. Load dropdown catalogs with `GET /api/b2b/sectors` and `GET /api/b2b/airlines`\n3. Load grouped inventory with `GET /api/b2b/tickets/grouped`\n4. Search with `POST /api/b2b/tickets/search`\n5. Verify seats with `POST /api/b2b/tickets/seats`\n6. Create bookings with `POST /api/b2b/bookings`\n7. Track booking progress with `GET /api/b2b/bookings/{bookingRef}`\n\nImportant behavior notes:\n- FlyNDeal returns unified inventory, not a raw one-to-one dump from a single upstream supplier.\n- Website listings and partner API results both come from FlyNDeal unified inventory, but grouped pages, partner search, supplier filters, duplicate suppression, organization-level provider access, and availability windows can affect what is returned.\n- `POST /api/b2b/tickets/search` supports both one-way and round-trip requests. For round-trip requests, send `tripType: ROUND_TRIP` with `returnDate`. In partner UI language, this usually maps to a return-ticket flow.\n- For backward compatibility, the top-level `data` array remains the outbound leg, while `outbound` and `inbound` are also returned for round-trip searches.\n- `GET /api/b2b/bookings/{bookingRef}` is the authoritative endpoint for the latest supplier-synced PNR / reference. For airline-facing display, prefer `pnrConfirmation || externalPNR || supplierReference`.\n\nAuthentication uses the `x-api-key` header. Booking creation also requires an `idempotency-key` header.","contact":{"name":"Motive Solutions Support","email":"info@motivesolutions.tech"},"termsOfService":"https://flyndeal.com/api-docs"},"servers":[{"url":"https://flyndeal.com","description":"Current API server"}],"tags":[{"name":"B2B Integration","description":"Connectivity and capability inspection for the current API key."},{"name":"B2B Catalog","description":"Partner-safe catalogs for building route and airline selectors."},{"name":"B2B Inventory","description":"Partner-facing ticket search and seat verification."},{"name":"B2B Bookings","description":"Idempotent booking creation and booking status retrieval."}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Partner API key generated from the FlyNDeal agent settings panel."}},"parameters":{"IdempotencyKeyHeader":{"name":"idempotency-key","in":"header","required":true,"description":"Unique client-generated booking request key. Reusing the same key with the same payload safely replays the original response.","schema":{"type":"string","minLength":8},"example":"booking-20260705-0001"},"BookingRefPath":{"name":"bookingRef","in":"path","required":true,"description":"FlyNDeal booking reference returned after booking creation.","schema":{"type":"string"},"example":"FND-2E58CF997B4DD234"}},"schemas":{"ErrorResponse":{"type":"object","required":["status","message"],"properties":{"status":{"type":"string","example":"error"},"message":{"type":"string","example":"Invalid, expired, or insufficient-scope API key"}}},"ValidationIssue":{"type":"object","required":["path","message"],"properties":{"path":{"type":"string","example":"passengers.0.firstName"},"message":{"type":"string","example":"First name or givenName is required and must be at least 2 characters."}}},"ValidationErrorResponse":{"allOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/ValidationIssue"}}}}]},"OrganizationSummary":{"type":"object","nullable":true,"properties":{"id":{"type":"string","example":"cmphzfrp8001il8in8pa51xyd"},"name":{"type":"string","example":"Motive Solutions"},"tier":{"type":"string","example":"SILVER"}}},"HealthResponse":{"type":"object","properties":{"status":{"type":"string","example":"success"},"data":{"type":"object","properties":{"integration":{"type":"object","properties":{"status":{"type":"string","example":"READY"},"userId":{"type":"string","example":"f3f32180-63b1-4e25-98b1-9ade102b1c1b"},"organization":{"$ref":"#/components/schemas/OrganizationSummary"},"checkedAt":{"type":"string","format":"date-time"}}},"scopes":{"type":"array","items":{"type":"string","enum":["B2B_TICKETS_READ","B2B_BOOKINGS_READ","B2B_BOOKINGS_WRITE"]}},"capabilities":{"type":"object","properties":{"groupedInventory":{"type":"boolean","example":true},"ticketsSearch":{"type":"boolean","example":true},"seatsCheck":{"type":"boolean","example":true},"bookingCreate":{"type":"boolean","example":true},"bookingStatusRead":{"type":"boolean","example":true}}}}}}},"SectorCatalogItem":{"type":"object","properties":{"from":{"type":"string","example":"LHE"},"to":{"type":"string","example":"DXB"},"routePath":{"type":"string","example":"LHE-DXB"},"label":{"type":"string","example":"LHE -> DXB"}}},"SectorCatalogResponse":{"type":"object","properties":{"status":{"type":"string","example":"success"},"count":{"type":"integer","example":18},"data":{"type":"array","items":{"$ref":"#/components/schemas/SectorCatalogItem"}}}},"AirlineCatalogItem":{"type":"object","properties":{"id":{"type":"string","example":"default-pf"},"code":{"type":"string","example":"PF"},"name":{"type":"string","example":"AirSial"},"logoUrl":{"type":"string","nullable":true,"example":"https://ik.imagekit.io/example/airlines/airsial.webp"}}},"AirlineCatalogResponse":{"type":"object","properties":{"status":{"type":"string","example":"success"},"count":{"type":"integer","example":12},"data":{"type":"array","items":{"$ref":"#/components/schemas/AirlineCatalogItem"}}}},"TicketSearchRequest":{"type":"object","required":["from","to","date"],"description":"Partner ticket search request. One-way remains the default. For round-trip behavior, send `tripType: ROUND_TRIP` together with `returnDate`. The backend will search both directions internally and return separate `outbound` and `inbound` arrays. In partner UI language, this usually maps to a return-ticket flow.","properties":{"from":{"type":"string","minLength":3,"maxLength":3,"example":"LHE"},"to":{"type":"string","minLength":3,"maxLength":3,"example":"DXB"},"date":{"type":"string","format":"date","example":"2026-07-12"},"passengers":{"type":"integer","minimum":1,"maximum":9,"default":1,"example":1},"tripType":{"type":"string","enum":["ONE_WAY","ROUND_TRIP"],"default":"ONE_WAY","example":"ROUND_TRIP"},"returnDate":{"type":"string","format":"date","nullable":true,"example":"2026-07-20"}}},"TicketSearchItem":{"type":"object","description":"Partner-safe FlyNDeal fare returned from unified inventory.","properties":{"id":{"type":"string","example":"FND-7D4A7B2C9F4D1A6C8E210B3F"},"airline":{"type":"object","properties":{"code":{"type":"string","example":"PF"},"name":{"type":"string","example":"AIR SIAL"},"logo":{"type":"string","nullable":true,"example":"https://ik.imagekit.io/example/airlines/airsial.webp"}}},"flightNo":{"type":"string","example":"PF 786"},"sector":{"type":"object","properties":{"from":{"type":"string","example":"LHE"},"to":{"type":"string","example":"DXB"}}},"departure":{"type":"object","properties":{"date":{"type":"string","format":"date","example":"2026-07-12"},"time":{"type":"string","nullable":true,"example":"13:20:00"}}},"arrival":{"type":"object","properties":{"date":{"type":"string","format":"date","example":"2026-07-12"},"time":{"type":"string","nullable":true,"example":"15:40:00"}}},"pricing":{"type":"object","properties":{"currency":{"type":"string","example":"PKR"},"baseFare":{"type":"number","example":82000},"taxes":{"type":"number","example":500},"total":{"type":"number","example":82500}}},"seatsAvailable":{"type":"integer","example":4},"baggageInfo":{"type":"string","nullable":true,"example":"20+7"},"isRefundable":{"type":"boolean","example":false},"routePath":{"type":"string","example":"LHE-DXB"},"itineraryType":{"type":"string","example":"ONE_WAY"},"legs":{"type":"array","items":{"type":"object","properties":{"sequence":{"type":"integer","example":1},"from":{"type":"string","example":"LHE"},"to":{"type":"string","example":"DXB"},"departureDate":{"type":"string","format":"date","example":"2026-07-12"},"departureTime":{"type":"string","nullable":true,"example":"13:20:00"},"arrivalDate":{"type":"string","format":"date","example":"2026-07-12"},"arrivalTime":{"type":"string","nullable":true,"example":"15:40:00"},"flightNo":{"type":"string","example":"PF 786"},"baggageInfo":{"type":"string","nullable":true,"example":"20+7"}}}},"expiresAt":{"type":"string","format":"date-time","nullable":true,"example":"2026-07-05T14:30:00.000Z"},"isStale":{"type":"boolean","example":false}}},"TicketSearchResponse":{"type":"object","properties":{"status":{"type":"string","example":"success"},"tripType":{"type":"string","enum":["ONE_WAY","ROUND_TRIP"],"example":"ONE_WAY"},"departureDate":{"type":"string","format":"date","nullable":true,"example":"2026-07-12"},"returnDate":{"type":"string","format":"date","nullable":true,"example":"2026-07-20"},"count":{"type":"integer","example":3},"data":{"type":"array","description":"Legacy-compatible primary results array. For round-trip searches this remains the outbound leg.","items":{"$ref":"#/components/schemas/TicketSearchItem"}},"outbound":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/TicketSearchItem"}},"inbound":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/TicketSearchItem"}}}},"GroupedTicketSearchResponse":{"type":"object","description":"Grouped FlyNDeal inventory payload for listing pages. `groups` is the primary grouped structure, `items` is a flat list of the returned group rows, and `meta` contains pagination details. This is unified FlyNDeal inventory, so rows may already reflect supplier selection, duplicate handling, organization-level visibility, and route/date window logic.","properties":{"status":{"type":"string","example":"success"},"data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/TicketSearchItem"}},"groups":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","example":"LHE-DXB"},"routePath":{"type":"string","example":"LHE-DXB"},"displayRoute":{"type":"string","example":"LHE-DXB"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/TicketSearchItem"}},"summary":{"type":"object","properties":{"minPrice":{"type":"number","example":82500},"maxPrice":{"type":"number","example":93000},"fareCount":{"type":"integer","example":4}}}}}},"meta":{"type":"object","properties":{"total":{"type":"integer","example":24},"totalGroups":{"type":"integer","example":6},"page":{"type":"integer","example":1},"pageSize":{"type":"integer","example":50},"totalPages":{"type":"integer","example":1},"returned":{"type":"integer","example":24},"returnedGroups":{"type":"integer","example":6},"hasNext":{"type":"boolean","example":false},"hasPrev":{"type":"boolean","example":false},"localCount":{"type":"integer","example":10},"apiCount":{"type":"integer","example":14},"staleCount":{"type":"integer","example":0}}}}}}},"SearchContext":{"type":"object","required":["from","to","date"],"properties":{"from":{"type":"string","minLength":3,"maxLength":3,"example":"LHE"},"to":{"type":"string","minLength":3,"maxLength":3,"example":"DXB"},"date":{"type":"string","format":"date","example":"2026-07-12"}}},"SeatCheckRequest":{"type":"object","required":["flightId","passengers"],"properties":{"flightId":{"type":"string","example":"SKP-abc123"},"passengers":{"type":"integer","minimum":1,"maximum":9,"example":1},"searchContext":{"$ref":"#/components/schemas/SearchContext"}}},"SeatCheckResponse":{"type":"object","properties":{"status":{"type":"string","example":"success"},"data":{"type":"object","properties":{"available":{"type":"boolean","example":true},"message":{"type":"string","example":"Seats available on verified FlyNDeal fare"},"seatsAvailable":{"type":"integer","example":7}}}}},"Passenger":{"type":"object","required":["title","passportNo","nationality","dob"],"allOf":[{"anyOf":[{"required":["firstName"]},{"required":["givenName"]}]},{"anyOf":[{"required":["lastName"]},{"required":["surname"]}]}],"properties":{"title":{"type":"string","example":"MR"},"passengerType":{"type":"string","enum":["ADULT","CHILD","INFANT","adult","child","infant"],"example":"ADULT"},"type":{"type":"string","enum":["ADULT","CHILD","INFANT","adult","child","infant"],"nullable":true,"example":"ADULT"},"firstName":{"type":"string","nullable":true,"example":"Ali"},"givenName":{"type":"string","nullable":true,"example":"Ali"},"lastName":{"type":"string","nullable":true,"example":"Khan"},"surname":{"type":"string","nullable":true,"example":"Khan"},"passportNo":{"type":"string","minLength":5,"example":"AB1234567"},"nationality":{"type":"string","minLength":2,"example":"PK"},"dob":{"type":"string","format":"date","example":"1995-01-01"},"passportExpiry":{"type":"string","format":"date","nullable":true,"example":"2031-01-01"}},"description":"Either firstName or givenName is required. Either lastName or surname is required. For live FlyNDeal fares, passportExpiry is required for each passenger."},"BookingCreateRequest":{"type":"object","required":["flightId","passengers"],"properties":{"flightId":{"type":"string","example":"SKP-abc123"},"totalAmount":{"type":"number","nullable":true,"example":24000,"deprecated":true,"description":"Deprecated. Server computes the final booking amount."},"isUrgent":{"type":"boolean","default":false,"example":false},"passengers":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/Passenger"}},"searchContext":{"$ref":"#/components/schemas/SearchContext"}}},"BookingCreateResponse":{"type":"object","properties":{"status":{"type":"string","example":"success"},"message":{"type":"string","example":"B2B booking request created successfully"},"data":{"type":"object","properties":{"id":{"type":"string","example":"booking_123"},"bookingRef":{"type":"string","example":"FND-2E58CF997B4DD234"},"status":{"type":"string","example":"QUEUED"},"pnr":{"type":"string","nullable":true,"example":"ABC123","description":"Unified partner-facing convenience field. This may lag behind the best airline-facing PNR/reference right after booking creation."},"pnrConfirmation":{"type":"string","nullable":true,"example":null,"description":"Final confirmed airline PNR when available."},"externalPNR":{"type":"string","nullable":true,"example":"ABC123","description":"Supplier-side PNR or reservation value captured from provider response."},"supplierReference":{"type":"string","nullable":true,"example":"ABC123","description":"Fallback supplier reference when a classic airline PNR is not yet available."}}}}},"BookingStatusResponse":{"type":"object","properties":{"status":{"type":"string","example":"success"},"data":{"type":"object","properties":{"id":{"type":"string","example":"booking_123"},"bookingRef":{"type":"string","example":"FND-2E58CF997B4DD234"},"status":{"type":"string","example":"QUEUED"},"totalAmount":{"type":"number","example":21000},"isUrgent":{"type":"boolean","example":false},"pnr":{"type":"string","nullable":true,"example":"ABC123","description":"Unified partner-facing convenience field. For airline-facing display, prefer pnrConfirmation, externalPNR, or supplierReference when available."},"pnrConfirmation":{"type":"string","nullable":true,"example":null,"description":"Final confirmed airline PNR when available."},"externalPNR":{"type":"string","nullable":true,"example":"ABC123","description":"Supplier-side PNR or reservation value captured from provider response."},"supplierReference":{"type":"string","nullable":true,"example":"ABC123","description":"Fallback supplier reference when a classic airline PNR is not yet available."},"createdAt":{"type":"string","format":"date-time"},"issuedAt":{"type":"string","format":"date-time","nullable":true},"expiryDate":{"type":"string","format":"date-time","nullable":true}}}}}}},"paths":{"/api/b2b/health":{"get":{"tags":["B2B Integration"],"summary":"Check integration health","description":"Returns API-key context, organization identity, granted scopes, and enabled capabilities.","security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Health and capability snapshot","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Search/read rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/b2b/sectors":{"get":{"tags":["B2B Catalog"],"summary":"List supported sectors","description":"Returns FlyNDeal route options that partner developers can use to populate route dropdowns or prebuilt search screens. This is a catalog helper endpoint, not a live availability response.","security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Partner-safe sector catalog","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SectorCatalogResponse"}}}},"401":{"description":"Missing or insufficient-scope API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Search/read rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/b2b/airlines":{"get":{"tags":["B2B Catalog"],"summary":"List supported airlines","description":"Returns a partner-safe airline catalog for UI filters, badges, or branding. Availability must still be fetched via ticket search.","security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Partner-safe airline catalog","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AirlineCatalogResponse"}}}},"401":{"description":"Missing or insufficient-scope API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Search/read rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/b2b/tickets/search":{"post":{"tags":["B2B Inventory"],"summary":"Search tickets","description":"Searches FlyNDeal unified inventory and returns standardized fare rows for the requested route and travel date. One-way search remains the default behavior. For round-trip search, send `tripType: ROUND_TRIP` with `returnDate`; the backend will perform both directions and return `outbound` plus `inbound` arrays while keeping `data` mapped to the outbound leg for backward compatibility. In partner UI language, this usually maps to a return-ticket flow.","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketSearchRequest"}}}},"responses":{"200":{"description":"Ticket search results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketSearchResponse"}}}},"400":{"description":"Payload validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Missing or insufficient-scope API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Search/read rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/b2b/tickets/grouped":{"get":{"tags":["B2B Inventory"],"summary":"List grouped ticket inventory","description":"Returns grouped FlyNDeal inventory for listing pages. Use `groups` for route blocks, `rows` inside each group for actual fares, and `meta` for pagination or infinite scroll. This endpoint is best for browsing and route discovery. For direct fare retrieval on an exact route/date, use `POST /api/b2b/tickets/search`. Grouped inventory also supports `tripType`; when `tripType=ROUND_TRIP`, `returnDate` is required and grouped rows are filtered by inbound leg date.","security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"from","in":"query","schema":{"type":"string","minLength":3,"maxLength":3},"example":"LHE"},{"name":"to","in":"query","schema":{"type":"string","minLength":3,"maxLength":3},"example":"DXB"},{"name":"date","in":"query","schema":{"type":"string","format":"date"},"example":"2026-07-12"},{"name":"tripType","in":"query","schema":{"type":"string","enum":["ONE_WAY","ROUND_TRIP"]},"example":"ROUND_TRIP"},{"name":"returnDate","in":"query","schema":{"type":"string","format":"date"},"example":"2026-07-20"},{"name":"passengers","in":"query","schema":{"type":"integer","minimum":1,"maximum":9,"default":1},"example":1},{"name":"categoryId","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"subCategoryId","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"subSubCategoryId","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"airline","in":"query","schema":{"type":"string"},"example":"AirSial"},{"name":"minPrice","in":"query","schema":{"type":"number","minimum":0},"example":80000},{"name":"maxPrice","in":"query","schema":{"type":"number","minimum":0},"example":130000},{"name":"lowSeatsOnly","in":"query","schema":{"type":"boolean","default":false},"example":false},{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1},"example":1},{"name":"pageSize","in":"query","schema":{"type":"integer","minimum":1,"maximum":500,"default":50},"example":50}],"responses":{"200":{"description":"Grouped ticket inventory","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupedTicketSearchResponse"}}}},"400":{"description":"Query validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Missing or insufficient-scope API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Search/read rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/b2b/tickets/seats":{"post":{"tags":["B2B Inventory"],"summary":"Verify seat availability","description":"Performs a pre-booking seat check. For live fares, send the original searchContext so FlyNDeal can re-validate the fare correctly.","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeatCheckRequest"}}}},"responses":{"200":{"description":"Seat verification result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeatCheckResponse"}}}},"400":{"description":"Payload validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"401":{"description":"Missing or insufficient-scope API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Search/read rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/b2b/bookings":{"post":{"tags":["B2B Bookings"],"summary":"Create booking","description":"Creates a booking request using FlyNDeal inventory. Always send a fresh idempotency-key. For live fares, send the original searchContext used during search and seat verification.","security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKeyHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingCreateRequest"}}}},"responses":{"201":{"description":"Booking request created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingCreateResponse"}}}},"400":{"description":"Validation, balance, or booking precondition failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Missing or insufficient-scope API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Referenced quote or booking target not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Idempotency conflict or in-flight duplicate request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Booking failed after validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Write/booking rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/b2b/bookings/{bookingRef}":{"get":{"tags":["B2B Bookings"],"summary":"Get booking status","description":"Returns the latest status and financial summary for a booking that belongs to the authenticated organization. This endpoint is the authoritative polling endpoint for refreshed supplier PNR/reference values.","security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/BookingRefPath"}],"responses":{"200":{"description":"Booking status record","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingStatusResponse"}}}},"401":{"description":"Missing or insufficient-scope API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Booking reference not found under this organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Search/read rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}