Skip to content

Clashfinder JSON API Contract

Objective

Define the TypeScript interfaces and adapter structures to parse the Clashfinder JSON payload and map it to the Event Route Optimiser (ERO) storage models.

1. Clashfinder JSON Payloads

Festival/Event Info

  • event: name of the festival (string).
  • url: original Clashfinder URL (string).

Day Model

  • id: identifier of the day (e.g. 'fri').
  • date: standard ISO date string ('YYYY-MM-DD').

Stage Model

  • id: identifier of the stage (string).
  • name: full display name of the stage (string).

Act Model

  • name: name of the performing act/band (string).
  • stage: stage ID matching stage model (string).
  • day: day ID matching day model (string).
  • start: start time string ('HH:MM').
  • end: end time string ('HH:MM').

2. ERO Target Schemas

  • Festival: { id: string, name: string, url: string, created_at: number }
  • Stage: { id: string, festival_id: string, name: string }
  • Band: { id: string, stage_id: string, name: string, start_time: number, end_time: number }

3. Adapter Implementation Requirements

  • Parse time strings ('HH:MM') on a specific date ('YYYY-MM-DD') and convert them into Unix epoch timestamps (milliseconds) for start_time and end_time.
  • Generate unique UUIDs/GUIDs for entity keys if not present.