{"openapi":"3.0.0","paths":{"/v1/hotels":{"get":{"description":"Paginated. With checkIn/checkOut, only hotels with rooms free on those nights.","operationId":"V1HotelsController_search","parameters":[{"name":"page","required":false,"in":"query","schema":{"minimum":1,"default":1,"type":"number"}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":20,"type":"number"}},{"name":"city","required":false,"in":"query","description":"City name in English, e.g. \"Mecca\". Matches exactly.","schema":{"type":"string"}},{"name":"country","required":false,"in":"query","description":"Country name in English.","schema":{"type":"string"}},{"name":"q","required":false,"in":"query","description":"Free text: hotel name, city or area, in English or Arabic.","schema":{"type":"string"}},{"name":"checkIn","required":false,"in":"query","description":"With checkOut: only hotels with rooms free on these nights. YYYY-MM-DD.","schema":{"example":"2026-12-10","type":"string"}},{"name":"checkOut","required":false,"in":"query","description":"YYYY-MM-DD","schema":{"example":"2026-12-13","type":"string"}},{"name":"adults","required":false,"in":"query","schema":{"minimum":1,"type":"number"}},{"name":"children","required":false,"in":"query","schema":{"minimum":0,"type":"number"}},{"name":"rooms","required":false,"in":"query","schema":{"minimum":1,"type":"number"}},{"name":"stars","required":false,"in":"query","description":"Star ratings, comma-separated.","schema":{"example":"4,5","type":"string"}},{"name":"minPrice","required":false,"in":"query","description":"Lowest \"from\" price, in the hotel currency.","schema":{"type":"number"}},{"name":"maxPrice","required":false,"in":"query","schema":{"type":"number"}},{"name":"sortBy","required":false,"in":"query","schema":{"default":"priceAsc","type":"string","enum":["priceAsc","priceDesc","starsDesc","starsAsc","nameAsc","newest"]}}],"responses":{"200":{"description":""},"401":{"description":"Missing, invalid, expired or revoked API key."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"Search hotels","tags":["Hotels"],"x-required-scopes":["search:read"]}},"/v1/hotels/{id}":{"get":{"description":"Hotel content, images, amenities and room types, in English and Arabic.","operationId":"V1HotelsController_get","parameters":[{"name":"id","required":true,"in":"path","description":"Hotel id","schema":{"type":"string"}}],"responses":{"200":{"description":""},"401":{"description":"Missing, invalid, expired or revoked API key."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"Get a hotel","tags":["Hotels"],"x-required-scopes":["search:read"]}},"/v1/hotels/{id}/rates":{"get":{"description":"Every rate plan that can sell these nights to this party, priced in full. Book one with POST /v1/bookings.","operationId":"V1HotelsController_rates","parameters":[{"name":"id","required":true,"in":"path","description":"Hotel id","schema":{"type":"string"}},{"name":"checkIn","required":true,"in":"query","description":"Check-in date, YYYY-MM-DD.","schema":{"example":"2026-12-10","type":"string"}},{"name":"checkOut","required":true,"in":"query","description":"Check-out date, YYYY-MM-DD. At least one night after check-in.","schema":{"example":"2026-12-13","type":"string"}},{"name":"adults","required":true,"in":"query","description":"Adults per room.","schema":{"minimum":1,"example":2,"type":"number"}},{"name":"children","required":false,"in":"query","description":"Children per room.","schema":{"minimum":0,"default":0,"type":"number"}},{"name":"childAges","required":false,"in":"query","description":"One age per child (0-17). In a query string: comma-separated, e.g. childAges=4,9.","schema":{"example":[4,9],"type":"array","items":{"type":"number"}}},{"name":"rooms","required":false,"in":"query","description":"Number of rooms.","schema":{"minimum":1,"default":1,"type":"number"}}],"responses":{"200":{"description":""},"401":{"description":"Missing, invalid, expired or revoked API key."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"Available rates for a stay","tags":["Hotels"],"x-required-scopes":["search:read"]}},"/v1/quotes":{"post":{"description":"The exact total a booking would be charged now, with extra beds and meal upgrades. Pass price.total as expectedTotal when booking.","operationId":"V1QuotesController_quote","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteRequest"}}}},"responses":{"200":{"description":""},"401":{"description":"Missing, invalid, expired or revoked API key."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"Price a stay","tags":["Quotes"],"x-required-scopes":["search:read"]}},"/v1/bookings":{"post":{"description":"Paid from your wallet at once. The booking is PROCESSING until the hotel confirms it, then CONFIRMED with a hotelConfirmationNumber.","operationId":"V1BookingsController_create","parameters":[{"name":"Idempotency-Key","in":"header","description":"Unique per operation (8-255 chars). Retrying with the same key returns the first result.","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBookingRequest"}}}},"responses":{"201":{"description":"Booked and paid."},"401":{"description":"Missing, invalid, expired or revoked API key."},"402":{"description":"insufficient_funds: top up your wallet."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"409":{"description":"price_changed or not_available."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"Book a stay","tags":["Bookings"],"x-required-scopes":["bookings:write"]},"get":{"description":"Newest first. Bookings made on the site are included.","operationId":"V1BookingsController_list","parameters":[{"name":"page","required":false,"in":"query","schema":{"minimum":1,"default":1,"type":"number"}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":20,"type":"number"}},{"name":"status","required":false,"in":"query","schema":{"type":"string","enum":["PENDING","PROCESSING","CONFIRMED","COMPLETED","CANCELLED"]}},{"name":"clientReference","required":false,"in":"query","description":"Bookings with this clientReference.","schema":{"type":"string"}},{"name":"createdFrom","required":false,"in":"query","description":"Created at or after this instant (ISO 8601).","schema":{"type":"string"}},{"name":"createdTo","required":false,"in":"query","description":"Created before this instant (ISO 8601).","schema":{"type":"string"}}],"responses":{"200":{"description":""},"401":{"description":"Missing, invalid, expired or revoked API key."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"List your bookings","tags":["Bookings"],"x-required-scopes":["bookings:read"]}},"/v1/bookings/{bookingNumber}":{"get":{"operationId":"V1BookingsController_get","parameters":[{"name":"bookingNumber","required":true,"in":"path","schema":{"example":"BK-2026-7TQ4M2XK","type":"string"}}],"responses":{"200":{"description":""},"401":{"description":"Missing, invalid, expired or revoked API key."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"Get a booking","tags":["Bookings"],"x-required-scopes":["bookings:read"]}},"/v1/bookings/{bookingNumber}/cancel":{"post":{"description":"Before cancellation.freeCancellationUntil, cancels and refunds the full amount to your wallet. After it, or on a non-refundable rate, the answer is 409 not_refundable and support handles it.","operationId":"V1BookingsController_cancel","parameters":[{"name":"bookingNumber","required":true,"in":"path","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"Unique per operation (8-255 chars). Retrying with the same key returns the first result.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""},"401":{"description":"Missing, invalid, expired or revoked API key."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"Cancel a booking","tags":["Bookings"],"x-required-scopes":["bookings:write"]}},"/v1/wallet":{"get":{"description":"available pays for bookings; pending is top-ups awaiting review.","operationId":"V1WalletController_get","parameters":[],"responses":{"200":{"description":""},"401":{"description":"Missing, invalid, expired or revoked API key."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"Wallet balance","tags":["Wallet"],"x-required-scopes":["wallet:read"]}},"/v1/wallet/transactions":{"get":{"description":"Newest first. Amounts are signed, in the wallet currency.","operationId":"V1WalletController_transactions","parameters":[{"name":"page","required":false,"in":"query","schema":{"minimum":1,"default":1,"type":"number"}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":20,"type":"number"}},{"name":"type","required":false,"in":"query","schema":{"type":"string","enum":["TOPUP","BOOKING_PAYMENT","REFUND","ADJUSTMENT"]}}],"responses":{"200":{"description":""},"401":{"description":"Missing, invalid, expired or revoked API key."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"Wallet transactions","tags":["Wallet"],"x-required-scopes":["wallet:read"]}},"/v1/webhooks":{"get":{"operationId":"V1WebhooksController_list","parameters":[],"responses":{"200":{"description":""},"401":{"description":"Missing, invalid, expired or revoked API key."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"List webhook endpoints","tags":["Webhooks"],"x-required-scopes":["webhooks:manage"]},"post":{"description":"Returns the signing secret (whsec_…) once. Store it; it is never shown again.","operationId":"V1WebhooksController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookRequest"}}}},"responses":{"201":{"description":""},"401":{"description":"Missing, invalid, expired or revoked API key."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"Create a webhook endpoint","tags":["Webhooks"],"x-required-scopes":["webhooks:manage"]}},"/v1/webhooks/{id}":{"patch":{"description":"Change the URL, events, description, or turn it on and off.","operationId":"V1WebhooksController_update","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookRequest"}}}},"responses":{"200":{"description":""},"401":{"description":"Missing, invalid, expired or revoked API key."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"Update a webhook endpoint","tags":["Webhooks"],"x-required-scopes":["webhooks:manage"]},"delete":{"operationId":"V1WebhooksController_remove","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""},"401":{"description":"Missing, invalid, expired or revoked API key."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"Delete a webhook endpoint","tags":["Webhooks"],"x-required-scopes":["webhooks:manage"]}},"/v1/webhooks/{id}/rotate-secret":{"post":{"description":"Returns the new secret once; deliveries from now on are signed with it.","operationId":"V1WebhooksController_rotate","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""},"401":{"description":"Missing, invalid, expired or revoked API key."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"Rotate the signing secret","tags":["Webhooks"],"x-required-scopes":["webhooks:manage"]}},"/v1/webhooks/{id}/test":{"post":{"description":"Queues a webhook.test event to this endpoint within seconds.","operationId":"V1WebhooksController_test","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"202":{"description":""},"401":{"description":"Missing, invalid, expired or revoked API key."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"Send a test event","tags":["Webhooks"],"x-required-scopes":["webhooks:manage"]}},"/v1/webhooks/{id}/deliveries":{"get":{"description":"Newest first, kept 30 days: status, attempts, last HTTP status and error.","operationId":"V1WebhooksController_deliveries","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"page","required":false,"in":"query","schema":{"minimum":1,"default":1,"type":"number"}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":20,"type":"number"}},{"name":"status","required":false,"in":"query","schema":{"type":"string","enum":["PENDING","PROCESSING","SUCCEEDED","FAILED"]}}],"responses":{"200":{"description":""},"401":{"description":"Missing, invalid, expired or revoked API key."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"Delivery log","tags":["Webhooks"],"x-required-scopes":["webhooks:manage"]}},"/v1/webhooks/{id}/deliveries/{deliveryId}/retry":{"post":{"operationId":"V1WebhooksController_retry","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"deliveryId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"202":{"description":""},"401":{"description":"Missing, invalid, expired or revoked API key."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"Retry a failed delivery","tags":["Webhooks"],"x-required-scopes":["webhooks:manage"]}},"/v1/marketplace/offers":{"get":{"description":"Rooms other companies are selling. Your own offers are not listed.","operationId":"V1MarketplaceController_offers","parameters":[{"name":"country","required":false,"in":"query","description":"Country name in English.","schema":{"type":"string"}},{"name":"city","required":false,"in":"query","description":"City name in English.","schema":{"type":"string"}},{"name":"area","required":false,"in":"query","schema":{"type":"string"}},{"name":"checkIn","required":false,"in":"query","description":"With checkOut: offers that cover the whole stay.","schema":{"example":"2026-12-10","type":"string"}},{"name":"checkOut","required":false,"in":"query","schema":{"example":"2026-12-13","type":"string"}},{"name":"stars","required":false,"in":"query","description":"Star ratings.","schema":{"type":"array","items":{"type":"number"}}},{"name":"minPrice","required":false,"in":"query","schema":{"type":"number"}},{"name":"maxPrice","required":false,"in":"query","schema":{"type":"number"}},{"name":"priceCurrency","required":false,"in":"query","description":"Currency of minPrice/maxPrice.","schema":{"type":"string"}},{"name":"page","required":false,"in":"query","schema":{"minimum":1,"type":"number"}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"type":"number"}}],"responses":{"200":{"description":""},"401":{"description":"Missing, invalid, expired or revoked API key."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"Browse marketplace offers","tags":["Marketplace"],"x-required-scopes":["marketplace:read"]}},"/v1/marketplace/offers/{id}":{"get":{"operationId":"V1MarketplaceController_offer","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""},"401":{"description":"Missing, invalid, expired or revoked API key."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"Get a marketplace offer","tags":["Marketplace"],"x-required-scopes":["marketplace:read"]}},"/v1/marketplace/offers/{id}/availability":{"get":{"operationId":"V1MarketplaceController_availability","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""},"401":{"description":"Missing, invalid, expired or revoked API key."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"Rooms free per night on an offer","tags":["Marketplace"],"x-required-scopes":["marketplace:read"]}},"/v1/marketplace/offers/{id}/requests":{"post":{"description":"Creates a PENDING request at a fixed total. Pay it to hold the rooms; the seller then approves or refuses (refusal refunds your wallet).","operationId":"V1MarketplaceController_createRequest","parameters":[{"name":"id","required":true,"in":"path","description":"Offer id","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMarketplaceRequest"}}}},"responses":{"201":{"description":""},"401":{"description":"Missing, invalid, expired or revoked API key."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"Request rooms on an offer","tags":["Marketplace"],"x-required-scopes":["marketplace:write"]}},"/v1/marketplace/requests":{"get":{"operationId":"V1MarketplaceController_outgoing","parameters":[{"name":"status","required":false,"in":"query","schema":{"type":"string","enum":["PENDING","APPROVED","REJECTED","PAID","CANCELLED","EXPIRED"]}},{"name":"offerId","required":false,"in":"query","schema":{"type":"string"}},{"name":"page","required":false,"in":"query","schema":{"minimum":1,"type":"number"}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"type":"number"}}],"responses":{"200":{"description":""},"401":{"description":"Missing, invalid, expired or revoked API key."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"Your requests as a buyer","tags":["Marketplace"],"x-required-scopes":["marketplace:read"]}},"/v1/marketplace/requests/incoming":{"get":{"description":"Paid requests waiting for your answer, and decided ones. Prices are your net. The buyer is always \"Customer\".","operationId":"V1MarketplaceController_incoming","parameters":[{"name":"status","required":false,"in":"query","schema":{"type":"string","enum":["PENDING","APPROVED","REJECTED","PAID","CANCELLED","EXPIRED"]}},{"name":"offerId","required":false,"in":"query","schema":{"type":"string"}},{"name":"page","required":false,"in":"query","schema":{"minimum":1,"type":"number"}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"type":"number"}}],"responses":{"200":{"description":""},"401":{"description":"Missing, invalid, expired or revoked API key."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"Requests on your offers, as a seller","tags":["Marketplace"],"x-required-scopes":["marketplace:read"]}},"/v1/marketplace/requests/{id}":{"get":{"description":"role says which side you are on.","operationId":"V1MarketplaceController_request","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""},"401":{"description":"Missing, invalid, expired or revoked API key."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"Get a request","tags":["Marketplace"],"x-required-scopes":["marketplace:read"]}},"/v1/marketplace/requests/{id}/cancel":{"post":{"description":"Only before it is paid.","operationId":"V1MarketplaceController_cancel","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""},"401":{"description":"Missing, invalid, expired or revoked API key."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"Withdraw your request","tags":["Marketplace"],"x-required-scopes":["marketplace:write"]}},"/v1/marketplace/requests/{id}/pay":{"post":{"description":"expectedTotal must equal the request total.","operationId":"V1MarketplaceController_pay","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"Unique per operation (8-255 chars). Retrying with the same key returns the first result.","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayMarketplaceRequest"}}}},"responses":{"201":{"description":""},"401":{"description":"Missing, invalid, expired or revoked API key."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"Pay a request from your wallet","tags":["Marketplace"],"x-required-scopes":["marketplace:write"]}},"/v1/marketplace/requests/{id}/approve":{"post":{"operationId":"V1MarketplaceController_approve","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"Unique per operation (8-255 chars). Retrying with the same key returns the first result.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""},"401":{"description":"Missing, invalid, expired or revoked API key."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"Approve a paid request (seller)","tags":["Marketplace"],"x-required-scopes":["marketplace:write"]}},"/v1/marketplace/requests/{id}/reject":{"post":{"description":"A paid request is refunded to the buyer at once.","operationId":"V1MarketplaceController_reject","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"Unique per operation (8-255 chars). Retrying with the same key returns the first result.","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReasonInput"}}}},"responses":{"200":{"description":""},"401":{"description":"Missing, invalid, expired or revoked API key."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"Refuse a request (seller)","tags":["Marketplace"],"x-required-scopes":["marketplace:write"]}},"/v1/special-requests":{"post":{"description":"Companies quote until expiresInHours; several can fill one request between them. At most 10 open requests.","operationId":"V1SpecialRequestsController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSpecialRequest"}}}},"responses":{"201":{"description":""},"401":{"description":"Missing, invalid, expired or revoked API key."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"Ask companies to quote","tags":["Special requests"],"x-required-scopes":["special_requests:write"]},"get":{"operationId":"V1SpecialRequestsController_mine","parameters":[],"responses":{"200":{"description":""},"401":{"description":"Missing, invalid, expired or revoked API key."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"Your special requests","tags":["Special requests"],"x-required-scopes":["special_requests:read"]}},"/v1/special-requests/inbox":{"get":{"description":"Other companies' open requests in your preferred countries, and ones you quoted. The requester is always \"Customer\".","operationId":"V1SpecialRequestsController_inbox","parameters":[],"responses":{"200":{"description":""},"401":{"description":"Missing, invalid, expired or revoked API key."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"Requests you can quote on","tags":["Special requests"],"x-required-scopes":["special_requests:read"]}},"/v1/special-requests/{id}":{"get":{"description":"As requester: every quote, named Customer 1, 2… by price. As a quoting company: only your own quote.","operationId":"V1SpecialRequestsController_get","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""},"401":{"description":"Missing, invalid, expired or revoked API key."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"Get a special request","tags":["Special requests"],"x-required-scopes":["special_requests:read"]}},"/v1/special-requests/{id}/cancel":{"post":{"operationId":"V1SpecialRequestsController_cancel","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""},"401":{"description":"Missing, invalid, expired or revoked API key."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"Cancel your special request","tags":["Special requests"],"x-required-scopes":["special_requests:write"]}},"/v1/special-requests/{id}/quote":{"put":{"description":"One quote per company; prices are your net.","operationId":"V1SpecialRequestsController_quote","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertQuote"}}}},"responses":{"200":{"description":""},"401":{"description":"Missing, invalid, expired or revoked API key."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"Submit or update your quote","tags":["Special requests"],"x-required-scopes":["special_requests:write"]}},"/v1/special-requests/{id}/quotes/{quoteId}/withdraw":{"post":{"operationId":"V1SpecialRequestsController_withdraw","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"quoteId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""},"401":{"description":"Missing, invalid, expired or revoked API key."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"Withdraw your quote","tags":["Special requests"],"x-required-scopes":["special_requests:write"]}},"/v1/special-requests/{id}/quotes/{quoteId}/reject":{"post":{"operationId":"V1SpecialRequestsController_rejectQuote","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"quoteId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReasonInput"}}}},"responses":{"200":{"description":""},"401":{"description":"Missing, invalid, expired or revoked API key."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"Refuse a quote (requester)","tags":["Special requests"],"x-required-scopes":["special_requests:write"]}},"/v1/special-requests/{id}/quotes/{quoteId}/accept":{"post":{"description":"Takes its rooms, up to what is still needed, and holds them until paymentDueAt. Pay with …/pay.","operationId":"V1SpecialRequestsController_accept","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"quoteId","required":true,"in":"path","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"Unique per operation (8-255 chars). Retrying with the same key returns the first result.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""},"401":{"description":"Missing, invalid, expired or revoked API key."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"Accept a quote (requester)","tags":["Special requests"],"x-required-scopes":["special_requests:write"]}},"/v1/special-requests/{id}/quotes/{quoteId}/pay":{"post":{"description":"Creates the booking. expectedTotal must equal the accepted price (with any extra beds or upgrade).","operationId":"V1SpecialRequestsController_pay","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"quoteId","required":true,"in":"path","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","description":"Unique per operation (8-255 chars). Retrying with the same key returns the first result.","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaySpecialRequestQuote"}}}},"responses":{"201":{"description":""},"401":{"description":"Missing, invalid, expired or revoked API key."},"403":{"description":"Missing scope, address not allowed, or a browser request."},"429":{"description":"Rate limit reached; see Retry-After."}},"security":[{"apiKey":[]}],"summary":"Pay an accepted quote from your wallet","tags":["Special requests"],"x-required-scopes":["special_requests:write","bookings:write"]}}},"info":{"title":"Life Dream Partner API","description":"Search hotels, price stays and book them from your own website, paid from your company wallet. Server-to-server only. Guides: https://lifedream.net/developers","version":"1.0","contact":{}},"tags":[],"servers":[{"url":"https://api.lifedream.net","description":"Production (ld_live_ keys)"},{"url":"https://dev.lifedream.net/api","description":"Sandbox (ld_test_ keys)"}],"components":{"securitySchemes":{"apiKey":{"scheme":"bearer","bearerFormat":"JWT","type":"http","description":"An API key. Scopes: search:read, bookings:read, bookings:write, wallet:read, webhooks:manage, marketplace:read, marketplace:write, special_requests:read, special_requests:write."}},"schemas":{"RequestApiAccessDto":{"type":"object","properties":{}},"CreateApiKeyDto":{"type":"object","properties":{}},"ReviewApiAccessDto":{"type":"object","properties":{}},"QuoteRequest":{"type":"object","properties":{"checkIn":{"type":"string","example":"2026-12-10","description":"Check-in date, YYYY-MM-DD."},"checkOut":{"type":"string","example":"2026-12-13","description":"Check-out date, YYYY-MM-DD. At least one night after check-in."},"adults":{"type":"number","minimum":1,"example":2,"description":"Adults per room."},"children":{"type":"number","minimum":0,"default":0,"description":"Children per room."},"childAges":{"example":[4,9],"description":"One age per child (0-17). In a query string: comma-separated, e.g. childAges=4,9.","type":"array","items":{"type":"number"}},"rooms":{"type":"number","minimum":1,"default":1,"description":"Number of rooms."},"ratePlanId":{"type":"string","description":"A rate plan id from GET /v1/hotels/{id}/rates."},"extraBeds":{"type":"number","minimum":0,"maximum":20,"description":"Extra beds per room, per night. Omitted: what the party needs. Ignored by plans that do not sell extra beds."},"mealUpgradeId":{"type":"string","description":"A meal upgrade id from the rate plan, to buy a fuller board on top of its own."}},"required":["checkIn","checkOut","adults","ratePlanId"]},"GuestInput":{"type":"object","properties":{"name":{"type":"string","example":"Ahmed Ali","description":"Lead guest, as the hotel will see it."},"email":{"type":"string","example":"reservations@your-agency.com","description":"Receives the booking emails, including the hotel confirmation number. Use your own address if guests should not be contacted."},"phone":{"type":"string","example":"+966500000000"}},"required":["name","email"]},"CreateBookingRequest":{"type":"object","properties":{"checkIn":{"type":"string","example":"2026-12-10","description":"Check-in date, YYYY-MM-DD."},"checkOut":{"type":"string","example":"2026-12-13","description":"Check-out date, YYYY-MM-DD. At least one night after check-in."},"adults":{"type":"number","minimum":1,"example":2,"description":"Adults per room."},"children":{"type":"number","minimum":0,"default":0,"description":"Children per room."},"childAges":{"example":[4,9],"description":"One age per child (0-17). In a query string: comma-separated, e.g. childAges=4,9.","type":"array","items":{"type":"number"}},"rooms":{"type":"number","minimum":1,"default":1,"description":"Number of rooms."},"ratePlanId":{"type":"string","description":"A rate plan id from GET /v1/hotels/{id}/rates."},"extraBeds":{"type":"number","minimum":0,"maximum":20,"description":"Extra beds per room, per night. Omitted: what the party needs. Ignored by plans that do not sell extra beds."},"mealUpgradeId":{"type":"string","description":"A meal upgrade id from the rate plan, to buy a fuller board on top of its own."},"guest":{"$ref":"#/components/schemas/GuestInput"},"expectedTotal":{"type":"number","example":1350,"description":"The total you were quoted (POST /v1/quotes), in the quote currency. If the price changed since, the booking is refused with price_changed and nothing is charged."},"hbVariant":{"type":"string","enum":["BREAKFAST_LUNCH","BREAKFAST_DINNER"],"description":"Half board only: which two meals."},"notes":{"type":"string","maxLength":1000,"description":"Requests passed to the hotel (not guaranteed)."},"clientReference":{"type":"string","maxLength":100,"example":"ORD-88213","description":"Your own id for this booking, returned on every read."}},"required":["checkIn","checkOut","adults","ratePlanId","guest","expectedTotal"]},"CreateWebhookRequest":{"type":"object","properties":{"url":{"type":"string","example":"https://your-agency.com/hooks/lifedream","description":"HTTPS URL on your server."},"events":{"type":"array","example":["booking.confirmed","booking.cancelled"],"items":{"type":"string","enum":["booking.paid","booking.confirmed","booking.cancelled","wallet.topup.approved","wallet.topup.rejected","marketplace.request.paid","marketplace.request.approved","marketplace.request.rejected","special_request.quote.received","special_request.quote.paid","special_request.quote.rejected"]}},"description":{"type":"string","maxLength":200}},"required":["url","events"]},"UpdateWebhookRequest":{"type":"object","properties":{"url":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["booking.paid","booking.confirmed","booking.cancelled","wallet.topup.approved","wallet.topup.rejected","marketplace.request.paid","marketplace.request.approved","marketplace.request.rejected","special_request.quote.received","special_request.quote.paid","special_request.quote.rejected"]}},"description":{"type":"string","maxLength":200},"isActive":{"type":"boolean","description":"Turn the endpoint on or off. Turning it on clears an automatic disable."}}},"CreateMarketplaceRequest":{"type":"object","properties":{"checkIn":{"type":"string","example":"2026-12-10","description":"Inside the offer window."},"checkOut":{"type":"string","example":"2026-12-13"},"rooms":{"type":"number","minimum":1},"adults":{"type":"number","description":"Adults per room, when the offer prices by party size."},"guestNationality":{"type":"string","example":"SA","description":"ISO 3166-1 alpha-2 of the guests."},"extraBeds":{"type":"number","maximum":20},"mealUpgradeId":{"type":"string","description":"A meal upgrade id from the offer."},"hbVariant":{"type":"string","enum":["BREAKFAST_LUNCH","BREAKFAST_DINNER"]},"buyerNotes":{"type":"string","maxLength":1000,"description":"Shown to the seller."}},"required":["checkIn","checkOut","rooms"]},"PayMarketplaceRequest":{"type":"object","properties":{"guest":{"$ref":"#/components/schemas/GuestInput"},"expectedTotal":{"type":"number","description":"The total you expect to pay, in the request or quote currency. A different price is refused with price_changed."},"notes":{"type":"string","maxLength":1000},"clientReference":{"type":"string","maxLength":100,"description":"Your own id, returned on the booking."}},"required":["guest","expectedTotal"]},"ReasonInput":{"type":"object","properties":{"reason":{"type":"string","maxLength":1000}}},"CreateSpecialRequest":{"type":"object","properties":{"kind":{"type":"string","enum":["EXISTING_HOTEL","NEW_HOTEL"],"description":"EXISTING_HOTEL (give hotelId, optional roomId) or NEW_HOTEL (describe it)."},"hotelId":{"type":"string"},"roomId":{"type":"string"},"countryCode":{"type":"string","example":"SA"},"country":{"type":"string"},"city":{"type":"string"},"area":{"type":"string"},"hotelName":{"type":"string"},"roomTypeName":{"type":"string"},"checkInDate":{"type":"string","example":"2026-12-10"},"checkOutDate":{"type":"string","example":"2026-12-13"},"numberOfRooms":{"type":"number","minimum":1,"maximum":500},"numberOfAdults":{"type":"number","minimum":1,"maximum":20,"description":"Adults per room."},"numberOfChildren":{"type":"number"},"childAges":{"type":"array","items":{"type":"number"}},"guestNationality":{"type":"string","example":"SA"},"view":{"type":"string"},"mealPlan":{"type":"string","enum":["RO","BB","HB","FB","AI"]},"hbVariant":{"type":"string","enum":["BREAKFAST_LUNCH","BREAKFAST_DINNER"]},"expiresInHours":{"type":"number","minimum":1,"maximum":168,"default":24,"description":"How long companies may quote."},"notes":{"type":"string","maxLength":2000},"currency":{"type":"string","example":"USD"}},"required":["kind","checkInDate","checkOutDate","numberOfRooms","numberOfAdults"]},"UpsertQuote":{"type":"object","properties":{"netPricePerNight":{"type":"number","description":"Your net price per room per night; the requester sees it with commission."},"currency":{"type":"string","example":"USD"},"roomsAvailable":{"type":"number","minimum":1,"description":"Rooms you can supply, at most what is still needed."},"mealPlan":{"type":"string","enum":["RO","BB","HB","FB","AI"]},"hbVariant":{"type":"string","enum":["BREAKFAST_LUNCH","BREAKFAST_DINNER"]},"mealNetPerPerson":{"type":"number"},"kitchenType":{"type":"string"},"nusukHotelId":{"type":"string","description":"Your Nusuk code for the hotel; required unless one is on file."},"checkInDate":{"type":"string","description":"Both or neither; inside the request dates. Default: the whole request."},"checkOutDate":{"type":"string"},"view":{"type":"string"},"baseOccupancy":{"type":"number"},"maxAdults":{"type":"number"},"extraBedNetPerNight":{"type":"number"},"cancellationType":{"type":"string","enum":["NON_REFUNDABLE","FLEXIBLE"]},"freeCancellationDays":{"type":"number","minimum":1,"maximum":60},"cancellationPolicy":{"type":"string"},"notes":{"type":"string"}},"required":["netPricePerNight","roomsAvailable"]},"PaySpecialRequestQuote":{"type":"object","properties":{"guest":{"$ref":"#/components/schemas/GuestInput"},"expectedTotal":{"type":"number","description":"The total you expect to pay, in the request or quote currency. A different price is refused with price_changed."},"notes":{"type":"string","maxLength":1000},"clientReference":{"type":"string","maxLength":100,"description":"Your own id, returned on the booking."},"extraBeds":{"type":"number","minimum":0,"maximum":20},"mealUpgradeId":{"type":"string","description":"A meal upgrade id from the accepted quote."},"hbVariant":{"type":"string","enum":["BREAKFAST_LUNCH","BREAKFAST_DINNER"]}},"required":["guest","expectedTotal"]}}}}