Reassign existing booking to different resource
Reassign bookings to a different staff member or resource. Use this endpoint to manage staff availability and optimize scheduling flexibility.
Authentication
This endpoint needs app token for authentication.
Method | PUT |
---|---|
Token Type | App Token |
Endpoint | v1/bookings/:uuid/reassign |
Headers | Accept: application/json |
Authorization: Bearer <base64_encoded_token> |
Request Body:
This endpoint requires the following parameters to be sent via post body:
Param Name | Required | Description |
---|---|---|
resources.*.old_resource_id | true | Old resource uuid |
resources.*.new_resource_id | true | new resource uuid |
Example Request:
The following code shows how to send request to reassign a booking by resource:
- PHP
- NodeJS
require 'vendor/autoload.php';
use Slotify\Slotify;
$slotify = new Slotify('your_api_key');
$response = $slotify->reassignBooking("fake-booking-uuid-9012", [
"resources" => [
[
"old_resource_id" => "fake-old-resource-uuid-1234",
"new_resource_id" => "fake-new-resource-uuid-5678"
]
]
]);
if ($response->isSuccess()) {
echo "Booking reassigned successfully!";
} else {
echo "Failed to reassign booking: " . $response->getError();
}
const Slotify = require('slotify-sdk');
const slotify = new Slotify({ apiKey: 'your_api_key' });
slotify.reassignBooking("fake-booking-uuid-9012", {
resources: [
{
old_resource_id: "fake-old-resource-uuid-1234",
new_resource_id: "fake-new-resource-uuid-5678"
}
]
})
.then(response => {
console.log("Booking reassigned successfully:", response);
})
.catch(error => {
console.error("Failed to reassign booking:", error);
});
Example Response:
The following response will be provided by Slotify server when this endpoint is called:
- 204 No Content