POST Reschedule a booking
Following endpoint will be used in order to reschedule a booking.
This is the API that Timekit uses to populate the out of the box Reschedule link in booking emails. This API endpoint allows you to attempt to book a new booking slot by updating the old appointment. This avoids the need to cancel the first appointment manually and then book a new appointment in two steps.
This endpoint will not delete the existing booking rather it will update existing booking with new information.
Endpoint
POST https://api.timekit.io/v2/bookings/:id/reschedule
Parameters
| Name | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
start |
body | datetime | yes | New start time for existing booking. Must be after the start of the current day. | |
end |
body | datetime | yes | New end time for existing booking. Must be after start. |
|
resource_id |
body | string | yes | New resource id assigned to this booking | |
id |
path | string | The ID of the original booking you wish to reschedule |
Request examples
curlcurl --request POST \
--header 'Content-Type: application/json' \
--url https://api.timekit.io/v2/bookings/67c3de6b-3d77-4563-b15f-87d9a5faaac9/reschedule \
--user :live_api_key_7nzvc7wsBQQISLeFSVhROys9V1bUJ1z7 \
--data '{
"start": "2022-04-21T00:00:00-04:00",
"end": "2022-04-21T00:30:00-04:00",
"resource_id": "7edf9092-eb75-4075-bf1d-7f58188943df"
}'
Response examples
200
json{
"data": {
"id": "67c3de6b-3d77-4563-b15f-87d9a5faaac9",
"state": "confirmed",
"graph": "instant",
"completed": false,
"created_at": "2022-04-21T11:21:34-0300",
"updated_at": "2022-04-21T11:21:46-0300",
"what": "Teste 1-1",
"where": "TBD",
"description": "Name: Joe\nEmail: joe@test.com",
"rsvp": "accepted",
"allDay": false,
"start": "2022-04-25T09:00:00-0300",
"end": "2022-04-25T10:00:00-0300"
}
}