• VillaSlotDocumentation
  • Introduction
  • Getting Started
  • API
    • Discovery
      • GETGet my context
    • Villas
      • GETList villas
      • POSTCreate a villa
      • GETGet a villa
      • PATCHRename a villa
      • POSTArchive a villa
      • POSTUpload a villa photo
      • GETGet opening hours
      • PUTReplace opening hours
      • GETGet the rate grid
      • PUTReplace the rate grid
      • GETGet availability
    • Bookings
      • GETList bookings over a period
      • POSTCreate a booking
      • GETGet a booking
      • POSTConfirm a booking
      • POSTComplete a booking
      • POSTCancel a booking
      • POSTReschedule a booking
    • Customers
      • GETList customers
      • POSTCreate a customer
      • POSTImport a batch of customers
      • GETGet a customer
      • PATCHUpdate a customer
    • Booking settings
      • GETGet booking settings
      • PATCHUpdate booking settings
  1. Documentation
  2. Getting Started
Buydocschangelogsdemocommunity

Getting Started

PreviousIntroductionNextAPI
On this page
1. Set up a villa2. Give it opening hours3. Give it rates4. Add a customer5. Book a slotGetting an API key

An empty organization to a confirmed booking, in the order the product expects. Five steps, and the API equivalent of each one.

1. Set up a villa

Villas → New villa. A name and a photo are enough to create it; everything that matters comes next.

A villa needs both its opening hours and its rates before it can take a booking. A villa that looks ready but refuses every slot is almost always missing one of the two.

API: POST /api/v1/properties

2. Give it opening hours

Villa → Opening hours. A weekly grid: for each day, when the villa opens and when it closes. A day left empty is a closed day.

Bookings are checked against this grid, so it decides more than it looks: a villa open 09:00–18:00 will refuse a 08:30 slot, and the calendar greys the closed bands so nobody tries.

API: PUT /api/v1/properties/{id}/opening-hours

3. Give it rates

Villa → Rates. A price per duration. The grid is what the villa offers: a duration absent from it is not bookable at all, not even at a negotiated price. You can override the amount on a given booking, but the duration has to exist in the grid first.

API: PUT /api/v1/properties/{id}/rates

4. Add a customer

Customers → New customer. A name is the only thing required. An email lets you send them a payment link, and an access link to their own space.

API: POST /api/v1/customers — or POST /api/v1/customers/bulk to bring a list over in one call.

5. Book a slot

Calendar. Drag across the hours you want, on the day you want: the villa, the slot and the price fill themselves in. Pick the customer, confirm.

The booking is refused if the slot falls outside the villa's hours, if its duration is absent from the rate grid, or if a confirmed booking already overlaps it.

API: POST /api/v1/bookings

Getting an API key

Account → API Keys → New key. A key belongs to one organization and carries your own rights in it. Copy it when it is shown — it is not shown again.

bash
curl -H "x-api-key: $VILLASLOT_API_KEY" \
  "https://villaslot.app/api/v1/me"

That first call turns a bare key into a context: which organization it opens, which role it carries, the timezone and currency every other call depends on, and how much room your plan leaves.

Everything above has an HTTP equivalent, and a page that details it. The full map is in API.