StayBindDevelopers
Booking API

Properties & availability

List an organization's properties, find units that are free for a date range, and get a server-priced quote.

These three read procedures are the front of any booking flow: discover inventory, check it's free, price it. All require an API key and are scoped to that key's organization.

properties

List the organization's active properties. No input.

curl https://api.staybind.com/public/trpc/properties \
  -H "x-api-key: $STAYBIND_API_KEY"
Response
{
  "result": {
    "data": [
      {
        "id": "prop_haveli",
        "name": "Jaipur Haveli",
        "status": "active",
        "city": "Jaipur"
      }
    ]
  }
}

Only properties with status: "active" are returned. Inactive or draft properties never appear on the Booking API.

searchAvailability

Return the units in a property that are free for the entire date range.

Input

Prop

Type

INPUT='{"propertyId":"prop_haveli","checkIn":"2026-02-20","checkOut":"2026-02-22"}'
curl -G https://api.staybind.com/public/trpc/searchAvailability \
  -H "x-api-key: $STAYBIND_API_KEY" \
  --data-urlencode "input=$INPUT"
Response
{
  "result": {
    "data": [
      { "unitId": "unit_courtyard", "unitName": "Courtyard Suite" }
    ]
  }
}

A unit appears only if every night in the range is free in the ledger. Check-out is exclusive, so 2026-02-202026-02-22 checks the nights of the 20th and 21st.

quote

Get the server-computed price for a unit and date range (nights × the unit's rate). Show this before the guest commits, the same amount is charged at checkout.

Input

Prop

Type

INPUT='{"unitId":"unit_courtyard","checkIn":"2026-02-20","checkOut":"2026-02-22"}'
curl -G https://api.staybind.com/public/trpc/quote \
  -H "x-api-key: $STAYBIND_API_KEY" \
  --data-urlencode "input=$INPUT"
Response
{
  "result": {
    "data": { "nights": 2, "subtotalMinor": 1500000, "currency": "INR" }
  }
}

subtotalMinor is in paise (1500000 = ₹15,000.00). A subtotalMinor of 0 means the unit has no sellable rate configured for those dates; the unit can still be booked manually by an operator, but createCheckout will reject it because there is nothing to charge.

Next: Bookings & checkout.

On this page