curl --request POST \
--url https://b.anny.co/api/v1/orders/calculate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"order_customer_id": "<string>",
"voucher_code": "<string>",
"booking_code": "<string>",
"check_availability": true,
"notify_customer": true,
"complete_order": true,
"timezone": "<string>",
"add_ons": [
{
"add_on_id": "<string>",
"quantity": 2
}
],
"booking_passes": [
{
"booking_bundle_id": "<string>",
"quantity": 2
}
],
"bookings": [
{
"resource_id": "<string>",
"service_id": {},
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"booking_ref": "<string>",
"customer_id": "<string>",
"description": "<string>",
"customer_note": "<string>",
"booking_quota_grant_id": "<string>",
"prevent_applying_default_quota": false,
"booking_add_ons": [
{}
],
"sub_bookings": [
{}
]
}
]
}
'import requests
url = "https://b.anny.co/api/v1/orders/calculate"
payload = {
"order_customer_id": "<string>",
"voucher_code": "<string>",
"booking_code": "<string>",
"check_availability": True,
"notify_customer": True,
"complete_order": True,
"timezone": "<string>",
"add_ons": [
{
"add_on_id": "<string>",
"quantity": 2
}
],
"booking_passes": [
{
"booking_bundle_id": "<string>",
"quantity": 2
}
],
"bookings": [
{
"resource_id": "<string>",
"service_id": {},
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"booking_ref": "<string>",
"customer_id": "<string>",
"description": "<string>",
"customer_note": "<string>",
"booking_quota_grant_id": "<string>",
"prevent_applying_default_quota": False,
"booking_add_ons": [{}],
"sub_bookings": [{}]
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
order_customer_id: '<string>',
voucher_code: '<string>',
booking_code: '<string>',
check_availability: true,
notify_customer: true,
complete_order: true,
timezone: '<string>',
add_ons: [{add_on_id: '<string>', quantity: 2}],
booking_passes: [{booking_bundle_id: '<string>', quantity: 2}],
bookings: [
{
resource_id: '<string>',
service_id: {},
start_date: '2023-11-07T05:31:56Z',
end_date: '2023-11-07T05:31:56Z',
booking_ref: '<string>',
customer_id: '<string>',
description: '<string>',
customer_note: '<string>',
booking_quota_grant_id: '<string>',
prevent_applying_default_quota: false,
booking_add_ons: [{}],
sub_bookings: [{}]
}
]
})
};
fetch('https://b.anny.co/api/v1/orders/calculate', 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/orders/calculate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'order_customer_id' => '<string>',
'voucher_code' => '<string>',
'booking_code' => '<string>',
'check_availability' => true,
'notify_customer' => true,
'complete_order' => true,
'timezone' => '<string>',
'add_ons' => [
[
'add_on_id' => '<string>',
'quantity' => 2
]
],
'booking_passes' => [
[
'booking_bundle_id' => '<string>',
'quantity' => 2
]
],
'bookings' => [
[
'resource_id' => '<string>',
'service_id' => [
],
'start_date' => '2023-11-07T05:31:56Z',
'end_date' => '2023-11-07T05:31:56Z',
'booking_ref' => '<string>',
'customer_id' => '<string>',
'description' => '<string>',
'customer_note' => '<string>',
'booking_quota_grant_id' => '<string>',
'prevent_applying_default_quota' => false,
'booking_add_ons' => [
[
]
],
'sub_bookings' => [
[
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://b.anny.co/api/v1/orders/calculate"
payload := strings.NewReader("{\n \"order_customer_id\": \"<string>\",\n \"voucher_code\": \"<string>\",\n \"booking_code\": \"<string>\",\n \"check_availability\": true,\n \"notify_customer\": true,\n \"complete_order\": true,\n \"timezone\": \"<string>\",\n \"add_ons\": [\n {\n \"add_on_id\": \"<string>\",\n \"quantity\": 2\n }\n ],\n \"booking_passes\": [\n {\n \"booking_bundle_id\": \"<string>\",\n \"quantity\": 2\n }\n ],\n \"bookings\": [\n {\n \"resource_id\": \"<string>\",\n \"service_id\": {},\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"booking_ref\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"description\": \"<string>\",\n \"customer_note\": \"<string>\",\n \"booking_quota_grant_id\": \"<string>\",\n \"prevent_applying_default_quota\": false,\n \"booking_add_ons\": [\n {}\n ],\n \"sub_bookings\": [\n {}\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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/orders/calculate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"order_customer_id\": \"<string>\",\n \"voucher_code\": \"<string>\",\n \"booking_code\": \"<string>\",\n \"check_availability\": true,\n \"notify_customer\": true,\n \"complete_order\": true,\n \"timezone\": \"<string>\",\n \"add_ons\": [\n {\n \"add_on_id\": \"<string>\",\n \"quantity\": 2\n }\n ],\n \"booking_passes\": [\n {\n \"booking_bundle_id\": \"<string>\",\n \"quantity\": 2\n }\n ],\n \"bookings\": [\n {\n \"resource_id\": \"<string>\",\n \"service_id\": {},\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"booking_ref\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"description\": \"<string>\",\n \"customer_note\": \"<string>\",\n \"booking_quota_grant_id\": \"<string>\",\n \"prevent_applying_default_quota\": false,\n \"booking_add_ons\": [\n {}\n ],\n \"sub_bookings\": [\n {}\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/v1/orders/calculate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"order_customer_id\": \"<string>\",\n \"voucher_code\": \"<string>\",\n \"booking_code\": \"<string>\",\n \"check_availability\": true,\n \"notify_customer\": true,\n \"complete_order\": true,\n \"timezone\": \"<string>\",\n \"add_ons\": [\n {\n \"add_on_id\": \"<string>\",\n \"quantity\": 2\n }\n ],\n \"booking_passes\": [\n {\n \"booking_bundle_id\": \"<string>\",\n \"quantity\": 2\n }\n ],\n \"bookings\": [\n {\n \"resource_id\": \"<string>\",\n \"service_id\": {},\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"booking_ref\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"description\": \"<string>\",\n \"customer_note\": \"<string>\",\n \"booking_quota_grant_id\": \"<string>\",\n \"prevent_applying_default_quota\": false,\n \"booking_add_ons\": [\n {}\n ],\n \"sub_bookings\": [\n {}\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"total": 25,
"gross_amount": 25,
"is_net_price": false,
"net_amount": 21.01,
"tax_amount": 3.99,
"currency": "EUR",
"price_hidden": false,
"items": [],
"vat_breakdown": [],
"bookings": [
{
"booking_ref": "bk-1",
"start_date": "2026-04-15T09:00:00+02:00",
"end_date": "2026-04-15T10:00:00+02:00",
"total": 0,
"gross_amount": 0,
"net_amount": 0,
"tax_amount": 0,
"currency": "EUR",
"booking_quota_grants": [
{
"id": "grant-uuid-1",
"name": "10er Karte",
"value": 10,
"used_value": 3,
"value_type": "quantity",
"start_date": "2026-01-01T00:00:00Z",
"end_date": "2026-12-31T23:59:59Z",
"applicable": true,
"preselected": true,
"usage": {
"value": 1,
"value_type": "quantity",
"charged_price": 0,
"is_partial": false,
"relative_usage": 0.1
}
}
]
}
]
}Pre-calculate order pricing and resolve booking quota grants
Calculates prices, taxes, and totals for an order configuration without creating it. Also resolves all available booking quota grants per booking based on the customer or booking code, including which grant is preselected and the projected usage for each applicable grant.
This endpoint replaces the need to call /orders/from-config/booking-quota-grants separately.
curl --request POST \
--url https://b.anny.co/api/v1/orders/calculate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"order_customer_id": "<string>",
"voucher_code": "<string>",
"booking_code": "<string>",
"check_availability": true,
"notify_customer": true,
"complete_order": true,
"timezone": "<string>",
"add_ons": [
{
"add_on_id": "<string>",
"quantity": 2
}
],
"booking_passes": [
{
"booking_bundle_id": "<string>",
"quantity": 2
}
],
"bookings": [
{
"resource_id": "<string>",
"service_id": {},
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"booking_ref": "<string>",
"customer_id": "<string>",
"description": "<string>",
"customer_note": "<string>",
"booking_quota_grant_id": "<string>",
"prevent_applying_default_quota": false,
"booking_add_ons": [
{}
],
"sub_bookings": [
{}
]
}
]
}
'import requests
url = "https://b.anny.co/api/v1/orders/calculate"
payload = {
"order_customer_id": "<string>",
"voucher_code": "<string>",
"booking_code": "<string>",
"check_availability": True,
"notify_customer": True,
"complete_order": True,
"timezone": "<string>",
"add_ons": [
{
"add_on_id": "<string>",
"quantity": 2
}
],
"booking_passes": [
{
"booking_bundle_id": "<string>",
"quantity": 2
}
],
"bookings": [
{
"resource_id": "<string>",
"service_id": {},
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"booking_ref": "<string>",
"customer_id": "<string>",
"description": "<string>",
"customer_note": "<string>",
"booking_quota_grant_id": "<string>",
"prevent_applying_default_quota": False,
"booking_add_ons": [{}],
"sub_bookings": [{}]
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
order_customer_id: '<string>',
voucher_code: '<string>',
booking_code: '<string>',
check_availability: true,
notify_customer: true,
complete_order: true,
timezone: '<string>',
add_ons: [{add_on_id: '<string>', quantity: 2}],
booking_passes: [{booking_bundle_id: '<string>', quantity: 2}],
bookings: [
{
resource_id: '<string>',
service_id: {},
start_date: '2023-11-07T05:31:56Z',
end_date: '2023-11-07T05:31:56Z',
booking_ref: '<string>',
customer_id: '<string>',
description: '<string>',
customer_note: '<string>',
booking_quota_grant_id: '<string>',
prevent_applying_default_quota: false,
booking_add_ons: [{}],
sub_bookings: [{}]
}
]
})
};
fetch('https://b.anny.co/api/v1/orders/calculate', 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/orders/calculate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'order_customer_id' => '<string>',
'voucher_code' => '<string>',
'booking_code' => '<string>',
'check_availability' => true,
'notify_customer' => true,
'complete_order' => true,
'timezone' => '<string>',
'add_ons' => [
[
'add_on_id' => '<string>',
'quantity' => 2
]
],
'booking_passes' => [
[
'booking_bundle_id' => '<string>',
'quantity' => 2
]
],
'bookings' => [
[
'resource_id' => '<string>',
'service_id' => [
],
'start_date' => '2023-11-07T05:31:56Z',
'end_date' => '2023-11-07T05:31:56Z',
'booking_ref' => '<string>',
'customer_id' => '<string>',
'description' => '<string>',
'customer_note' => '<string>',
'booking_quota_grant_id' => '<string>',
'prevent_applying_default_quota' => false,
'booking_add_ons' => [
[
]
],
'sub_bookings' => [
[
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://b.anny.co/api/v1/orders/calculate"
payload := strings.NewReader("{\n \"order_customer_id\": \"<string>\",\n \"voucher_code\": \"<string>\",\n \"booking_code\": \"<string>\",\n \"check_availability\": true,\n \"notify_customer\": true,\n \"complete_order\": true,\n \"timezone\": \"<string>\",\n \"add_ons\": [\n {\n \"add_on_id\": \"<string>\",\n \"quantity\": 2\n }\n ],\n \"booking_passes\": [\n {\n \"booking_bundle_id\": \"<string>\",\n \"quantity\": 2\n }\n ],\n \"bookings\": [\n {\n \"resource_id\": \"<string>\",\n \"service_id\": {},\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"booking_ref\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"description\": \"<string>\",\n \"customer_note\": \"<string>\",\n \"booking_quota_grant_id\": \"<string>\",\n \"prevent_applying_default_quota\": false,\n \"booking_add_ons\": [\n {}\n ],\n \"sub_bookings\": [\n {}\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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/orders/calculate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"order_customer_id\": \"<string>\",\n \"voucher_code\": \"<string>\",\n \"booking_code\": \"<string>\",\n \"check_availability\": true,\n \"notify_customer\": true,\n \"complete_order\": true,\n \"timezone\": \"<string>\",\n \"add_ons\": [\n {\n \"add_on_id\": \"<string>\",\n \"quantity\": 2\n }\n ],\n \"booking_passes\": [\n {\n \"booking_bundle_id\": \"<string>\",\n \"quantity\": 2\n }\n ],\n \"bookings\": [\n {\n \"resource_id\": \"<string>\",\n \"service_id\": {},\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"booking_ref\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"description\": \"<string>\",\n \"customer_note\": \"<string>\",\n \"booking_quota_grant_id\": \"<string>\",\n \"prevent_applying_default_quota\": false,\n \"booking_add_ons\": [\n {}\n ],\n \"sub_bookings\": [\n {}\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/v1/orders/calculate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"order_customer_id\": \"<string>\",\n \"voucher_code\": \"<string>\",\n \"booking_code\": \"<string>\",\n \"check_availability\": true,\n \"notify_customer\": true,\n \"complete_order\": true,\n \"timezone\": \"<string>\",\n \"add_ons\": [\n {\n \"add_on_id\": \"<string>\",\n \"quantity\": 2\n }\n ],\n \"booking_passes\": [\n {\n \"booking_bundle_id\": \"<string>\",\n \"quantity\": 2\n }\n ],\n \"bookings\": [\n {\n \"resource_id\": \"<string>\",\n \"service_id\": {},\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"booking_ref\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"description\": \"<string>\",\n \"customer_note\": \"<string>\",\n \"booking_quota_grant_id\": \"<string>\",\n \"prevent_applying_default_quota\": false,\n \"booking_add_ons\": [\n {}\n ],\n \"sub_bookings\": [\n {}\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"total": 25,
"gross_amount": 25,
"is_net_price": false,
"net_amount": 21.01,
"tax_amount": 3.99,
"currency": "EUR",
"price_hidden": false,
"items": [],
"vat_breakdown": [],
"bookings": [
{
"booking_ref": "bk-1",
"start_date": "2026-04-15T09:00:00+02:00",
"end_date": "2026-04-15T10:00:00+02:00",
"total": 0,
"gross_amount": 0,
"net_amount": 0,
"tax_amount": 0,
"currency": "EUR",
"booking_quota_grants": [
{
"id": "grant-uuid-1",
"name": "10er Karte",
"value": 10,
"used_value": 3,
"value_type": "quantity",
"start_date": "2026-01-01T00:00:00Z",
"end_date": "2026-12-31T23:59:59Z",
"applicable": true,
"preselected": true,
"usage": {
"value": 1,
"value_type": "quantity",
"charged_price": 0,
"is_partial": false,
"relative_usage": 0.1
}
}
]
}
]
}Autorisierungen
The access token received from the authorization server in the OAuth 2.0 flow.
Body
Customer ID to associate with the order. Used to resolve quota grants.
Voucher or discount code to apply.
Booking pass code. When provided, quota grants are resolved from the pass instead of the customer.
Standalone add-ons (unit-priced) billed on the order invoice, independent of any booking.
Show child attributes
Show child attributes
Booking passes purchased from bundles, billed on the order invoice.
Show child attributes
Show child attributes
Booking items. May be empty or omitted when add_ons or booking_passes are present.
Show child attributes
Show child attributes
Antwort
Calculated pricing data including totals, taxes, per-booking breakdowns, and resolved quota grants.