Skip to main content

Endpoint

GET https://api.voyantcloud.com/v1/products/:idOrSlug
Retrieve complete details about a specific travel product including descriptions, media, pricing models, and availability information.

Authentication

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

Query parameters

lang
string
Optional language code (e.g., ro, fr) to return localized fields. Alias: locale.

Path parameters

idOrSlug
string
required
Product ID (TypeID with prod_ prefix) or workspace slug. Translation slugs are also supported when you pass the matching lang/locale value.

Request example

curl https://api.voyantcloud.com/v1/products/prod_01h8z3y4x2w1v0u9t8s7r6q5p4 \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

id
string
required
Unique product identifier
title
string
required
Product name/title. When lang is provided and a translation exists, this is localized.
description
string
Full product description (may contain HTML). Localized when a matching translation exists.
summary
string
Short summary for listings
slug
string
URL-friendly identifier
status
string
required
Product status: draft, active, archived
type
string
Product type: tour, experience, hotel, package, transfer, car_rental, flight
duration_days
integer
Duration in days for multi-day products
currency
string
3-letter ISO currency code
location
object
Product location information
media
array
Array of product images and videos
inclusions
array
List of what’s included in the product
exclusions
array
List of what’s not included
highlights
array
Key highlights and features
created_at
timestamp
ISO 8601 timestamp when created
updated_at
timestamp
ISO 8601 timestamp when last updated
translation
object
Translation record for the requested lang (or null if none found).
{
  "id": "prod_01h8z3y4x2w1v0u9t8s7r6q5p4",
  "title": "Paris City Tour",
  "description": "<p>Discover the magic of Paris with our comprehensive city tour...</p>",
  "summary": "Full-day guided tour of Paris's iconic landmarks",
  "slug": "paris-city-tour",
  "status": "active",
  "type": "tour",
  "duration_days": 1,
  "currency": "EUR",
  "location": {
    "city": "Paris",
    "country": "FR",
    "coordinates": {
      "lat": 48.8566,
      "lng": 2.3522
    }
  },
  "media": [
    {
      "url": "https://cdn.voyantcloud.com/products/paris-tour-1.jpg",
      "type": "image",
      "alt": "Eiffel Tower view",
      "sort": 0
    },
    {
      "url": "https://cdn.voyantcloud.com/products/paris-tour-2.jpg",
      "type": "image",
      "alt": "Louvre Museum",
      "sort": 1
    }
  ],
  "inclusions": [
    "Professional guide",
    "Hotel pickup and drop-off",
    "Skip-the-line tickets",
    "Lunch at local restaurant"
  ],
  "exclusions": [
    "Gratuities",
    "Personal expenses",
    "Travel insurance"
  ],
  "highlights": [
    "Visit the Eiffel Tower",
    "Explore the Louvre Museum",
    "Seine River cruise",
    "Notre-Dame Cathedral"
  ],
  "created_at": "2024-01-15T10:00:00Z",
  "updated_at": "2024-01-15T10:00:00Z",
  "translation": null
}

Error handling

The product doesn’t exist or you don’t have access to it.Possible causes:
  • Invalid product ID
  • Product belongs to different workspace
  • Product was deleted
Solution: Verify the product ID and ensure it belongs to your workspace.
Missing or invalid API key.Solution: Check your Authorization: Bearer header is set correctly.

Use cases

Product detail page

Display comprehensive product information:
async function loadProductDetails(productId) {
  const response = await fetch(`https://api.voyantcloud.com/v1/products/${productId}`, {
    headers: { Authorization: `Bearer ${process.env.VOYANT_API_KEY}` },
  })

  if (!response.ok) {
    throw new Error("Product not found")
  }

  const product = await response.json()

  return {
    id: product.id,
    title: product.title,
    description: product.description,
    images: product.media?.filter((m) => m.type === "image") || [],
    included: product.inclusions || [],
    excluded: product.exclusions || [],
    highlights: product.highlights || [],
    location: product.location,
    duration: product.duration_days,
  }
}

Generate product schema

Create structured data for SEO:
function generateProductSchema(product) {
  return {
    "@context": "https://schema.org",
    "@type": "Product",
    name: product.title,
    description: product.summary || product.description,
    image: product.media?.[0]?.url,
    offers: {
      "@type": "Offer",
      priceCurrency: product.currency,
      availability: "https://schema.org/InStock",
    },
  }
}