Cancel a booking
curl --request GET \
--url https://b.anny.co/api/v1/bookings/{booking_id}/cancelimport requests
url = "https://b.anny.co/api/v1/bookings/{booking_id}/cancel"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://b.anny.co/api/v1/bookings/{booking_id}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://b.anny.co/api/v1/bookings/{booking_id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://b.anny.co/api/v1/bookings/{booking_id}/cancel"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://b.anny.co/api/v1/bookings/{booking_id}/cancel")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/v1/bookings/{booking_id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"type": "bookings",
"id": "3718496",
"attributes": {
"number": "BB29997477",
"status": "canceled",
"is_blocker": false,
"start_date": "2021-10-08T07:00:00+00:00",
"end_date": "2021-10-08T11:00:00+00:00",
"blocker_start_date": "2021-10-08T07:00:00+00:00",
"blocker_end_date": "2021-10-08T11:00:00+00:00",
"description": "Max Mustermann - Coaching: Leadership - Empower Your Employees",
"charged_duration": 240,
"weight": 1,
"currency": "EUR",
"total": 287,
"code": "pZuhVSjhKdCUhI7f",
"subtotal": 249,
"charged_total": 0,
"charged_subtotal": 0,
"starting_fee": 0,
"customer_note": null,
"created_at": "2021-09-24T14:41:31+00:00",
"canceled_at": "2021-09-27T10:01:51+00:00",
"check_in_date": null,
"check_out_date": null,
"custom_entry_map": {
"55536678-2266-4bb0-99f5-206348244ad2": {
"value": "COO",
"formatted_value": "COO",
"label": "Position"
}
}
},
"links": {
"self": "https://b.anny.co/api/v1/bookings/3718496"
},
"meta": []
}
}Booking Management
Cancel a booking
Auth: optional. This endpoint allows a customer to cancel a booking either anonymously via the access token or via customer login.
GET
/
api
/
v1
/
bookings
/
{booking_id}
/
cancel
Cancel a booking
curl --request GET \
--url https://b.anny.co/api/v1/bookings/{booking_id}/cancelimport requests
url = "https://b.anny.co/api/v1/bookings/{booking_id}/cancel"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://b.anny.co/api/v1/bookings/{booking_id}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://b.anny.co/api/v1/bookings/{booking_id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://b.anny.co/api/v1/bookings/{booking_id}/cancel"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://b.anny.co/api/v1/bookings/{booking_id}/cancel")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/v1/bookings/{booking_id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"type": "bookings",
"id": "3718496",
"attributes": {
"number": "BB29997477",
"status": "canceled",
"is_blocker": false,
"start_date": "2021-10-08T07:00:00+00:00",
"end_date": "2021-10-08T11:00:00+00:00",
"blocker_start_date": "2021-10-08T07:00:00+00:00",
"blocker_end_date": "2021-10-08T11:00:00+00:00",
"description": "Max Mustermann - Coaching: Leadership - Empower Your Employees",
"charged_duration": 240,
"weight": 1,
"currency": "EUR",
"total": 287,
"code": "pZuhVSjhKdCUhI7f",
"subtotal": 249,
"charged_total": 0,
"charged_subtotal": 0,
"starting_fee": 0,
"customer_note": null,
"created_at": "2021-09-24T14:41:31+00:00",
"canceled_at": "2021-09-27T10:01:51+00:00",
"check_in_date": null,
"check_out_date": null,
"custom_entry_map": {
"55536678-2266-4bb0-99f5-206348244ad2": {
"value": "COO",
"formatted_value": "COO",
"label": "Position"
}
}
},
"links": {
"self": "https://b.anny.co/api/v1/bookings/3718496"
},
"meta": []
}
}Pfadparameter
id of the booking
Abfrageparameter
Access token of the accociated order
Antwort
OK
A booking blocks the related resource from start_date until its end_date while its status is reserved, requested or accepted.
Status values:
reserved— booking is reserved until order expirationrequested— needs manual acceptance by adminaccepted— accepted (automatically or manually)rejected— rejected by admin before fulfillment; always yields a 100% refund when payment existscanceled— canceled by customer or admin; refund follows the configured cancellation policy conditionsexpired— booking expired because the check-in time passed without check-in
Show child attributes
Show child attributes