Quickstart

From nothing to a sold room: a hotel, a room, a rate plan, prices, a booking module, an offer and a booking. Every answer below is a real one from staging, shortened to the fields that matter. Run it against https://staging-api.quendoo.com/v1/qc.

1. Get a token

curl -X POST $QC/oauth/token \
  -u "$CLIENT_ID:$CLIENT_SECRET" \
  -d grant_type=client_credentials
{ "access_token": "eyJ0eXAiOi…", "token_type": "Bearer", "expires_in": 3600,
  "scope": "inventory.read inventory.write properties.manage bookings.read bookings.write …" }

The token lives an hour. Send it on every other call as Authorization: Bearer …, and an Idempotency-Key on every write.

2. Create the property

curl -X POST $QC/properties -H "Authorization: Bearer $TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" -H "Content-Type: application/json" \
  -d '{"name":"Quickstart Hotel","type_id":1,"currency":"EUR","timezone":"Europe/Sofia"}'
{ "status": "ok", "message": "created",
  "data": { "id": "43be3468-43d2-4b8b-b2f9-e01520cf47eb", "name": "Quickstart Hotel",
            "mode": "shadow", "currency": "EUR", "timezone": "Europe/Sofia" } }

type_id comes from GET /property_types (1 is a hotel). The property starts in shadow β€” step 6 changes that.

3. Add a room type

curl -X POST $QC/properties/$PROPERTY/room_types … \
  -d '{"name":"Double Room","qty":10,"capacity":{"adults":2,"children":1}}'
{ "data": { "id": "0640b76f-f6d1-43bf-9314-3dcecf881816", "name": "Double Room", "kind": "room",
            "qty": 10, "capacity": { "adults": 2, "children": 1, "infants": 0 } } }

4. Add a rate plan

curl -X POST $QC/properties/$PROPERTY/rate_plans … \
  -d '{"title":"Bed & Breakfast","room_type_ids":["0640b76f-…"],"meal_plan":"BB"}'
{ "data": {
    "rate_plans": [ { "id": "4e5633fb-6e16-4a01-9be5-c6a9fd489356", "room_type_id": "0640b76f-…",
                      "sell_type": "per_room", "meal_plan": "BB",
                      "payment_policy_id": 2182, "cancellation_policy_id": 1964 } ],
    "notices": [
      { "code": "qc.default_policy_applied", "kind": "payment", "policy_name": "API default β€” pay on arrival" },
      { "code": "qc.default_policy_applied", "kind": "cancellation", "policy_name": "API default β€” non-refundable" } ] } }

A rate plan gets one id per room it is sold on β€” prices go to that id. Read notices: you sent no policies, so the plan got placeholders, and the cancellation one is non-refundable. Set your own with payment_policy_id and cancellation_policy_id.

5. Push prices β€” not stored yet

curl -X POST $QC/properties/$PROPERTY/inventory/rates … \
  -d '{"values":[{"room_type_id":"0640b76f-…","rate_plan_id":"4e5633fb-…",
                  "date_from":"2026-12-01","date_to":"2026-12-31","rate":120}]}'
{ "status": "ok", "message": "accepted",
  "data": { "written": 0, "dry": true, "dry_reason": "property_dry", "warnings": [] } }

The write was checked and nothing was stored: the property is still in shadow. Build and test here as long as you need.

6. Go live, and push again

curl -X PATCH $QC/properties/$PROPERTY … -d '{"mode":"live"}'

The same price call now answers "written": 31, "dry": false β€” one row per night of December. Availability works the same way:

curl -X POST $QC/properties/$PROPERTY/inventory/availability … \
  -d '{"values":[{"room_type_id":"0640b76f-…","date_from":"2026-12-01","date_to":"2026-12-31","availability":8}]}'

7. Create a booking module

Offers are sold through a booking module: it decides which rate plans a guest is offered.

curl -X POST $QC/properties/$PROPERTY/booking_buttons … \
  -d '{"name":"My booking site","rate_plan_ids":["4e5633fb-…"]}'
{ "status": "ok", "message": "created",
  "data": { "id": 1546, "name": "My booking site", "is_active": true,
            "rate_plan_ids": ["4e5633fb-6e16-4a01-9be5-c6a9fd489356"] } }

8. Search for offers

curl "$QC/properties/$PROPERTY/booking_offers?booking_button_id=1546&checkin=2026-12-10&checkout=2026-12-12&rooms[0][adults]=2" \
  -H "Authorization: Bearer $TOKEN"
{ "data": {
    "booking_offers": [ { "room_name": "Double Room", "rate_name": "Bed & Breakfast",
                          "price": 240, "currency": "EUR",
                          "room_type_id": "0640b76f-…", "rate_plan_id": "4e5633fb-…",
                          "offer_id": "5295|10479:2:" } ],
    "search_token": "v1.H4sIAAAA…", "expires_at": "…" } }

Two nights at 120. The search_token holds these prices until expires_at.

9. Book it

curl -X POST $QC/properties/$PROPERTY/bookings/from_search … \
  -d '{"search_token":"v1.H4sIAAAA…","partner_reference":"QS-1001",
       "client":{"first_name":"Maria","last_name":"Ivanova","email":"[email protected]","phone":"+359888123456"},
       "items":[{"offer_id":"5295|10479:2:"}]}'
{ "status": "ok", "message": "created",
  "data": { "id": "MDQAFARE", "total_amount": 240, "currency": "EUR", "status": "CREATED",
            "reference": "QCN-DOCSPARTNER-QS-1001",
            "payment_url": "https://…/payment/?…" } }

id is the booking's code: read it with GET …/bookings/{id}, cancel it with POST …/bookings/{id}/cancel. Send the guest to payment_url to pay.

Next