Migration: Search to Events
Migration: Search to Events
Guide for migrating from the legacy GET /api/v4/search endpoint to the new GET /api/v3/events endpoint.
For the full v4 search reference, see Search on the legacy portal.
Endpoint Comparison
What Changed
From a global search to a retailer catalog you can search
The v4 endpoint took a query string and searched across every product. The v3 endpoint returns the events your retailer is set up to sell, scoped to one market, and takes an optional query to narrow that list.
locationId is required and picks the market (e.g. New York, London). Get the IDs from GET /api/v3/locations.
query is optional. It matches against event name, venue, category, cast and search keywords, up to 50 characters. Omit it, or send it blank, to list the whole catalog for the market.
Authentication
The affiliateId header is gone. v3 uses an API key (X-TT-API-Key), and the key itself identifies the retailer — the events you get back are the ones that key can sell. See Getting Started.
Pagination
v3 list endpoints page with limit (default 50, max 1000) and offset. The response carries a pagination block so you know when to stop. See API Conventions.
Terminology
Response Shape
Legacy (v4)
New (v3)
Key differences:
idis an opaque string — pass it toGET /api/v3/events/{eventId}/occurrences, never parse it (see IDs)startDateandendDateare both nullable — an open-ended run returnsnullfor either. Handle both explicitly.- The market is a
locationobject withid,name,country, andslug, not a barevenue.id slugis the event’s URL path segment on the TodayTix website; it can benullfor events without onedisplayNameis the short name to put on a product card;nameis the full title. They are often identical.fromPriceis the lowest regular ticket price on sale across the event’s occurrences, as aMoneyobject in the event’s own currency (see Money). It isnullwhen no regular tickets are on sale — anullsays nothing about why.maxDiscountPercentageis the best discount on sale as a whole number (25means “Save 25%”). It is omitted, notnull, when there is no discount or the event does not present savings as a percentage.orderLimitgives theminandmaxticket quantity a single order may contain. It is set per event, so apply it to the quantity selector for every occurrence.
Migration Checklist
- Swap the
affiliateIdheader for anX-TT-API-Keyheader - Look up the market you sell with
GET /api/v3/locations, then pass it as?locationId= - Keep passing your search term as
query, now alongsidelocationId - Treat
idas an opaque string — store it, don’t parse it - Read
startDate/endDateinstead ofbookingStarts/bookingEnds; both can benull - Render product cards from
displayName,fromPriceandmaxDiscountPercentage, and bound the quantity selector withorderLimit - Page with
limit/offsetuntiloffset >= pagination.total
Next Steps
After listing events, continue with the full Purchase Flow:
- Browse Occurrences —
GET /api/v3/events/{eventId}/occurrences(see Availability → Occurrences) - Browse Inventory —
GET /api/v3/events/{eventId}/occurrences/{occurrenceId}/inventory-items - Create Cart —
POST /api/v3/carts - Checkout —
POST /api/v3/orders