Migration: Availability to Occurrences
Guide for moving from the Encore API’s GET /api/v4/availability/products/{productId}/... endpoint to GET /api/v3/events/{eventId}/occurrences in the TTG Storefront API v3, the newer API. The two APIs number their versions separately.
For the full v4 inventory reference, see Inventory API on the legacy portal.
Endpoint Comparison
What Changed
Headers
Legacy availability needed no key. v3 needs the three headers in Authentication & Headers on every call.
Pagination
The response is a page, not the whole list: { data, filters, pagination }. See Pagination.
Terminology
Quantity and Date Range Are Now Optional Query Parameters
In v4, quantity, from, and to were required path segments. In v3, they are optional query parameters:
Two more optional parameters have no v4 equivalent: currency prices the dates in another currency (see Currency), and voucherCode shows the dates a presale or access code unlocks (see Vouchers).
All parameters can be combined freely or omitted entirely:
Money Format
Both use minor units. Legacy sent the price and its currency as two fields; v3 puts them in one object.
Legacy (v4):
New (v3):
All money in v3 uses this shape, in minor units (cents for USD, pence for GBP). Get the scale from the currency code. See Money Format.
Availability Status
Each occurrence also carries availabilityLevel, as legacy did: LOW (tickets are running out), SOLD_OUT, or null (no signal — display the occurrence normally). New values may be added over time; treat any unrecognized value as no signal.
Discount Information
Legacy only flagged a discount, with discount and offer set to true or false. v3 says how big it is:
maxDiscountPercentage— Best available % discount (e.g.,29= “Up to 29% off”)maxDiscountAmount— Best available amount discount (e.g.,{ amount: 5000, currency: "USD" }= “Save up to $50”)
These fields are optional — omitted when no discount exists. maxDiscountPercentage is also omitted on events that don’t show savings as a percentage.
Response Shape
Legacy (v4)
New (v3)
Key differences:
- The list sits in
data, notresponse, and comes one page at a time - Each occurrence has an
idyou’ll need for subsequent calls (inventory, cart) - Each occurrence names its
venue startsAtreplacesdatetimeendsAtis nullable (some events have no fixed end time)- A date with nothing on sale comes back with
fromPrice: nullinstead of being left out availabilityLevelsays why nothing is buyable (SOLD_OUT) or that stock is running out (LOW)orderLimitgives theminandmaxticket quantity one order may contain. It is the event’s order limit, repeated on each occurrence so you can bound the quantity selector without loading the event
Migration Checklist
- Send
X-TT-API-Key,X-TT-RetailerandX-TT-Platformon every call - Replace
productIdwitheventId. Most are the same number; for some older products ask your TTG contact for the v3 id - Update the endpoint URL from v4 path to
GET /api/v3/events/{eventId}/occurrences - Move
quantityfrom URL path to?quantity=query parameter (now optional) - Move the date range from the URL path to
?startDate=and?endDate=(now optional), and changeYYYYMMDDtoYYYY-MM-DD - Read the price from
fromPrice.amountandfromPrice.currencyinstead ofminPriceandcurrency - Store the occurrence
id— you need it for inventory browsing and cart creation - Decide how to present unavailable occurrences — any date with nothing to buy comes back with
availabilityLevel: "SOLD_OUT"andfromPrice: null, unless the event or your retailer leaves such dates out (see Browse Occurrences). To match the legacy behavior (which excluded every date with nothing to buy), filter out occurrences wherefromPriceis null - Page with
limit/offsetuntiloffset >= pagination.total - Optionally display discount badges using
maxDiscountPercentageormaxDiscountAmount
Next Steps
After migrating the browse step, continue with the full Purchase Flow:
- Browse Inventory —
GET /api/v3/events/{eventId}/occurrences/{occurrenceId}/inventory-items - Create Cart —
POST /api/v3/carts - Checkout —
POST /api/v3/orders