Check booking out
curl --request POST \
--url https://b.anny.co/api/v1/bookings/{booking_id}/check-out \
--header 'Authorization: Bearer <token>'import requests
url = "https://b.anny.co/api/v1/bookings/{booking_id}/check-out"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://b.anny.co/api/v1/bookings/{booking_id}/check-out', 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}/check-out",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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}/check-out"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://b.anny.co/api/v1/bookings/{booking_id}/check-out")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/v1/bookings/{booking_id}/check-out")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"type": "bookings",
"id": "12680",
"attributes": {
"number": "BB49049344",
"status": "accepted",
"is_blocker": false,
"start_date": "2022-01-04T13:30:00+00:00",
"end_date": "2022-01-04T13:35:00+00:00",
"blocker_start_date": "2022-01-04T13:30:00+00:00",
"blocker_end_date": "2022-01-04T13:35:00+00:00",
"description": "Test Kunde",
"charged_duration": 5,
"weight": 1,
"currency": "EUR",
"total": 0,
"is_net_total": false,
"code": "!TIXCJ6dOP90Tdo8mgKg",
"subtotal": 0,
"charged_total": 0,
"charged_subtotal": 0,
"starting_fee": 0,
"customer_note": null,
"created_at": "2022-01-04T13:29:35+00:00",
"canceled_at": null,
"check_in_date": "2022-01-04T16:42:00+00:00",
"check_out_date": "2022-01-04T16:46:00+00:00",
"custom_entry_map": {},
"note": null,
"manually_created": true,
"is_sub_booking": false,
"external_uuid": null,
"has_payment": false,
"is_editable": true,
"updated_at": "2022-01-04T16:46:34+00:00"
},
"links": {
"self": "https://b.staging.anny.co/api/v1/bookings/12680"
},
"meta": {
"personalization_name": null
}
}
}{
"errors": [
{
"status": "400",
"code": "scans.not_checked_in",
"title": "Nicht eingecheckt",
"detail": "Das Ticket muss erst eingecheckt werden, bevor es ausgecheckt werden kann."
}
]
}Booking Management
Check booking out
POST
/
api
/
v1
/
bookings
/
{booking_id}
/
check-out
Check booking out
curl --request POST \
--url https://b.anny.co/api/v1/bookings/{booking_id}/check-out \
--header 'Authorization: Bearer <token>'import requests
url = "https://b.anny.co/api/v1/bookings/{booking_id}/check-out"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://b.anny.co/api/v1/bookings/{booking_id}/check-out', 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}/check-out",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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}/check-out"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://b.anny.co/api/v1/bookings/{booking_id}/check-out")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/v1/bookings/{booking_id}/check-out")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"type": "bookings",
"id": "12680",
"attributes": {
"number": "BB49049344",
"status": "accepted",
"is_blocker": false,
"start_date": "2022-01-04T13:30:00+00:00",
"end_date": "2022-01-04T13:35:00+00:00",
"blocker_start_date": "2022-01-04T13:30:00+00:00",
"blocker_end_date": "2022-01-04T13:35:00+00:00",
"description": "Test Kunde",
"charged_duration": 5,
"weight": 1,
"currency": "EUR",
"total": 0,
"is_net_total": false,
"code": "!TIXCJ6dOP90Tdo8mgKg",
"subtotal": 0,
"charged_total": 0,
"charged_subtotal": 0,
"starting_fee": 0,
"customer_note": null,
"created_at": "2022-01-04T13:29:35+00:00",
"canceled_at": null,
"check_in_date": "2022-01-04T16:42:00+00:00",
"check_out_date": "2022-01-04T16:46:00+00:00",
"custom_entry_map": {},
"note": null,
"manually_created": true,
"is_sub_booking": false,
"external_uuid": null,
"has_payment": false,
"is_editable": true,
"updated_at": "2022-01-04T16:46:34+00:00"
},
"links": {
"self": "https://b.staging.anny.co/api/v1/bookings/12680"
},
"meta": {
"personalization_name": null
}
}
}{
"errors": [
{
"status": "400",
"code": "scans.not_checked_in",
"title": "Nicht eingecheckt",
"detail": "Das Ticket muss erst eingecheckt werden, bevor es ausgecheckt werden kann."
}
]
}Autorisierungen
The access token received from the authorization server in the OAuth 2.0 flow.
Pfadparameter
The booking identifier.
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
⌘I