Update Specific Booking
This endpoint enables you to change various booking parameters, such as event details or meta.
Authentication
This endpoint needs app token for authentication.
Method | PUT |
---|---|
Endpoint | v1/bookings/:uuid |
Headers | Accept: application/json |
Authorization: Bearer <base64_encoded_token> | |
Token Type | App |
Example Request:
Following code shows how to send request to update specific booking in Slotify api.
- PHP
- BASH
$endpoint = 'https://api.slotify.ca/v1/bookings/bc7b15f9-2573-4aaa-be09-44d6c6f9c62c';
$owner_token = base64_encode('app_token');
$new_data = array(
"event" => array(
"what" => "Meeting with XYZ",
"description" => "Meeting with XYZ"
)
);
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => $endpoint,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => $new_data_json,
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer ' . $owner_token,
'Accept: application/json',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
if(curl_errno($curl)) {
echo 'Error: ' . curl_error($curl);
} else {
echo $response;
}
curl_close($curl);
curl -X PUT \
https://api.slotify.ca/v1/resources/:uuid \
-H 'Authorization: Bearer ' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"event": {
"what": "Meeting with XYZ",
"description": "Meeting with XYZ"
}
}'
Example Response:
Following response will be provided by Slotify server when this endpoint is called:
- 204 Not Content