RatesSpot
v0.42.0Booking engine for rooms, desks, sessions and courses: listings, rates, availability and bookings.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_business Business overview
Today's date, time and weekday in the business's timezone; the business's name, currency, timezone and tax; what's left to set up before it can take bookings; and how guests can pay right now.
list_catalog What the business sells
Every listing with its units, rates (prices and ways to pay) and photos, plus add-ons and courses. Includes switched-off items, marked active: false.
create_listing Add a listing
Add something people can book (a room type, apartment, desk, office, meeting room, studio...), with its units and, optionally, its first rate so it can be booked straight away. Units are the individual bookable things: 4 identical studios is one listing with 4 units.
| Parameter | Type | Description |
|---|---|---|
name * | string | e.g. 'Studio flat' or 'Hot desk' |
peoplePerUnit * | integer | How many people one unit holds |
units * | Unit names (['Room 1','Room 2']) or a count (named '<name> 1', '<name> 2'...) | |
description | string | Shown on booking pages. Blank lines separate paragraphs |
features | array | e.g. ['Air conditioning', 'Fast Wi-Fi'] |
rate | object | |
tagline | string | |
webAddress | string | Slug for booking pages; made from the name if omitted |
update_listing Change a listing
Change a listing's name, description, features, web address or capacity, or switch it off (active: false stops new bookings; existing ones are kept).
| Parameter | Type | Description |
|---|---|---|
listingId * | string | |
active | boolean | |
description | string | |
features | array | |
name | string | |
peoplePerUnit | integer | |
tagline | string | |
webAddress | string |
set_rate Add or change a price
Add a rate (price) to a listing, or change an existing one with rateId. A listing can have several, e.g. nightly and monthly. Existing bookings keep the price they were booked at.
| Parameter | Type | Description |
|---|---|---|
listingId * | string | |
active | boolean | |
isDefault | boolean | |
name | string | |
needsApproval | boolean | true: bookings are requests the business approves or declines (answer_request); the guest pays after approval |
per | string | Required when adding |
price | number | Required when adding |
rateId | string | To change an existing rate; omit to add one |
waysToPay | array | full: pay everything when booking. deposit_one_unit: pay the first night/day now (non-refundable), the rest on arrival. on_arrival: pay nothing now |
add_photo Add a photo
Add a photo to a listing or course, from a file on this computer or a public https URL. JPEG, PNG or WebP up to 8 MB. The first photo is the main one.
| Parameter | Type | Description |
|---|---|---|
source * | string | A local file path, or an https:// URL |
courseId | string | |
description | string | What the photo shows (alt text) |
listingId | string |
create_course Add a course or event
Add a course, class or event that sells seats on one or more dates. Leave dates empty to list it as 'dates to be announced' (not bookable until dates are added).
| Parameter | Type | Description |
|---|---|---|
name * | string | |
pricePerSeat * | number | For the whole course, in normal currency units |
seats * | integer | |
dates | array | |
description | string | |
roomListingId | string | A listing (room) it uses; closed to other bookings while the course runs |
set_opening_hours Set opening hours
Set weekly opening hours for the whole business, or for one listing. Hourly and daily bookings must fit inside them; nightly stays aren't affected. An empty list means always open (business) or 'use the business hours' (listing).
| Parameter | Type | Description |
|---|---|---|
hours * | array | e.g. [{day:'monday', open:'08:00', close:'18:00'}]. Several entries per day are allowed |
listingId | string | Omit for the whole business |
set_payment_methods Choose how guests pay
Switch card payments on or off (card needs Paystack or Stripe connected in the dashboard first), and set up bank transfer: account details and how long a booking is held while the guest transfers. Staff confirm a transfer booking by recording the payment (record_payment).
| Parameter | Type | Description |
|---|---|---|
bankTransfer | object | |
card | boolean | true to take cards, false to pause them (keys are kept) |
list_discount_codes List discount codes
The business's discount codes with their limits and how many bookings have used each. Pass a code to quote or book to apply it.
create_discount_code Create a discount code
A code customers enter when booking: a percentage or an amount off the price before tax (nights, hours, days, seats and add-ons; never fees). Optional limits: usable dates, stay dates, minimum spend or nights, total uses, once per customer, specific listings. Set active: false (with codeId) to switch one off; bookings that used it keep their discount.
| Parameter | Type | Description |
|---|---|---|
active | boolean | |
amountOff | number | In normal currency units |
code | string | Letters, numbers, hyphens, underscores, e.g. WELCOME10 |
codeId | string | To switch an existing code on or off (from list_discount_codes); then only active is used |
description | string | |
listingIds | array | Only these listings; otherwise every listing and course |
maxUses | integer | |
minNights | integer | |
minSpend | number | Price before the discount, normal currency units |
oncePerCustomer | boolean | |
percentOff | number | |
staysFrom | string | YYYY-MM-DD |
staysUntil | string | The whole stay must be inside these dates |
usableFrom | string | YYYY-MM-DD |
usableUntil | string | Last day it can be entered (inclusive) |
check_availability Check availability
How many units (or course seats) are free on each day between two dates, with the price and, for hourly listings, free start times.
| Parameter | Type | Description |
|---|---|---|
from * | string | YYYY-MM-DD |
to * | string | YYYY-MM-DD |
courseId | string | |
hours | integer | Hourly listings: length of the booking |
listingId | string | |
quantity | integer | Units or seats needed |
quote Price a booking
The exact price, taxes, cancellation terms and ways to pay for a booking, without reserving anything.
| Parameter | Type | Description |
|---|---|---|
adults | integer | |
children | integer | |
courseId | string | |
discountCode | string | A discount code the customer gave (case doesn't matter); if it doesn't apply, the error says why |
listingId | string | |
quantity | integer | Units or seats |
rateId | string | A specific rate; otherwise the listing's default for that kind of booking |
when | When, in the shape the listing's rate uses: nights for stays, hours/block/days for spaces, months/years for contracts |
book Make a booking
Book for a customer, e.g. one who called or messaged. pay_at_desk and on_arrival confirm straight away (record the money with record_payment when it's taken); bank_transfer holds the booking until the transfer is recorded, then confirms it. card_link holds it for 24 hours and returns paymentLink, a card payment page to send the customer (it needs their email); paying confirms the booking. Asking for exactly the same booking again (same listing, dates, guests, customer and payment) returns the existing one with alreadyBooked: true instead of booking twice.
| Parameter | Type | Description |
|---|---|---|
customer * | object | Name plus an email or phone. Confirmation emails need an email |
payment * | string | How the customer will pay |
adults | integer | |
children | integer | |
courseId | string | |
discountCode | string | A discount code the customer gave (case doesn't matter); if it doesn't apply, the error says why |
listingId | string | |
quantity | integer | |
rateId | string | |
when | When, in the shape the listing's rate uses: nights for stays, hours/block/days for spaces, months/years for contracts |
find_bookings Find bookings
Search bookings by guest name, email, phone or reference, or list today's (or a date's) arrivals, departures or everyone checked in.
| Parameter | Type | Description |
|---|---|---|
customerId | string | Only this customer's bookings (from find_customers): their history |
date | string | For arrivals or departures; defaults to today |
discountCode | string | Only bookings that used this discount code |
from | string | Bookings overlapping from this date... |
limit | integer | |
search | string | Guest name, email, phone, or booking reference |
status | array | |
to | string | ...to this date (exclusive) |
view | string |
find_customers Find customers
Search the business's customers by name, email or phone, newest first, with how many times each has booked. Use it for 'what's Ada's number?' or to spot returning guests; pass a customerId to find_bookings for someone's history.
| Parameter | Type | Description |
|---|---|---|
limit | integer | |
search | string | Part of a name, email or phone number |
get_occupancy How full a day is
For one day (default today, in the business's timezone): units in use, closed and free, overall and per listing, plus that day's arrivals and departures and the requests waiting for approval. Use it for 'how full are we on Friday?' rather than counting the calendar yourself.
| Parameter | Type | Description |
|---|---|---|
date | string | YYYY-MM-DD |
get_calendar Calendar
Who is in which unit, day by day: every listing's units with the bookings and closures on them between two dates (up to 62 days). Use it to answer 'what's booked next week?' or 'which rooms are free on Friday?'
| Parameter | Type | Description |
|---|---|---|
from * | string | YYYY-MM-DD |
to * | string | Exclusive |
listingId | string |
get_booking A booking in full
One booking: dates, units, customer, money paid and owed, and what cancelling it now would refund.
| Parameter | Type | Description |
|---|---|---|
bookingId * | string |
answer_request Approve or decline a request
For listings whose rate needs approval: approve or decline a booking request (status PENDING_APPROVAL; find them with find_bookings and status ['PENDING_APPROVAL']). Approving confirms it if nothing is due now, otherwise the guest is asked to pay. Declining releases the dates; the guest isn't told the reason. Without confirm: true it only shows what would happen, so you can check with the person first.
| Parameter | Type | Description |
|---|---|---|
bookingId * | string | |
decision * | string | |
confirm | boolean | Must be true to actually answer |
reason | string | Declining: why, kept in the booking's history |
record_payment Record a payment
Record money the business received for a booking: cash, a POS card payment, or a bank transfer. A held bank-transfer booking is confirmed once enough is recorded. Without confirm: true it only shows what would be recorded (the guest, the balance and what's left after), so you can check with the person first. A recorded payment can't be edited or deleted.
| Parameter | Type | Description |
|---|---|---|
amount * | number | Normal currency units |
bookingId * | string | |
method * | string | |
confirm | boolean | Must be true to actually record it |
check_in Check a guest in
Check in the customer of a confirmed booking, from its arrival day. The result shows anything still owed (record it with record_payment). Use find_bookings with view: arrivals to see who's due today.
| Parameter | Type | Description |
|---|---|---|
bookingId * | string |
check_out Check a guest out
Check out a checked-in customer. On or after the last day, it's done straight away. Leaving early (nothing is refunded, and the unit is free from now) or with something still owed: without confirm: true it only says so, so you can check with the person first.
| Parameter | Type | Description |
|---|---|---|
bookingId * | string | |
confirm | boolean | Needed for an early departure or when something is still owed |
mark_no_show Mark a no-show
For a customer who didn't arrive, from the arrival day: frees the unit, refunds nothing. Without confirm: true it only shows what would happen, so you can check with the person first.
| Parameter | Type | Description |
|---|---|---|
bookingId * | string | |
confirm | boolean | Must be true to actually mark it |
move_booking Move a booking to another unit
Put a booking in a different unit of the same listing (e.g. Room 4 instead of Room 2), if that unit is free for the whole stay. Same price and dates.
| Parameter | Type | Description |
|---|---|---|
bookingId * | string | |
unit * | string | The unit's name (as in list_catalog) or id |
list_closures List closures
Units and listings closed now or later (maintenance, renovations), with their ids for reopen_unit. Courses that take a room show on get_calendar.
close_unit Close a unit or listing
Take a unit (or a whole listing) out of service between two local dates or times, e.g. for repairs. Refused if bookings overlap: move or cancel them first. Nobody can book it while closed.
| Parameter | Type | Description |
|---|---|---|
from * | string | YYYY-MM-DD or YYYY-MM-DDTHH:mm, local |
listingId * | string | |
to * | string | YYYY-MM-DD or YYYY-MM-DDTHH:mm, local (exclusive for dates) |
reason | string | |
unit | string | The unit's name or id; leave out to close the whole listing |
reopen_unit Reopen a unit or listing
Remove a closure (its id from list_closures), so the unit can be booked again for those dates.
| Parameter | Type | Description |
|---|---|---|
closureId * | string |
get_booking_history Booking history
Everything that happened to a booking, oldest first: when it was made, check-in and check-out, payments and refunds, moves and changes, with who did it.
| Parameter | Type | Description |
|---|---|---|
bookingId * | string |
payment_link Get a card payment link
A card payment page for a booking that's held waiting for payment, to send the customer by WhatsApp, SMS or email. Paying confirms the booking. For a new booking, book with payment: card_link instead (it holds the booking for 24 hours). A held booking expires at holdExpiresAt if it isn't paid.
| Parameter | Type | Description |
|---|---|---|
bookingId * | string |
list_payments List payments
Money in and out across bookings, newest first: cash, POS, transfers, card payments and refunds, with totals that succeeded. For 'what came in today?' or reconciling the till.
| Parameter | Type | Description |
|---|---|---|
from | string | On or after this local date; defaults to today |
kind | string | |
method | string | |
to | string | Before this local date (exclusive); defaults to the day after from |
add_special_day Set hours for one date
Different opening hours, or closed, on one date: a public holiday, an event, a short day. For the whole business or one listing. Hourly and daily bookings follow it; nightly stays aren't affected. Weekly hours are set_opening_hours.
| Parameter | Type | Description |
|---|---|---|
date * | string | YYYY-MM-DD |
closed | boolean | Closed all day |
hours | array | The hours that day, e.g. [{open:'10:00', close:'14:00'}]; leave out when closed |
listingId | string | Only this listing; leave out for the whole business |
reason | string | e.g. Independence Day |
remove_special_day Remove a special day
Go back to the usual weekly hours on that date (its id from add_special_day's list).
| Parameter | Type | Description |
|---|---|---|
specialDayId * | string |
end_contract End a contract early
End a monthly or fixed-term contract before its term is up. The customer pays the notice period and the early-termination fee in the contract's terms; later instalments are cancelled and the unit frees up when the notice ends. Without confirm: true it only shows the fee and dates (worked out by RatesSpot), so you can check with the person first.
| Parameter | Type | Description |
|---|---|---|
bookingId * | string | |
confirm | boolean | Must be true to actually end it |
expectedFee | number | With confirm: the fee the preview showed, in normal currency units; if it has changed, nothing happens |
add_charge Add a charge to a stay
Add something used during a stay to the booking's bill: minibar, laundry, a late checkout, damage. Only for guests who are checked in or have left. It adds to what the booking costs (tax as the business has set it), so the guest owes it. Without confirm: true it only shows what would be added and the new balance, so you can check with the person first.
| Parameter | Type | Description |
|---|---|---|
amount * | number | The price of one, in normal currency units |
bookingId * | string | |
description * | string | What it's for, as the guest will see it, e.g. 'Minibar: soft drinks' |
confirm | boolean | Must be true to actually add it |
quantity | integer |
void_charge Remove a charge from a stay
Cancel a charge added by mistake (get its id from get_booking's charges). It's kept on record as voided, with the reason. Anything already paid above the new total is to be given back. Without confirm: true it only shows which charge would be removed.
| Parameter | Type | Description |
|---|---|---|
bookingId * | string | |
chargeId * | string | |
reason * | string | Why, e.g. 'Charged to the wrong room' |
confirm | boolean | Must be true to actually remove it |
change_booking Change a booking
Change a confirmed booking's dates, guests, add-ons or rate (a stay under way can only be extended). Booked nights keep their booked price; added ones are at today's price; removing nights follows the cancellation terms. Without confirm it only shows the new total, what's still to pay or refunded; to change it, call again with confirm: true and expectedTotal set to the newTotal the person agreed to.
| Parameter | Type | Description |
|---|---|---|
bookingId * | string | |
adults | integer | |
children | integer | |
confirm | boolean | Must be true to actually change it |
expectedTotal | string | With confirm: the newTotal from the preview, e.g. '$1,300' |
rateId | string | |
when | New dates, in the shape the rate uses; omit to keep them |
record_refund_given_back Record a refund given back
After staff give a customer their money back themselves (cash, bank transfer or POS): for a refund shown as toGiveBack on the booking (a desk refund, or a card refund the provider refused). Without confirm: true it only shows what would be recorded. A refund the card provider is still sending isn't for this.
| Parameter | Type | Description |
|---|---|---|
bookingId * | string | |
method * | string | |
confirm | boolean | Must be true to actually record it |
cancel_booking Cancel a booking
Cancel a booking under its cancellation terms. Without confirm: true it only shows what would be refunded, so you can check with the person first. To cancel, call again with confirm: true and expectedRefund set to the wouldRefund they agreed to; if the refund has changed since (a deadline passed), nothing is cancelled and you get the new amount. Card refunds go back automatically.
| Parameter | Type | Description |
|---|---|---|
bookingId * | string | |
confirm | boolean | Must be true to actually cancel |
expectedRefund | string | With confirm: the wouldRefund from the preview, e.g. '$400' |
reason | string |
create_website_key Create a key for a booking website
Make the API key a booking website needs. kind 'website': a server key (listings, availability, prices, holds, payments, reading a booking whose id it has). kind 'browser': a publishable key for web pages (the same, minus reading bookings). Neither can list bookings, see customers or change settings. Through the RatesSpot connector an owner approves it first (use check_approval; the key comes from there, once). The key is shown once: store it straight away.
| Parameter | Type | Description |
|---|---|---|
name * | string | What it's for, e.g. 'Booking site' |
kind | string |
check_approval Check an approval
Whether an owner or manager has approved or declined something that was waiting for approval (a refund, payment settings, a deletion), and what happened if it ran.
| Parameter | Type | Description |
|---|---|---|
approvalId * | string |