Cloudflare Worker providing datafeed-related routes
- Description:
Cloudflare Worker providing datafeed-related routes
- Source:
Methods
(route) AutoTrackEvents() → {Object}
- Description:
Route:
Method Path GET /workers/datafeeds/events/track/auto Retrieves a curated set of upcoming events—optimised for Iterable's automated event-tracking campaigns—based on the caller's location and interests.
Internally the handler pulls a pre-hydrated "nearby events" payload from the Cloudflare KV store, applies TickPick's business-rules (favourites, date windows, weekend logic, tag scoring, etc.) via
DataFeedService, and returns a normalised structure that Iterable can ingest directly.Query Parameters:
Name Type Attributes Default Description lat number Geographic latitude used to resolve the user’s DMA. long number Geographic longitude used to resolve the user’s DMA. parentCategory string Top-level event category, accepted values: `"concert"` or `"sports"`. minDaysUntilEvent number optional 1 Lower-bound (inclusive) on the event date, expressed as days from “today”. maxDaysUntilEvent number optional Upper-bound (inclusive) on the event date, expressed as days from “today”. filterTbdEvents boolean optional false When `true`, excludes events whose names contain a “TBD” placeholder. favoritePerformers string optional Pipe-delimited list of performer names used to flag favorite events. maxEvents number optional 1 Maximum number of events to return after all ranking and filtering.
- Source:
Returns:
JSON payload shaped as
{ autoTrackedEvents: [{ event: TrackedEvent }, …] },
where each TrackedEvent matches Iterable’s required schema.
- Type
- Object
(route) EventSummary()
- Description:
Route:
Method Path GET /workers/datafeeds/events/:eventId/summary Retrieves event summary (stats) data for a specified event. Also includes event data from the event catalog.
- Source:
Example
// Request event summary data for event 123456
GET /workers/datafeeds/events/123456/summary
(route) GetBrokerData()
- Description:
Route:
Method Path GET /workers/datafeeds/brokers/:email Retrieves broker data from the broker CSV file for a specified email address. Returns the total tickets and total broker payout for the matching broker.
- Source:
Example
// Request broker data for a specific email
GET /workers/datafeeds/brokers/orders@714tickets.com?template=super_bowl_metrics
(route) NearbyEvents() → {SearchEventsDataFeedResponse}
- Description:
Route:
Method Path GET /workers/datafeeds/events/nearby Returns a filtered list of events occurring near a user-supplied location.
Query Parameters:
Name Type Attributes Default Description lat number Geographic latitude. long number Geographic longitude. favoritePerformers string optional Pipe-delimited list of performer names. Used to flag or prune events by artist affinity. maxDaysUntilEvent number optional Upper-bound (inclusive) on event dates—expressed in days from "today". maxFavoriteEvents number optional Caps the number of `is_favorited === true` events returned. trackedEvents string optional Pipe-delimited list of event IDs to exclude (already tracked by the user). minEvents number optional 5 Minimum number of events required for a successful payload. Fewer than this triggers a **400**. maxEvents number optional Hard cap on total events after all processing. eventTags string optional Pipe-delimited list of event-tag types (e.g. `"HotEvent|FeaturedEvent"`). uniquePerformerEvents boolean optional false When `true`, ensures each main performer appears only once. filterTbdEvents boolean optional false When `true`, removes events whose names contain a "TBD" placeholder. startDate string optional Start date in YYYY-MM-dd format to filter events.
- Source:
Example
// Nearest concert or sports events within the next 10 days, filtered by favourite artists
GET /workers/datafeeds/events/nearby?lat=40.7128&long=-74.0060&maxDaysUntilEvent=10&favoritePerformers=Artist1|Artist2
Returns:
JSON payload identical to the
TickPick /events/nearby/datafeed response schema but post-filtered.
(route) RelatedPerformers()
- Description:
Route:
Method Path GET /workers/datafeeds/performers/:performerId/related Retrieves related performers for a specified performer.
- Source:
Example
// Request related performers for performer 123456
GET /workers/datafeeds/performers/123456/related
(route) SearchEvents()
- Description:
Route:
Method Path GET /workers/datafeeds/events A wrapper of TickPick's /events/datafeed API endpoint that applies various filters to tailor the results for Iterable campaigns.
Query Parameters:
Name Type Attributes Default Description favoritePerformers string optional A pipe-delimited list of favorite performer names to filter events by. maxDaysUntilEvent number optional When provided, filters events to include only those occurring within the maximum number of days from today. maxFavoriteEvents number optional When provided, limits the number of events marked as "is_favorited" to the specified maximum. trackedEvents string optional A pipe-delimited list of tracked event IDs to filter events by. minEvents number optional 5 Specifies the minimum number of events required in the response. Defaults to 5 events. A 400 error is returned if the minimum is not met. maxEvents number optional Specifies the maximum number of events to return in the response. eventTags string optional A pipe-delimited list of event tags to filter events with. (e.g., "HotEvent|FeaturedEvent") uniquePerformerEvents boolean optional false When set to true, ensures that each event in the response has a unique main performer, filtering out duplicates. filterTbdEvents boolean optional false When set to true, excludes events that are TBD.
- Source:
Example
// Request events with a minimum of 5 events, filtered by favorite performers and tracked events
GET /workers/datafeeds/events?minEvents=5&favoritePerformers=Artist1|Artist2&uniquePerformerEvents=true
(route) SearchMajorLeagueEvents()
- Description:
Route:
Method Path GET /workers/datafeeds/events/leagues A wrapper of TickPick's /events/datafeed API endpoint. Retrieves league-specific event data from a specified set of leagues.
Given a favoriteTeam or favoritePerformers query param, filters events to include only those that match the provided favorite team or performers.
Query Parameters:
Name Type Attributes Default Description league string A professional sports league (NBA, MLB, NFL, NHL, MLS, NCAA). favoriteTeam string A performerId to filter events by. Required if favoritePerformers is not provided. favoritePerformers string Pipe-delimited list of performer names to filter events by. Required if favoriteTeam is not provided. eventTags string optional A pipe-delimited list of event tags to filter events with. (e.g., "HotEvent|FeaturedEvent") maxEvents number optional 10 The maximum number of events to return in the response. maxDaysUntilEvent number optional 365 The maximum number of days from today to an event date to filter events by. homeStandings boolean optional false Set to true when requesting MLB events to filter out non-home stand events.
- Source:
Example
// Request league events for the NBA, filter by a user's favorite team and limit to 5 events
GET /workers/datafeeds/events/leagues?league=NBA&favoriteTeam=Lakers&maxEvents=5