Endpoints
| Method | Path | Description |
|---|
| POST | /v1/departures/:id/price | Calculate pricing for a departure (top-level). |
| GET | /v1/departures/:id/price | Querystring-friendly pricing (requires productId). |
| POST | /v1/products/{productIdOrSlug}/departures/{departureId}/price | Calculate pricing scoped to a product (ID or slug). |
| GET | /v1/products/{productIdOrSlug}/departures/{departureId}/price | Querystring-friendly pricing scoped to a product. |
For nested routes, productId is inferred from the path (or slug). Use the nested form when you prefer slug addressing.
Path Parameters
Body Parameters
Bearer token (workspace API key).
Request Example
curl -X POST "https://api.voyantcloud.com/v1/departures/dep_456/price" \
-H "Authorization: Bearer $VOYANT_API_KEY" \
-H "content-type: application/json" \
-d '{
"productId": "prod_123",
"buyerType": "B2B",
"buyerVatId": "RO12345678",
"pax": { "adults": 2, "children": 0, "infants": 0 },
"rooms": [
{ "categoryKey": "double", "occupancy": 2, "quantity": 1 }
],
"addons": [
{ "id": "ext_001", "quantity": 1 }
]
}'
Response Fields
Whether taxes are included in pricing.
Detailed line items and taxes.
Itemized pricing lines (rules, addons, rooms).
Applied taxes with rate and amount.
Response Example
{
"breakdown": {
"base": { "label": "Base", "amount": 1450 },
"lines": [
{ "label": "Base fare", "amount": 1200 },
{ "label": "Extension: Traditional taverna", "qty": 1, "unitAmount": 150, "amount": 150 }
],
"addons": [],
"taxes": [
{ "rate": 9, "amount": 130.5, "jurisdiction": null }
]
},
"total": 1580.5,
"net": 1450,
"tax": 130.5,
"gross": 1580.5,
"taxesIncluded": false
}
Pricing honors workspace tax settings, market rules, and rate plan tax codes. Set applyRules to false to retrieve raw base prices without adjustments.