Skip to main content
Cancelling a booking

This article is a tutorial on how you cancel a booking through the API.

d
Written by derrick mak
Updated over 6 years ago

This article assumes that you have read the introduction to actions in our introduction to booking graphs.
Cancellations are basically just an action that you issue on a booking, there's just some small details worth knowing.

In this tutorial we will assume that you have created a booking with the "instant" graph. For a guide to how you make bookings please read this tutorial.

Issuing a cancel request looks like this:

curl --request POST \
  --user :live_api_key_7nzvc7wsBQQISLeFSVhROys9V1bUJ1z7 \
  --url https://api.timekit.io/v2/bookings/:id/cancel \
  --data '{
    "cancel": {
      "message": "Sorry, gotta fix the DeLorean"
    }
  }'    

Whats worth noting is the cancel message.
After issuing the cancel action, the booking will enter a cancelled state and a notification email will be sent to both the owner and customer, unless emails have been disabled.

Next steps

If a booking is cancelled that particular booking is at an end-state and a new booking must be created to request the same time-slot.
We may instead of cancelling a booking confirm it.

Did this answer your question?