Travixor GlobalDevelopers

Packages sold per day

For some packages you choose how many days the customer needs. The catalogue shows the price of one day, and a quote gives the price of the whole stay.

Spotting them

These packages have sold_per_day: true in the catalogue. Their validity_days is null, max_days is the longest stay you can ask for, and price_per is day, so price_cents is the price of one day.

Quoting a stay

Send days with the quote, a whole number from 1 up to max_days. Then order from that quote as usual.

cURL
# A package sold per day needs days; a fixed package must not have it.
curl https://api.travixorglobal.com/v1/quotes \
  -H "Authorization: Bearer $TRAVIXOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"package_id": "PACKAGE_ID", "quantity": 2, "days": 10}'
TypeScript
const res = await fetch('https://api.travixorglobal.com/v1/quotes', {
  method: 'POST',
  headers: {
    authorization: `Bearer ${process.env.TRAVIXOR_API_KEY}`,
    'content-type': 'application/json',
  },
  // A package sold per day needs days; a fixed package must not have it.
  body: JSON.stringify({ package_id: 'PACKAGE_ID', quantity: 2, days: 10 }),
})
const { quote } = (await res.json()) as { quote: { total_price_cents: number; days: number } }
console.log(`${quote.days} days: ${quote.total_price_cents} cents`)
Python
import os

import requests

res = requests.post(
    "https://api.travixorglobal.com/v1/quotes",
    headers={"Authorization": f"Bearer {os.environ['TRAVIXOR_API_KEY']}"},
    # A package sold per day needs days; a fixed package must not have it.
    json={"package_id": "PACKAGE_ID", "quantity": 2, "days": 10},
    timeout=30,
)
quote = res.json()["quote"]
print(f"{quote['days']} days: {quote['total_price_cents']} cents")
Example answer. The values are made up.
{
  "quote": {
    "id": "5d1c7e92-3b48-4f06-8a2d-c7e1b09f4a63",
    "package_id": "0b7e2a54-6f1c-4d58-9a3e-2c91f0d7b6a4",
    "package_name": "Turkey Unlimited / day",
    "days": 10,
    "quantity": 2,
    "unit_price_cents": 660,
    "total_price_cents": 1320,
    "currency": "USD",
    "created_at": "2026-11-02T09:30:00.000Z",
    "expires_at": "2026-11-02T09:35:00.000Z"
  }
}

The price of a longer stay is not simply the one-day price times the days. Do not work it out yourself: read unit_price_cents and total_price_cents from the quote, and show your customer those.

The rules