Skip to main content

Bookings

Usint the createBooking method of the Rest API you can create a booking in a certain slot for a certain event-type.

In order to create a booking, the following information is required:

  • The event-type identifier
  • The start time of the booking
  • The email of the person associated with the booking
fetch("https://api.timetime.in/v1/bookings", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
// This is the eventy type/service where we can create the booking
eventTypeId: "f899218d-6f2c-4300-8a70-a6910536041b",
// The start time of the booking
start: "2019-08-24T14:00:00Z",
// The email of the person associated with the booking
bookerEmail: "user@example.com",
}),
});

The server will respond with the 201 code if the booking has been created successfully.