Catalogs

Cloudflare Worker providing catalog-related routes

Description:
  • Cloudflare Worker providing catalog-related routes

Source:

Methods

(route) EventDetails()

Description:
  • Route:
    MethodPath
    GET /workers/catalogs/events/:eventId

    Retrieves event details for a specified event.

Source:
Example
// Request event details for event 123456
GET /workers/catalogs/events/123456

(route) NearbyEvents() → {SearchEventsDataFeedResponse}

Description:
  • Route:
    MethodPath
    GET /workers/catalogs/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.
Source:
Example
// Nearest concert or sports events within the next 10 days, filtered by favourite artists
GET /workers/catalogs/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.

Type
SearchEventsDataFeedResponse

(route) SearchInventory(queryParams) → {Object}

Description:
  • Route:
    MethodPath
    GET /workers/catalogs/inventory

    Searches inventory records based on provided criteria. Optionally includes detailed event information for each inventory record.

Source:
Parameters:
Name Type Description
queryParams Object

The search criteria

Properties
Name Type Attributes Default Description
id number <optional>

Filter by numeric ID

inventoryId string <optional>

Filter by inventory ID

userEmail string <optional>

Filter by user email

eventId string <optional>

Filter by event ID

seasonTicketId number <optional>

Filter by season ticket ID

select string | Array.<string> <optional>

Comma-separated fields to include in results Fields are determined dynamically from the InventoryRecord class

required string | Array.<string> <optional>

Comma-separated fields that must not be null Fields are determined dynamically from the InventoryRecord class

orderBy string | Array.<string> <optional>

Field and direction to sort by Format: "field:ASC" or "field:DESC" Sortable fields: "price", "suggested_price"

limit number <optional>
25

Maximum number of records to return

offset number <optional>

Number of records to skip

includeEventDetails boolean <optional>
false

Whether to include event details

Throws:
  • 400 - Invalid query parameters

    Type
    HTTPException
  • 404 - Inventory not found

    Type
    HTTPException
  • 500 - Internal server error

    Type
    HTTPException
Returns:

200 - Search results

Type
Object

(route) UpdateEvent(eventId, requestBody) → {Object|string|Object|Object}

Description:
  • Route:
    MethodPath
    PATCH /workers/catalogs/events/:eventId

    Updates an event catalog entry, including probabilities and event data. If the event has probabilities, they will be enriched with timestamps.

Source:
Parameters:
Name Type Description
eventId string

The unique identifier of the event

requestBody Object

The update payload

Properties
Name Type Attributes Description
event_data Object <optional>

Updated event information

probabilities Object <optional>

Event probability updates

Throws:
  • 401 - Unauthorized

    Type
    HTTPException
  • 404 - Event not found

    Type
    HTTPException
  • 500 - Internal server error

    Type
    HTTPException
Returns:
  • 200 - Success response

    Type
    Object
  • 200.message - Success message

    Type
    string
  • 200.data - Updated event data

    Type
    Object
  • 200.metadata - Metadata including lastUpdated and expiresAt timestamps

    Type
    Object

(route) UpdateInventory(inventoryId, requestBody) → {Object|string|InventoryResponse}

Description:
  • Route:
    MethodPath
    PATCH /workers/catalogs/inventory/:inventoryId

    Updates probability values for a specific inventory record. Automatically enriches probability values with timestamps. Uses JSON patch to merge with existing probability data.

Source:
Parameters:
Name Type Description
inventoryId string

The unique identifier of the inventory record

requestBody Object

The update payload

Properties
Name Type Attributes Description
probabilities Object <optional>

Mapping of probability types to values

Properties
Name Type Attributes Description
value number

Probability value between 0 and 1

model_version string <optional>

Model version that generated the probability

variant 'control' | 'treatment'

A/B test variant

Throws:
  • 401 - Unauthorized

    Type
    HTTPException
  • 404 - Inventory not found

    Type
    HTTPException
  • 500 - Internal server error

    Type
    HTTPException
Returns:
  • 200 - Success response

    Type
    Object
  • 200.message - Success message

    Type
    string
  • 200.data - Updated inventory record

    Type
    InventoryResponse