Skip to main content

Endpoints

MethodPathDescription
POST/v1/departures/:id/priceCalculate pricing for a departure (top-level).
GET/v1/departures/:id/priceQuerystring-friendly pricing (requires productId).
POST/v1/products/{productIdOrSlug}/departures/{departureId}/priceCalculate pricing scoped to a product (ID or slug).
GET/v1/products/{productIdOrSlug}/departures/{departureId}/priceQuerystring-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

id
uuid
required
Departure ID.

Body Parameters

Headers

Authorization
string
Bearer token (workspace API key).
content-type
string
application/json

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

total
number
required
Total amount (gross).
net
number
required
Subtotal before tax.
tax
number
required
Total tax amount.
gross
number
required
Alias for total.
taxesIncluded
boolean
required
Whether taxes are included in pricing.
breakdown
object
required
Detailed line items and taxes.

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.