Reschedule existing booking by Customer
Reschedule existing bookings to a new time or date. Use this endpoint to adjust appointments and accommodate customer or staff availability changes.
Authentication
This endpoint needs app token for authentication.
Method | PUT |
---|---|
Token Type | App Token |
Endpoint | v1/bookings/:uuid/reschedule_by_customer |
Headers | Accept: application/json |
Authorization: Bearer <base64_encoded_token> |
Request Body:
This endpoint requires following the parameters to be sent via post body:
Param Name | Required | Description |
---|---|---|
customer_id | true | customer uuid |
start | true | start date time of booking |
end | true | end date time of booking |
event | false | event object with keys color, what, description, location |
Example Request:
The following code shows how to send request to reschedule by customer:
- PHP
- NodeJS
require 'vendor/autoload.php';
use Slotify\Slotify;
$slotify = new Slotify('your_api_key');
$response = $slotify->rescheduleBookingByCustomer("fake-booking-uuid-1234", [
"end" => "2024-11-06T10:00:00-05:00",
"start" => "2024-11-06T09:00:00-05:00",
"customer_id" => "fake-customer-uuid-5678"
]);
if ($response->isSuccess()) {
echo "Booking rescheduled by customer successfully!";
} else {
echo "Failed to reschedule booking by customer: " . $response->getError();
}
const Slotify = require('slotify-sdk');
const slotify = new Slotify({ apiKey: 'your_api_key' });
slotify.rescheduleBookingByCustomer("fake-booking-uuid-1234", {
end: "2024-11-06T10:00:00-05:00",
start: "2024-11-06T09:00:00-05:00",
customer_id: "fake-customer-uuid-5678"
})
.then(response => {
console.log("Booking rescheduled by customer successfully:", response);
})
.catch(error => {
console.error("Failed to reschedule booking by customer:", error);
});
Example Response:
The following response will be provided by Slotify server when this endpoint is called:
- 204 No Content