Book a Customer for existing Booking
Fill remaining slots in bookings with multiple capacities. Initially, bookings are created with a single customer. Use this endpoint to add additional customers to fully utilize open slots.
Authentication
This endpoint needs app token for authentication.
Method | PUT |
---|---|
Token Type | App Token |
Endpoint | v1/bookings/:uuid/book |
Headers | Accept: application/json |
Authorization: Bearer <base64_encoded_token> |
Example Request:
Following code shows how to send request to book customer individually:
- PHP SDK
- NODEJS SDK
require 'vendor/autoload.php';
use Slotify\Slotify;
$slotify = new Slotify('your_api_key');
$response = $slotify->bookCustomer([
"customer" => [
"seats" => 10,
"first_name" => "John",
"last_name" => "Doe",
"email" => "[email protected]",
"customer_notes" => "Booking additional seats required."
]
]);
if ($response->isSuccess()) {
echo "Booking created successfully!";
} else {
echo "Failed to create booking: " . $response->getError();
}
const Slotify = require('slotify-sdk');
const slotify = new Slotify({ apiKey: 'your_api_key' });
slotify.bookCustomer({
customer: {
seats: 10,
first_name: "John",
last_name: "Doe",
email: "[email protected]",
customer_notes: "Booking additional seats required."
}
})
.then(response => {
console.log('Booking created successfully:', response);
})
.catch(error => {
console.error('Failed to create booking:', error);
});
Example Response:
Following response will be provided by Slotify server when this endpoint is called:
- 204 No Content