curl --request POST \
--url https://b.anny.co/api/v1/orders/from-config/booking-quota-grants \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"order_customer_id": "1723",
"bookings": [
{
"booking_ref": "bk-1",
"resource_id": "10",
"service_id": {
"5": 1
},
"start_date": "2026-04-06T09:00:00+02:00",
"end_date": "2026-04-06T10:00:00+02:00"
},
{
"booking_ref": "bk-2",
"resource_id": "10",
"service_id": {
"5": 1
},
"start_date": "2026-04-06T11:00:00+02:00",
"end_date": "2026-04-06T12:00:00+02:00",
"prevent_applying_default_quota": true
}
]
}
'{
"by_booking_ref": {
"bk-1": {
"data": [
{
"type": "booking-quota-grants",
"id": "381",
"attributes": {
"label": "Morning quota",
"start_date": "2026-04-01T00:00:00+00:00",
"end_date": "2026-04-30T23:59:59+00:00",
"expired_at": null,
"recurring_unit": "none",
"recurring_period": 0,
"value": 10,
"value_type": "quantity",
"used_value": 3,
"current_value": 7,
"created_at": "2026-04-01T08:00:00+00:00",
"updated_at": "2026-04-04T09:15:00+00:00"
},
"meta": {
"formatted_value": 7,
"current_progress": 30,
"used_up_label": "7 of 10 left",
"short_label": "7 left"
}
}
],
"meta": {
"applicable_grant_ids": [
"381"
],
"usage_by_grant_id": {
"381": {
"value": 1,
"value_type": "quantity",
"is_net_total": false,
"currency": "EUR",
"tax_rate": 19,
"is_partial": false,
"charged_price": 0,
"relativ_usage": 0.1
}
},
"requires_quota": true,
"booking_allowed": true,
"preselected_booking_quota_grant_id": "381"
}
}
}
}Plans & Passes
Resolve booking quota grants for from-config cart bookings
Resolves eligible booking quota grants for each booking in an admin from-config payload.
The response is grouped by booking_ref so the client can map grants back to each cart line.
Selection behavior:
- If
booking_quota_grant_idis provided, it must be applicable for that booking context. - If no explicit selection is provided and
prevent_applying_default_quota=true, no preselection is returned. - If
booking_codeis present, pass-based grants are used as the source (customer/account grants are not merged).
POST
/
api
/
v1
/
orders
/
from-config
/
booking-quota-grants
curl --request POST \
--url https://b.anny.co/api/v1/orders/from-config/booking-quota-grants \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"order_customer_id": "1723",
"bookings": [
{
"booking_ref": "bk-1",
"resource_id": "10",
"service_id": {
"5": 1
},
"start_date": "2026-04-06T09:00:00+02:00",
"end_date": "2026-04-06T10:00:00+02:00"
},
{
"booking_ref": "bk-2",
"resource_id": "10",
"service_id": {
"5": 1
},
"start_date": "2026-04-06T11:00:00+02:00",
"end_date": "2026-04-06T12:00:00+02:00",
"prevent_applying_default_quota": true
}
]
}
'{
"by_booking_ref": {
"bk-1": {
"data": [
{
"type": "booking-quota-grants",
"id": "381",
"attributes": {
"label": "Morning quota",
"start_date": "2026-04-01T00:00:00+00:00",
"end_date": "2026-04-30T23:59:59+00:00",
"expired_at": null,
"recurring_unit": "none",
"recurring_period": 0,
"value": 10,
"value_type": "quantity",
"used_value": 3,
"current_value": 7,
"created_at": "2026-04-01T08:00:00+00:00",
"updated_at": "2026-04-04T09:15:00+00:00"
},
"meta": {
"formatted_value": 7,
"current_progress": 30,
"used_up_label": "7 of 10 left",
"short_label": "7 left"
}
}
],
"meta": {
"applicable_grant_ids": [
"381"
],
"usage_by_grant_id": {
"381": {
"value": 1,
"value_type": "quantity",
"is_net_total": false,
"currency": "EUR",
"tax_rate": 19,
"is_partial": false,
"charged_price": 0,
"relativ_usage": 0.1
}
},
"requires_quota": true,
"booking_allowed": true,
"preselected_booking_quota_grant_id": "381"
}
}
}
}Autorisierungen
The access token received from the authorization server in the OAuth 2.0 flow.
Header
Bearer Token
Abfrageparameter
Organization ID
Body
application/json
Antwort
Grants resolved per booking reference.
Show child attributes
Show child attributes