Table of Contents

Working with inventory

The V2 API has two ways to get product and price data. Use each for its own job.

Read-only inventory Live search
Endpoints GET /voyages, GET /packages, GET /promotions, GET /flightInclusiveOptions, /refdata/* POST /search/voyages, POST /search/packages
Data The full catalogue with prices and availability, refreshed twice a day Current prices and availability for one search
Use it for Building your own catalogue: listing, searching, filtering and showing products and prices The step just before booking, see Booking flow

Download the read-only inventory into your own system and serve browsing and search from that copy. Do not call the inventory endpoints or live search every time a customer browses.

Call live search when a customer is about to book. You need it to:

  • confirm current availability and price, because inventory can be up to half a day old;
  • price cabin mixes the inventory does not cover. Inventory rates are for one or two adults in a cabin; children, third and fourth guests, and vehicles need a search;
  • apply a promotion code;
  • start the session that the rest of the booking flow needs.

When to sync

Inventory is refreshed twice a day. Refreshes currently start at 04:00 and 16:00 UTC and take up to about 30 minutes. Sync once after each refresh, for example at 05:00 and 17:00 UTC. Polling more often does not give fresher data.

How to sync

  1. Get a bearer token and reuse it for the whole sync. See Bearer token caching.
  2. For each market and currency you sell (see Market Currency Profiles), page through /voyages and /packages with those filters:
    • start with skip=0;
    • add the number of returned items to skip and request the next page;
    • stop when skip reaches total.
  3. Page through /promotions and /flightInclusiveOptions in the same way if you use them, and fetch the reference data (/refdata/ports, /refdata/ships, /refdata/cabin-grades, /refdata/meal-plans).
  4. Replace your stored copy for that market and currency with the result. Key your own records on stable identifiers, such as packageCode, not on id.
curl --location '{:apiBase}/voyages?user_key=abcd&market=US&currency=USD&skip=0&limit=10' \
  --header 'Authorization: Bearer YOUR_BEARER_TOKEN'

Page size

Inventory entries are large, because each voyage and package carries every departure with prices per cabin grade. A single voyage is typically around 0.5 MB of JSON, and a package around 0.2 MB.

We recommend limit=10 for /voyages and limit=25 for /packages. That keeps each response to a few megabytes, and a full sync of one market and currency takes only a handful of requests. Very small pages, such as limit=1, multiply the number of requests without making the sync any more reliable.

A full sync stays well inside the rate limit. If you do receive a 429, wait for the time given in Retry-After and continue from the same skip.