Skip to content

    Partner API

    Sell Life Dream hotels on your own website. Search, price and book from your servers, paid from your company wallet.

    Quick start

    1. Sign up as a company on Life Dream and wait for your account to be approved.

    2. In your account, open the API tab and request access. Tell us what you will build; we answer within one business day.

    3. Once approved, create an API key with only the permissions it needs. Copy it — it is shown once.

    4. Top up your wallet. Bookings made through the API are paid from it instantly.

    5. Make your first call from your server:

    curl https://api.lifedream.net/v1/hotels?city=Mecca \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY"

    Environments

    The sandbox runs the next version of the site against test data. Ask us for a sandbox company account and a test wallet balance. A test key never works in production and a live key never works in the sandbox.

    EnvironmentBase URLKeys
    Productionhttps://api.lifedream.netld_live_…
    Sandboxhttps://dev.lifedream.net/apild_test_…

    Authentication and key safety

    Send the key in the Authorization header on every request: Authorization: Bearer ld_live_…

    The API is server-to-server only. Requests from a browser (any request carrying an Origin header) are refused, and the API sends no CORS headers, so a key placed in a web page or a mobile app cannot work — and would be stolen. Keep keys in your server's secret store or environment variables, never in a code repository.

    A key in a URL is refused even when valid, because URLs end up in logs. If that happens, treat the key as exposed and rotate it.

    Give each key only the scopes it needs, and pin it to your servers' IP addresses when you can. To rotate: create the new key, deploy it, then revoke the old one from the API tab. Revoking takes effect on the next request.

    We store only a keyed fingerprint of each key. Nobody at Life Dream can read your key back, so a lost key is replaced, not recovered.

    ScopeAllows
    search:readHotels, rooms, available rates and quotes
    bookings:readReading your bookings
    bookings:writeBooking (paid from your wallet) and cancelling
    wallet:readWallet balance and transactions
    webhooks:manageWebhook endpoints
    marketplace:readBrowse offers, read your requests
    marketplace:writeRequest, pay, approve and refuse
    special_requests:readRead special requests
    special_requests:writeCreate, quote, accept and pay

    Booking flow

    1. GET /v1/hotels — find hotels by city, text or dates.

    2. GET /v1/hotels/{id}/rates — every rate plan that can sell your nights to your party, fully priced, with its board, cancellation terms and meal upgrades.

    3. POST /v1/quotes — the exact total for the rate you chose, with extra beds or an upgrade. Show this total to your customer.

    4. POST /v1/bookings — book it, sending the quoted total as expectedTotal. The booking is paid from your wallet at once and starts as PROCESSING.

    5. GET /v1/bookings/{bookingNumber} — the hotel confirms within hours; the status becomes CONFIRMED and hotelConfirmationNumber is filled in. The guest email you gave also receives it.

    curl -X POST https://api.lifedream.net/v1/bookings \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY" \
      -H "Idempotency-Key: order-88213" \
      -H "Content-Type: application/json" \
      -d '{
        "ratePlanId": "…",
        "checkIn": "2026-12-10",
        "checkOut": "2026-12-13",
        "adults": 2,
        "expectedTotal": 1350,
        "clientReference": "ORD-88213",
        "guest": { "name": "Ahmed Ali", "email": "reservations@your-agency.com" }
      }'

    Idempotency

    Every POST that moves money — booking and cancelling — needs an Idempotency-Key header: a unique value per operation, such as your order id.

    If a request times out, retry it with the same key and the same body. You get the original result (marked Idempotent-Replayed: true) instead of a second booking. The same key with a different body is refused with 422. Keys are remembered for 24 hours.

    If the first attempt failed on our side (5xx), retries with that key answer 409 outcome_unknown: the booking may have gone through. Look it up with GET /v1/bookings?clientReference=… before trying again with a new key.

    Prices, currency and anonymity

    Every price is the final price you pay, in the currency of the rate plan. Your wallet is charged in its own currency at our rate of the day; the wallet transaction shows both amounts.

    The price is always worked out on our side. If it changed between your quote and your booking, the booking is refused with price_changed and nothing is charged — quote again and confirm with your customer.

    Companies trading on Life Dream stay anonymous to each other: no response names the company selling a rate, and no seller ever sees who bought from it.

    A nationality rule on a rate is shown for information only; it never blocks a booking.

    Cancellation and refunds

    Each rate and booking carries cancellation.freeCancellationUntil — the exact instant until which it can be cancelled for free: 23:59 Cairo time on the deadline day, and at the latest the night before check-in.

    Before that instant, POST /v1/bookings/{bookingNumber}/cancel cancels the booking and refunds the full amount paid to your wallet at once. After it, on the check-in day, or on a non-refundable rate, the answer is 409 not_refundable: contact support.

    The terms are frozen on the booking when it is made, so later changes to the rate plan never change what you agreed to.

    Marketplace

    Companies sell rooms on the offers board. As a buyer: browse GET /v1/marketplace/offers, request rooms on an offer (POST /v1/marketplace/offers/{id}/requests) at a fixed total, then pay it from your wallet (POST /v1/marketplace/requests/{id}/pay, with Idempotency-Key and expectedTotal). Paying is what holds the rooms; the seller then approves, or refuses and your wallet is refunded at once.

    As a seller: GET /v1/marketplace/requests/incoming lists paid requests waiting for your answer; approve or reject them. Prices you see are your net. Publishing offers stays on the site for now.

    The other company is always "Customer": no name, id, email or Nusuk code of a counterparty is ever returned.

    Webhook eventGoes to
    marketplace.request.paidSeller — a buyer paid; answer it
    marketplace.request.approvedBuyer
    marketplace.request.rejectedBuyer (with booking.cancelled and the refund)

    Special requests

    Ask several companies to quote for rooms: POST /v1/special-requests. Quotes arrive until it expires (24 h by default); GET /v1/special-requests/{id} lists them as Customer 1, 2… in price order. Accept one (it holds its rooms until paymentDueAt), then pay it from your wallet with …/quotes/{quoteId}/pay. Several quotes can fill one request between them.

    To quote: GET /v1/special-requests/inbox, then PUT /v1/special-requests/{id}/quote with your net price. You see only your own quote. You are told of a sale when the requester pays — an unpaid acceptance is only a hold and can lapse.

    Webhook eventGoes to
    special_request.quote.receivedRequester — a company quoted or revised its quote
    special_request.quote.paidQuoting company — its accepted quote was paid for
    special_request.quote.rejectedQuoting company

    Webhooks

    Instead of polling, register an HTTPS URL on your server with POST /v1/webhooks (scope webhooks:manage). We POST a JSON event to it when something changes. The response includes a signing secret (whsec_…) once — store it like a password.

    Answer with any 2xx within 10 seconds. Anything else is retried after 30 s, 2 min, 10 min, 1 h, 6 h and 24 h. After ten events in a row fail every retry, the endpoint is switched off; turn it back on with PATCH /v1/webhooks/{id} {"isActive": true}. GET /v1/webhooks/{id}/deliveries shows the last 30 days.

    The same event can arrive twice: deduplicate on its id (also in the LD-Event-Id header). Events may arrive out of order; read status from the payload, or fetch the booking.

    The URL must be public HTTPS. Addresses inside private networks, localhost, and redirects are refused.

    EventWhen
    booking.paidA booking of yours is paid (from your wallet, or an approved bank transfer)
    booking.confirmedThe hotel confirmed it; hotelConfirmationNumber is set
    booking.cancelledIt was cancelled — by you, by support, or refused by the seller
    wallet.topup.approvedA wallet top-up was approved and credited
    wallet.topup.rejectedA wallet top-up was refused, with the reason
    webhook.testSent only by POST /v1/webhooks/{id}/test
    {
      "id": "evt_8c1f…",
      "type": "booking.confirmed",
      "createdAt": "2026-12-01T09:12:44.000Z",
      "data": { "booking": { "bookingNumber": "BK-2026-7TQ4M2XK", "status": "CONFIRMED", "hotelConfirmationNumber": "H-55120", "…": "same shape as GET /v1/bookings/{bookingNumber}" } }
    }

    Verifying webhook signatures

    Every delivery carries LD-Signature: t=<unix seconds>,v1=<signature>. The signature is HMAC-SHA256 of "<t>.<raw body>" with your endpoint's secret, in hex. Compute it over the raw body (before any JSON parsing), compare in constant time, and refuse timestamps older than five minutes so a captured request cannot be replayed.

    Rotate the secret with POST /v1/webhooks/{id}/rotate-secret; deliveries from then on are signed with the new one.

    // Node.js (Express): verify before trusting the body
    const crypto = require('crypto');
    app.post('/hooks/lifedream', express.raw({ type: 'application/json' }), (req, res) => {
      const header = req.get('LD-Signature') || '';
      const { t, v1 } = Object.fromEntries(header.split(',').map((p) => p.split('=')));
      const expected = crypto.createHmac('sha256', process.env.LIFEDREAM_WEBHOOK_SECRET)
        .update(`${t}.${req.body}`).digest('hex');
      const fresh = Math.abs(Date.now() / 1000 - Number(t)) < 300;
      if (!fresh || !v1 || v1.length !== expected.length ||
          !crypto.timingSafeEqual(Buffer.from(v1), Buffer.from(expected))) {
        return res.sendStatus(400);
      }
      const event = JSON.parse(req.body);
      // Deduplicate on event.id: the same event can arrive more than once.
      res.sendStatus(204);
    });
    
    <?php // PHP
    $payload = file_get_contents('php://input');
    parse_str(str_replace(',', '&', $_SERVER['HTTP_LD_SIGNATURE'] ?? ''), $sig);
    $expected = hash_hmac('sha256', $sig['t'] . '.' . $payload, getenv('LIFEDREAM_WEBHOOK_SECRET'));
    if (abs(time() - (int) $sig['t']) > 300 || !hash_equals($expected, $sig['v1'] ?? '')) {
        http_response_code(400); exit;
    }
    $event = json_decode($payload, true);
    http_response_code(204);
    
    # Python (Flask)
    import hashlib, hmac, os, time
    from flask import request, abort
    
    @app.post('/hooks/lifedream')
    def lifedream_hook():
        sig = dict(p.split('=', 1) for p in request.headers.get('LD-Signature', '').split(','))
        body = request.get_data()
        expected = hmac.new(os.environ['LIFEDREAM_WEBHOOK_SECRET'].encode(),
                            sig['t'].encode() + b'.' + body, hashlib.sha256).hexdigest()
        if abs(time.time() - int(sig['t'])) > 300 or not hmac.compare_digest(expected, sig.get('v1', '')):
            abort(400)
        event = request.get_json()
        return '', 204

    Errors

    Errors share one shape. Branch on code; show message to people. Send Accept-Language: ar to receive messages in Arabic. Quote requestId (also in the X-Request-Id header) when you contact support.

    StatusCodes
    400validation_failed, invalid_json, invalid_dates, idempotency_key_required, api_key_in_url, invalid_webhook_url
    401missing_api_key, invalid_api_key, expired_api_key, revoked_api_key, wrong_environment_api_key, company_inactive_api_key, access_revoked_api_key
    402insufficient_funds
    403insufficient_scope, ip_not_allowed, browser_not_allowed
    404not_found (unknown path), hotel_not_found, rate_plan_not_found, booking_not_found, webhook_not_found, delivery_not_found, offer_not_found, request_not_found
    409price_changed, not_available, not_refundable, already_cancelled, not_cancellable, cancel_via_support, request_in_progress, outcome_unknown, too_many_webhooks, webhook_disabled, test_pending, quote_locked
    422idempotency_key_reused
    429rate_limited
    {
      "error": {
        "code": "price_changed",
        "message": "The price is now 1390.00 USD, not 1350.00. …",
        "requestId": "req_4f1c…"
      }
    }

    Rate limits

    Each key may make 120 requests a minute, and 30 a minute to booking and cancelling; all of a company's keys together may make 300 a minute. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset; a 429 carries Retry-After in seconds. Need more? Tell us what you are building.

    Cache hotel content (names, images, amenities) on your side for a day; rates and quotes change and should be asked for live.

    API reference

    Generated from the live API, so it is always current. Field names are in English; every text field that has an Arabic version comes with an Ar twin (name / nameAr).

    Hotels

    get/v1/hotels/{id}

    Get a hotel

    Hotel content, images, amenities and room types, in English and Arabic.

    Scope: search:read

    Parameters
    nameintyperequired
    idpathstring✓Hotel id
    Responses
    • 200
    • 401Missing, invalid, expired or revoked API key.
    • 403Missing scope, address not allowed, or a browser request.
    • 429Rate limit reached; see Retry-After.
    Example
    curl "https://api.lifedream.net/v1/hotels/{id}" \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY"
    get/v1/hotels/{id}/rates

    Available rates for a stay

    Every rate plan that can sell these nights to this party, priced in full. Book one with POST /v1/bookings.

    Scope: search:read

    Parameters
    nameintyperequired
    idpathstring✓Hotel id
    checkInquerystring✓Check-in date, YYYY-MM-DD.
    checkOutquerystring✓Check-out date, YYYY-MM-DD. At least one night after check-in.
    adultsquerynumber✓Adults per room.
    childrenquerynumberChildren per room.
    childAgesquerynumber[]One age per child (0-17). In a query string: comma-separated, e.g. childAges=4,9.
    roomsquerynumberNumber of rooms.
    Responses
    • 200
    • 401Missing, invalid, expired or revoked API key.
    • 403Missing scope, address not allowed, or a browser request.
    • 429Rate limit reached; see Retry-After.
    Example
    curl "https://api.lifedream.net/v1/hotels/{id}/rates" \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY"

    Quotes

    post/v1/quotes

    Price a stay

    The exact total a booking would be charged now, with extra beds and meal upgrades. Pass price.total as expectedTotal when booking.

    Scope: search:read

    Request body
    fieldtyperequired
    checkInstring✓Check-in date, YYYY-MM-DD.
    checkOutstring✓Check-out date, YYYY-MM-DD. At least one night after check-in.
    adultsnumber✓Adults per room.
    childrennumberChildren per room.
    childAgesnumber[]One age per child (0-17). In a query string: comma-separated, e.g. childAges=4,9.
    roomsnumberNumber of rooms.
    ratePlanIdstring✓A rate plan id from GET /v1/hotels/{id}/rates.
    extraBedsnumberExtra beds per room, per night. Omitted: what the party needs. Ignored by plans that do not sell extra beds.
    mealUpgradeIdstringA meal upgrade id from the rate plan, to buy a fuller board on top of its own.
    Responses
    • 200
    • 401Missing, invalid, expired or revoked API key.
    • 403Missing scope, address not allowed, or a browser request.
    • 429Rate limit reached; see Retry-After.
    Example
    curl -X POST "https://api.lifedream.net/v1/quotes" \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY" \
      -H "Content-Type: application/json" -d @body.json

    Bookings

    post/v1/bookings

    Book a stay

    Paid from your wallet at once. The booking is PROCESSING until the hotel confirms it, then CONFIRMED with a hotelConfirmationNumber.

    Scope: bookings:write

    Parameters
    nameintyperequired
    Idempotency-Keyheaderstring✓Unique per operation (8-255 chars). Retrying with the same key returns the first result.
    Request body
    fieldtyperequired
    checkInstring✓Check-in date, YYYY-MM-DD.
    checkOutstring✓Check-out date, YYYY-MM-DD. At least one night after check-in.
    adultsnumber✓Adults per room.
    childrennumberChildren per room.
    childAgesnumber[]One age per child (0-17). In a query string: comma-separated, e.g. childAges=4,9.
    roomsnumberNumber of rooms.
    ratePlanIdstring✓A rate plan id from GET /v1/hotels/{id}/rates.
    extraBedsnumberExtra beds per room, per night. Omitted: what the party needs. Ignored by plans that do not sell extra beds.
    mealUpgradeIdstringA meal upgrade id from the rate plan, to buy a fuller board on top of its own.
    guest.namestring✓Lead guest, as the hotel will see it.
    guest.emailstring✓Receives the booking emails, including the hotel confirmation number. Use your own address if guests should not be contacted.
    guest.phonestring
    expectedTotalnumber✓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.
    hbVariantBREAKFAST_LUNCH | BREAKFAST_DINNERHalf board only: which two meals.
    notesstringRequests passed to the hotel (not guaranteed).
    clientReferencestringYour own id for this booking, returned on every read.
    Responses
    • 201Booked and paid.
    • 401Missing, invalid, expired or revoked API key.
    • 402insufficient_funds: top up your wallet.
    • 403Missing scope, address not allowed, or a browser request.
    • 409price_changed or not_available.
    • 429Rate limit reached; see Retry-After.
    Example
    curl -X POST "https://api.lifedream.net/v1/bookings" \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY" \
      -H "Idempotency-Key: <unique-per-operation>" \
      -H "Content-Type: application/json" -d @body.json
    get/v1/bookings

    List your bookings

    Newest first. Bookings made on the site are included.

    Scope: bookings:read

    Parameters
    nameintyperequired
    pagequerynumber
    limitquerynumber
    statusqueryPENDING | PROCESSING | CONFIRMED | COMPLETED | CANCELLED
    clientReferencequerystringBookings with this clientReference.
    createdFromquerystringCreated at or after this instant (ISO 8601).
    createdToquerystringCreated before this instant (ISO 8601).
    Responses
    • 200
    • 401Missing, invalid, expired or revoked API key.
    • 403Missing scope, address not allowed, or a browser request.
    • 429Rate limit reached; see Retry-After.
    Example
    curl "https://api.lifedream.net/v1/bookings" \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY"
    get/v1/bookings/{bookingNumber}

    Get a booking

    Scope: bookings:read

    Parameters
    nameintyperequired
    bookingNumberpathstring✓
    Responses
    • 200
    • 401Missing, invalid, expired or revoked API key.
    • 403Missing scope, address not allowed, or a browser request.
    • 429Rate limit reached; see Retry-After.
    Example
    curl "https://api.lifedream.net/v1/bookings/{bookingNumber}" \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY"
    post/v1/bookings/{bookingNumber}/cancel

    Cancel a booking

    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.

    Scope: bookings:write

    Parameters
    nameintyperequired
    bookingNumberpathstring✓
    Idempotency-Keyheaderstring✓Unique per operation (8-255 chars). Retrying with the same key returns the first result.
    Responses
    • 200
    • 401Missing, invalid, expired or revoked API key.
    • 403Missing scope, address not allowed, or a browser request.
    • 429Rate limit reached; see Retry-After.
    Example
    curl -X POST "https://api.lifedream.net/v1/bookings/{bookingNumber}/cancel" \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY" \
      -H "Idempotency-Key: <unique-per-operation>"

    Wallet

    get/v1/wallet

    Wallet balance

    available pays for bookings; pending is top-ups awaiting review.

    Scope: wallet:read

    Responses
    • 200
    • 401Missing, invalid, expired or revoked API key.
    • 403Missing scope, address not allowed, or a browser request.
    • 429Rate limit reached; see Retry-After.
    Example
    curl "https://api.lifedream.net/v1/wallet" \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY"
    get/v1/wallet/transactions

    Wallet transactions

    Newest first. Amounts are signed, in the wallet currency.

    Scope: wallet:read

    Parameters
    nameintyperequired
    pagequerynumber
    limitquerynumber
    typequeryTOPUP | BOOKING_PAYMENT | REFUND | ADJUSTMENT
    Responses
    • 200
    • 401Missing, invalid, expired or revoked API key.
    • 403Missing scope, address not allowed, or a browser request.
    • 429Rate limit reached; see Retry-After.
    Example
    curl "https://api.lifedream.net/v1/wallet/transactions" \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY"

    Webhooks

    get/v1/webhooks

    List webhook endpoints

    Scope: webhooks:manage

    Responses
    • 200
    • 401Missing, invalid, expired or revoked API key.
    • 403Missing scope, address not allowed, or a browser request.
    • 429Rate limit reached; see Retry-After.
    Example
    curl "https://api.lifedream.net/v1/webhooks" \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY"
    post/v1/webhooks

    Create a webhook endpoint

    Returns the signing secret (whsec_…) once. Store it; it is never shown again.

    Scope: webhooks:manage

    Request body
    fieldtyperequired
    urlstring✓HTTPS URL on your server.
    eventsbooking.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[]✓
    descriptionstring
    Responses
    • 201
    • 401Missing, invalid, expired or revoked API key.
    • 403Missing scope, address not allowed, or a browser request.
    • 429Rate limit reached; see Retry-After.
    Example
    curl -X POST "https://api.lifedream.net/v1/webhooks" \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY" \
      -H "Content-Type: application/json" -d @body.json
    patch/v1/webhooks/{id}

    Update a webhook endpoint

    Change the URL, events, description, or turn it on and off.

    Scope: webhooks:manage

    Parameters
    nameintyperequired
    idpathstring✓
    Request body
    fieldtyperequired
    urlstring
    eventsbooking.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[]
    descriptionstring
    isActivebooleanTurn the endpoint on or off. Turning it on clears an automatic disable.
    Responses
    • 200
    • 401Missing, invalid, expired or revoked API key.
    • 403Missing scope, address not allowed, or a browser request.
    • 429Rate limit reached; see Retry-After.
    Example
    curl -X PATCH "https://api.lifedream.net/v1/webhooks/{id}" \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY" \
      -H "Content-Type: application/json" -d @body.json
    delete/v1/webhooks/{id}

    Delete a webhook endpoint

    Scope: webhooks:manage

    Parameters
    nameintyperequired
    idpathstring✓
    Responses
    • 200
    • 401Missing, invalid, expired or revoked API key.
    • 403Missing scope, address not allowed, or a browser request.
    • 429Rate limit reached; see Retry-After.
    Example
    curl -X DELETE "https://api.lifedream.net/v1/webhooks/{id}" \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY"
    post/v1/webhooks/{id}/rotate-secret

    Rotate the signing secret

    Returns the new secret once; deliveries from now on are signed with it.

    Scope: webhooks:manage

    Parameters
    nameintyperequired
    idpathstring✓
    Responses
    • 200
    • 401Missing, invalid, expired or revoked API key.
    • 403Missing scope, address not allowed, or a browser request.
    • 429Rate limit reached; see Retry-After.
    Example
    curl -X POST "https://api.lifedream.net/v1/webhooks/{id}/rotate-secret" \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY"
    post/v1/webhooks/{id}/test

    Send a test event

    Queues a webhook.test event to this endpoint within seconds.

    Scope: webhooks:manage

    Parameters
    nameintyperequired
    idpathstring✓
    Responses
    • 202
    • 401Missing, invalid, expired or revoked API key.
    • 403Missing scope, address not allowed, or a browser request.
    • 429Rate limit reached; see Retry-After.
    Example
    curl -X POST "https://api.lifedream.net/v1/webhooks/{id}/test" \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY"
    get/v1/webhooks/{id}/deliveries

    Delivery log

    Newest first, kept 30 days: status, attempts, last HTTP status and error.

    Scope: webhooks:manage

    Parameters
    nameintyperequired
    idpathstring✓
    pagequerynumber
    limitquerynumber
    statusqueryPENDING | PROCESSING | SUCCEEDED | FAILED
    Responses
    • 200
    • 401Missing, invalid, expired or revoked API key.
    • 403Missing scope, address not allowed, or a browser request.
    • 429Rate limit reached; see Retry-After.
    Example
    curl "https://api.lifedream.net/v1/webhooks/{id}/deliveries" \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY"
    post/v1/webhooks/{id}/deliveries/{deliveryId}/retry

    Retry a failed delivery

    Scope: webhooks:manage

    Parameters
    nameintyperequired
    idpathstring✓
    deliveryIdpathstring✓
    Responses
    • 202
    • 401Missing, invalid, expired or revoked API key.
    • 403Missing scope, address not allowed, or a browser request.
    • 429Rate limit reached; see Retry-After.
    Example
    curl -X POST "https://api.lifedream.net/v1/webhooks/{id}/deliveries/{deliveryId}/retry" \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY"

    Marketplace

    get/v1/marketplace/offers

    Browse marketplace offers

    Rooms other companies are selling. Your own offers are not listed.

    Scope: marketplace:read

    Parameters
    nameintyperequired
    countryquerystringCountry name in English.
    cityquerystringCity name in English.
    areaquerystring
    checkInquerystringWith checkOut: offers that cover the whole stay.
    checkOutquerystring
    starsquerynumber[]Star ratings.
    minPricequerynumber
    maxPricequerynumber
    priceCurrencyquerystringCurrency of minPrice/maxPrice.
    pagequerynumber
    limitquerynumber
    Responses
    • 200
    • 401Missing, invalid, expired or revoked API key.
    • 403Missing scope, address not allowed, or a browser request.
    • 429Rate limit reached; see Retry-After.
    Example
    curl "https://api.lifedream.net/v1/marketplace/offers" \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY"
    get/v1/marketplace/offers/{id}

    Get a marketplace offer

    Scope: marketplace:read

    Parameters
    nameintyperequired
    idpathstring✓
    Responses
    • 200
    • 401Missing, invalid, expired or revoked API key.
    • 403Missing scope, address not allowed, or a browser request.
    • 429Rate limit reached; see Retry-After.
    Example
    curl "https://api.lifedream.net/v1/marketplace/offers/{id}" \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY"
    get/v1/marketplace/offers/{id}/availability

    Rooms free per night on an offer

    Scope: marketplace:read

    Parameters
    nameintyperequired
    idpathstring✓
    Responses
    • 200
    • 401Missing, invalid, expired or revoked API key.
    • 403Missing scope, address not allowed, or a browser request.
    • 429Rate limit reached; see Retry-After.
    Example
    curl "https://api.lifedream.net/v1/marketplace/offers/{id}/availability" \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY"
    post/v1/marketplace/offers/{id}/requests

    Request rooms on an offer

    Creates a PENDING request at a fixed total. Pay it to hold the rooms; the seller then approves or refuses (refusal refunds your wallet).

    Scope: marketplace:write

    Parameters
    nameintyperequired
    idpathstring✓Offer id
    Request body
    fieldtyperequired
    checkInstring✓Inside the offer window.
    checkOutstring✓
    roomsnumber✓
    adultsnumberAdults per room, when the offer prices by party size.
    guestNationalitystringISO 3166-1 alpha-2 of the guests.
    extraBedsnumber
    mealUpgradeIdstringA meal upgrade id from the offer.
    hbVariantBREAKFAST_LUNCH | BREAKFAST_DINNER
    buyerNotesstringShown to the seller.
    Responses
    • 201
    • 401Missing, invalid, expired or revoked API key.
    • 403Missing scope, address not allowed, or a browser request.
    • 429Rate limit reached; see Retry-After.
    Example
    curl -X POST "https://api.lifedream.net/v1/marketplace/offers/{id}/requests" \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY" \
      -H "Content-Type: application/json" -d @body.json
    get/v1/marketplace/requests

    Your requests as a buyer

    Scope: marketplace:read

    Parameters
    nameintyperequired
    statusqueryPENDING | APPROVED | REJECTED | PAID | CANCELLED | EXPIRED
    offerIdquerystring
    pagequerynumber
    limitquerynumber
    Responses
    • 200
    • 401Missing, invalid, expired or revoked API key.
    • 403Missing scope, address not allowed, or a browser request.
    • 429Rate limit reached; see Retry-After.
    Example
    curl "https://api.lifedream.net/v1/marketplace/requests" \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY"
    get/v1/marketplace/requests/incoming

    Requests on your offers, as a seller

    Paid requests waiting for your answer, and decided ones. Prices are your net. The buyer is always "Customer".

    Scope: marketplace:read

    Parameters
    nameintyperequired
    statusqueryPENDING | APPROVED | REJECTED | PAID | CANCELLED | EXPIRED
    offerIdquerystring
    pagequerynumber
    limitquerynumber
    Responses
    • 200
    • 401Missing, invalid, expired or revoked API key.
    • 403Missing scope, address not allowed, or a browser request.
    • 429Rate limit reached; see Retry-After.
    Example
    curl "https://api.lifedream.net/v1/marketplace/requests/incoming" \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY"
    get/v1/marketplace/requests/{id}

    Get a request

    role says which side you are on.

    Scope: marketplace:read

    Parameters
    nameintyperequired
    idpathstring✓
    Responses
    • 200
    • 401Missing, invalid, expired or revoked API key.
    • 403Missing scope, address not allowed, or a browser request.
    • 429Rate limit reached; see Retry-After.
    Example
    curl "https://api.lifedream.net/v1/marketplace/requests/{id}" \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY"
    post/v1/marketplace/requests/{id}/cancel

    Withdraw your request

    Only before it is paid.

    Scope: marketplace:write

    Parameters
    nameintyperequired
    idpathstring✓
    Responses
    • 200
    • 401Missing, invalid, expired or revoked API key.
    • 403Missing scope, address not allowed, or a browser request.
    • 429Rate limit reached; see Retry-After.
    Example
    curl -X POST "https://api.lifedream.net/v1/marketplace/requests/{id}/cancel" \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY"
    post/v1/marketplace/requests/{id}/pay

    Pay a request from your wallet

    expectedTotal must equal the request total.

    Scope: marketplace:write

    Parameters
    nameintyperequired
    idpathstring✓
    Idempotency-Keyheaderstring✓Unique per operation (8-255 chars). Retrying with the same key returns the first result.
    Request body
    fieldtyperequired
    guest.namestring✓Lead guest, as the hotel will see it.
    guest.emailstring✓Receives the booking emails, including the hotel confirmation number. Use your own address if guests should not be contacted.
    guest.phonestring
    expectedTotalnumber✓The total you expect to pay, in the request or quote currency. A different price is refused with price_changed.
    notesstring
    clientReferencestringYour own id, returned on the booking.
    Responses
    • 201
    • 401Missing, invalid, expired or revoked API key.
    • 403Missing scope, address not allowed, or a browser request.
    • 429Rate limit reached; see Retry-After.
    Example
    curl -X POST "https://api.lifedream.net/v1/marketplace/requests/{id}/pay" \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY" \
      -H "Idempotency-Key: <unique-per-operation>" \
      -H "Content-Type: application/json" -d @body.json
    post/v1/marketplace/requests/{id}/approve

    Approve a paid request (seller)

    Scope: marketplace:write

    Parameters
    nameintyperequired
    idpathstring✓
    Idempotency-Keyheaderstring✓Unique per operation (8-255 chars). Retrying with the same key returns the first result.
    Responses
    • 200
    • 401Missing, invalid, expired or revoked API key.
    • 403Missing scope, address not allowed, or a browser request.
    • 429Rate limit reached; see Retry-After.
    Example
    curl -X POST "https://api.lifedream.net/v1/marketplace/requests/{id}/approve" \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY" \
      -H "Idempotency-Key: <unique-per-operation>"
    post/v1/marketplace/requests/{id}/reject

    Refuse a request (seller)

    A paid request is refunded to the buyer at once.

    Scope: marketplace:write

    Parameters
    nameintyperequired
    idpathstring✓
    Idempotency-Keyheaderstring✓Unique per operation (8-255 chars). Retrying with the same key returns the first result.
    Request body
    fieldtyperequired
    reasonstring
    Responses
    • 200
    • 401Missing, invalid, expired or revoked API key.
    • 403Missing scope, address not allowed, or a browser request.
    • 429Rate limit reached; see Retry-After.
    Example
    curl -X POST "https://api.lifedream.net/v1/marketplace/requests/{id}/reject" \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY" \
      -H "Idempotency-Key: <unique-per-operation>" \
      -H "Content-Type: application/json" -d @body.json

    Special requests

    post/v1/special-requests

    Ask companies to quote

    Companies quote until expiresInHours; several can fill one request between them. At most 10 open requests.

    Scope: special_requests:write

    Request body
    fieldtyperequired
    kindEXISTING_HOTEL | NEW_HOTEL✓EXISTING_HOTEL (give hotelId, optional roomId) or NEW_HOTEL (describe it).
    hotelIdstring
    roomIdstring
    countryCodestring
    countrystring
    citystring
    areastring
    hotelNamestring
    roomTypeNamestring
    checkInDatestring✓
    checkOutDatestring✓
    numberOfRoomsnumber✓
    numberOfAdultsnumber✓Adults per room.
    numberOfChildrennumber
    childAgesnumber[]
    guestNationalitystring
    viewstring
    mealPlanRO | BB | HB | FB | AI
    hbVariantBREAKFAST_LUNCH | BREAKFAST_DINNER
    expiresInHoursnumberHow long companies may quote.
    notesstring
    currencystring
    Responses
    • 201
    • 401Missing, invalid, expired or revoked API key.
    • 403Missing scope, address not allowed, or a browser request.
    • 429Rate limit reached; see Retry-After.
    Example
    curl -X POST "https://api.lifedream.net/v1/special-requests" \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY" \
      -H "Content-Type: application/json" -d @body.json
    get/v1/special-requests

    Your special requests

    Scope: special_requests:read

    Responses
    • 200
    • 401Missing, invalid, expired or revoked API key.
    • 403Missing scope, address not allowed, or a browser request.
    • 429Rate limit reached; see Retry-After.
    Example
    curl "https://api.lifedream.net/v1/special-requests" \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY"
    get/v1/special-requests/inbox

    Requests you can quote on

    Other companies' open requests in your preferred countries, and ones you quoted. The requester is always "Customer".

    Scope: special_requests:read

    Responses
    • 200
    • 401Missing, invalid, expired or revoked API key.
    • 403Missing scope, address not allowed, or a browser request.
    • 429Rate limit reached; see Retry-After.
    Example
    curl "https://api.lifedream.net/v1/special-requests/inbox" \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY"
    get/v1/special-requests/{id}

    Get a special request

    As requester: every quote, named Customer 1, 2… by price. As a quoting company: only your own quote.

    Scope: special_requests:read

    Parameters
    nameintyperequired
    idpathstring✓
    Responses
    • 200
    • 401Missing, invalid, expired or revoked API key.
    • 403Missing scope, address not allowed, or a browser request.
    • 429Rate limit reached; see Retry-After.
    Example
    curl "https://api.lifedream.net/v1/special-requests/{id}" \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY"
    post/v1/special-requests/{id}/cancel

    Cancel your special request

    Scope: special_requests:write

    Parameters
    nameintyperequired
    idpathstring✓
    Responses
    • 200
    • 401Missing, invalid, expired or revoked API key.
    • 403Missing scope, address not allowed, or a browser request.
    • 429Rate limit reached; see Retry-After.
    Example
    curl -X POST "https://api.lifedream.net/v1/special-requests/{id}/cancel" \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY"
    put/v1/special-requests/{id}/quote

    Submit or update your quote

    One quote per company; prices are your net.

    Scope: special_requests:write

    Parameters
    nameintyperequired
    idpathstring✓
    Request body
    fieldtyperequired
    netPricePerNightnumber✓Your net price per room per night; the requester sees it with commission.
    currencystring
    roomsAvailablenumber✓Rooms you can supply, at most what is still needed.
    mealPlanRO | BB | HB | FB | AI
    hbVariantBREAKFAST_LUNCH | BREAKFAST_DINNER
    mealNetPerPersonnumber
    kitchenTypestring
    nusukHotelIdstringYour Nusuk code for the hotel; required unless one is on file.
    checkInDatestringBoth or neither; inside the request dates. Default: the whole request.
    checkOutDatestring
    viewstring
    baseOccupancynumber
    maxAdultsnumber
    extraBedNetPerNightnumber
    cancellationTypeNON_REFUNDABLE | FLEXIBLE
    freeCancellationDaysnumber
    cancellationPolicystring
    notesstring
    Responses
    • 200
    • 401Missing, invalid, expired or revoked API key.
    • 403Missing scope, address not allowed, or a browser request.
    • 429Rate limit reached; see Retry-After.
    Example
    curl -X PUT "https://api.lifedream.net/v1/special-requests/{id}/quote" \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY" \
      -H "Content-Type: application/json" -d @body.json
    post/v1/special-requests/{id}/quotes/{quoteId}/withdraw

    Withdraw your quote

    Scope: special_requests:write

    Parameters
    nameintyperequired
    idpathstring✓
    quoteIdpathstring✓
    Responses
    • 200
    • 401Missing, invalid, expired or revoked API key.
    • 403Missing scope, address not allowed, or a browser request.
    • 429Rate limit reached; see Retry-After.
    Example
    curl -X POST "https://api.lifedream.net/v1/special-requests/{id}/quotes/{quoteId}/withdraw" \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY"
    post/v1/special-requests/{id}/quotes/{quoteId}/reject

    Refuse a quote (requester)

    Scope: special_requests:write

    Parameters
    nameintyperequired
    idpathstring✓
    quoteIdpathstring✓
    Request body
    fieldtyperequired
    reasonstring
    Responses
    • 200
    • 401Missing, invalid, expired or revoked API key.
    • 403Missing scope, address not allowed, or a browser request.
    • 429Rate limit reached; see Retry-After.
    Example
    curl -X POST "https://api.lifedream.net/v1/special-requests/{id}/quotes/{quoteId}/reject" \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY" \
      -H "Content-Type: application/json" -d @body.json
    post/v1/special-requests/{id}/quotes/{quoteId}/accept

    Accept a quote (requester)

    Takes its rooms, up to what is still needed, and holds them until paymentDueAt. Pay with …/pay.

    Scope: special_requests:write

    Parameters
    nameintyperequired
    idpathstring✓
    quoteIdpathstring✓
    Idempotency-Keyheaderstring✓Unique per operation (8-255 chars). Retrying with the same key returns the first result.
    Responses
    • 200
    • 401Missing, invalid, expired or revoked API key.
    • 403Missing scope, address not allowed, or a browser request.
    • 429Rate limit reached; see Retry-After.
    Example
    curl -X POST "https://api.lifedream.net/v1/special-requests/{id}/quotes/{quoteId}/accept" \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY" \
      -H "Idempotency-Key: <unique-per-operation>"
    post/v1/special-requests/{id}/quotes/{quoteId}/pay

    Pay an accepted quote from your wallet

    Creates the booking. expectedTotal must equal the accepted price (with any extra beds or upgrade).

    Scope: special_requests:write, bookings:write

    Parameters
    nameintyperequired
    idpathstring✓
    quoteIdpathstring✓
    Idempotency-Keyheaderstring✓Unique per operation (8-255 chars). Retrying with the same key returns the first result.
    Request body
    fieldtyperequired
    guest.namestring✓Lead guest, as the hotel will see it.
    guest.emailstring✓Receives the booking emails, including the hotel confirmation number. Use your own address if guests should not be contacted.
    guest.phonestring
    expectedTotalnumber✓The total you expect to pay, in the request or quote currency. A different price is refused with price_changed.
    notesstring
    clientReferencestringYour own id, returned on the booking.
    extraBedsnumber
    mealUpgradeIdstringA meal upgrade id from the accepted quote.
    hbVariantBREAKFAST_LUNCH | BREAKFAST_DINNER
    Responses
    • 201
    • 401Missing, invalid, expired or revoked API key.
    • 403Missing scope, address not allowed, or a browser request.
    • 429Rate limit reached; see Retry-After.
    Example
    curl -X POST "https://api.lifedream.net/v1/special-requests/{id}/quotes/{quoteId}/pay" \
      -H "Authorization: Bearer $LIFEDREAM_API_KEY" \
      -H "Idempotency-Key: <unique-per-operation>" \
      -H "Content-Type: application/json" -d @body.json