A booking form, a calendar view or a reminder screen needs slots and appointments before a scheduling backend exists. The bookings template gives you a small appointment API behind a real URL: the slots of a day and the bookings made on them.
What you get
The template creates a project with the base path /bookings-api and 5 endpoints. Each endpoint has one ready response, so the API answers as soon as the project exists.
| Method | Path | What it answers |
|---|---|---|
GET |
/slots |
200 with eight one-hour slots from 09:00 to 17:00 for the day in the date query parameter, or for a coming day without it. |
GET |
/bookings |
200 with six generated bookings. |
POST |
/bookings |
201 with slotId, customerName and customerEmail from the request body, a generated id and the status confirmed. |
GET |
/bookings/:id |
200 with one booking. The id is the one from the path. |
DELETE |
/bookings/:id |
204 without a body. |
A slot has id (1 to 8), date, startTime, endTime and available. A booking in the list has id, slotId, date, startTime, customerName and status (confirmed, pending or cancelled). The single booking adds durationMinutes (60), a customer with name and email, notes and createdAt. Names are invented and email addresses use reserved example domains.
Sample response
$ curl -s -X POST $URL/bookings-api/bookings \
-H "Content-Type: application/json" \
-d '{"slotId":"5","customerName":"Mira Keller","customerEmail":"mira@example.com"}'
{
"id": "4821",
"slotId": "5",
"customerName": "Mira Keller",
"customerEmail": "mira@example.com",
"status": "confirmed",
"createdAt": "2026-11-15T09:12:44Z"
}
slotId, customerName and customerEmail come from your request. The id and createdAt are generated on every call. Without a body, the mock answers with slot 3, Ada Example and ada@example.com.
How to start
- Sign up at
https://app.mockhop.com/register. The quickstart explains the account and the address of your organization. - Open Projects and select Start from a template.
- Choose Example bookings API and select Use template.
Then call the mock. Replace acme with your organization's address. Your mocks answer from outside once you've confirmed your email address.
$ URL=https://acme.mockhop.cloud
$ curl -s "$URL/bookings-api/slots?date=2026-12-01"
$ curl -s $URL/bookings-api/bookings
The first call returns the eight slots of 1 December 2026, each with a random available value. The second returns six bookings.
What to do next
- Change the responses. Open an endpoint and edit the status code, headers and body of its response, or add more responses with matching rules.
- Add error cases and delays. For example a
409for a slot that is already taken, a422for a missing email address, or a delay to see your loading state. See Simulate API errors, timeouts and rate limits. - Use scenarios for flows. For example a booking that is
pendingon the first call andconfirmedon the next. See Scenarios; scenarios are included from the Pro plan. - Export the project. Under Import/Export you can download the project as an OpenAPI 3.0 file.
Good to know
- Nothing is reserved. The template is an example shape for your own code: it is connected to no calendar and sends no confirmation to anyone.
- Responses are generated per request and the mock keeps no state. A booking you create is not in the list, its slot does not become unavailable, and a cancelled booking can still be fetched.
availableis a random value on every call, so the same slot can be free in one answer and taken in the next. Nothing is validated: you can book anyslotId, twice as well.- The
dateparameter is returned as you send it.GET /bookingsalways returns six bookings; there is no paging or filtering. - The template creates a new project, and no other project in your organization may use the base path
/bookings-api. The Free plan includes one project. - You can change or delete the project and each of its endpoints at any time.
New to Mockhop? Start with the quickstart. Plans: pricing.