Developer docs menu

Getting started

Sandbox

A practice business that answers like a real one and never books anything.

The sandbox is a practice business, fresh-start-cleaning. It answers every call the way a real business does, so you can build against it before you touch a real one. Its profile says sandbox: true.

curl https://api.bookingmachine.io/v1/businesses/fresh-start-cleaning

What is real

  • Its services, questions and prices. A quote is worked out by its pricing rules.

  • Its free times, and holds on them.

  • Every check on a booking: the answers, the time, the customer’s details.

  • Rate limits and refusal codes.

Holds and booking requests need no API key here, whatever a real business answers. A real business can answer agent_writes_off to a caller without a key; the sandbox never does.

What never happens

  • Nobody is emailed.

  • Nothing about the customer you send is kept.

  • No booking is made, with an API key or without one.

A booking you ask for is checked, its time is held, and the answer is 202 with status: "awaiting_customer_confirmation". As no email is sent, it stays that way until it runs out.

Play the customer’s part

To see a booking request leave the waiting state, settle it yourself with the id the booking call answered with:

curl -X POST https://api.bookingmachine.io/v1/businesses/fresh-start-cleaning/bookings/BOOKING_ID/simulate \
  -H 'Content-Type: application/json' \
  -d '{ "outcome": "confirmed" }'

outcome is confirmed (the default) or expired. Either way nothing is booked and the held time goes back on offer. On any real business this call is refused with sandbox_only.

Moving to a real business

Change the slug. Nothing else in your code changes. The difference is that the customer now gets a real email, and a real booking is made when they press Confirm. How a booking is made covers that.