Confirming bookings

This article will help you confirm bookings via the API

d
Written by derrick mak
Updated over a week ago

Note: this article assumes that you are already familiar with the "intro to booking graphs" and the "creating bookings via the API" articles.

Introduction: 

This tutorial continues from the previous step, where we've created a booking with the confirm/decline graph - how do we confirm our newly created booking that is now in the "tentative" state?

Performing an action: confirm

After a booking with the confirm/decline graph is created, we now need to confirm it in order for the booking to be added to the resource's calendar and block its availability at the given time-slot. Confirming is done by performing the action "confirm" on the booking. This is done like this:

curl --request PUT \
  --url https://api.timekit.io/v2/bookings/:id/confirm \
  --user :live_api_key_7nzvc7wsBQQISLeFSVhROys9V1bUJ1z7

Pretty simple huh? The booking has now been put into the resource's calendar and is reserving the time-slot.

Creating events in Google calendars: If Doc Brown (who's being booked) is connected using a Google Calendar, he would automatically have an event pushed into his calendar. If Marty McFly (who's doing the booking) also has a Google account, he would get an event-invite directly inside his Google calendar that he can RSVP to.

Next steps

Doc Brown may have to cancel the booking. If not we are actually done with the handle bookings tutorial series. You may want to explore our different graphs.

Did this answer your question?