Skip to main content

Endpoint

GET https://api.voyantcloud.com/v1/products/:id/pricing/options
Retrieve available room categories and pricing options for products with per-room pricing models. This endpoint is used to display room selection options in booking interfaces.

Authentication

Authorization
string
required
Bearer token (e.g. Authorization: Bearer YOUR_API_KEY)

Path parameters

id
string
required
Product ID (UUID format)

Query parameters

departure
string
Departure ID to get departure-specific pricing
ratePlanId
string
Rate plan ID for multi-tier pricing

Request example

curl "https://api.voyantcloud.com/v1/products/prod_123abc/pricing/options?departure=dep_789xyz" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

options
array
required
Array of available pricing options
{
  "options": [
    {
      "key": "single",
      "label": "Single Room",
      "pax": 1,
      "amountPerPerson": 120.00,
      "currency": "EUR"
    },
    {
      "key": "double",
      "label": "Double Room",
      "pax": 2,
      "amountPerPerson": 100.00,
      "currency": "EUR"
    },
    {
      "key": "triple",
      "label": "Triple Room",
      "pax": 3,
      "amountPerPerson": 85.00,
      "currency": "EUR"
    }
  ]
}

Use cases

Room selector UI

Build a room selection interface:
async function loadRoomOptions(productId, departureId) {
  const response = await fetch(
    `https://api.voyantcloud.com/v1/products/${productId}/pricing/options?departure=${departureId}`,
    { headers: { Authorization: `Bearer ${process.env.VOYANT_API_KEY}` } },
  )

  const { options } = await response.json()

  return options.map((option) => ({
    id: option.key,
    name: option.label,
    maxOccupancy: option.pax,
    pricePerPerson: option.amountPerPerson,
    currency: option.currency,
    displayPrice: `${option.currency} ${option.amountPerPerson.toFixed(2)}/person`,
  }))
}

Price comparison

Compare prices across room types:
function findBestValue(options) {
  if (!options.length) return null

  // Find option with lowest per-person price
  return options.reduce((best, current) =>
    current.amountPerPerson < best.amountPerPerson ? current : best,
  )
}
Empty options array indicates the product uses a different pricing model (per person, per group, or per option).