{
    "openapi": "3.1.2",
    "info": {
        "title": "Stagewerk API",
        "version": "1.0.0",
        "description": "The Stagewerk API gives an organiser's own systems read access to the data on its public event pages: events, classes, the entry list, the itinerary, bulletins and published results. It is read-only. Everything is JSON over HTTPS under `\/api\/v1`.\n\nThe examples use two shell variables. `STAGEWERK_URL` is the address of the Stagewerk site you sign in to, for example `https:\/\/your-stagewerk-host`, and `STAGEWERK_KEY` is your API key.\n\n## Get an API key\n\nKeys belong to an organiser, not to a person. The organiser's owner opens **API keys** in the console (`\/t\/{organiser}\/api-keys`), gives the key a name that says what uses it, and creates it. The key is shown once, in a box at the top of the page. Copy it into your secret store straight away: Stagewerk keeps only a hash and cannot show it again. Create one key per integration so you can revoke one without touching the others. The page lists each key with the time it was last used, and **Revoke** stops a key working immediately.\n\nA key can read that organiser's data and nothing else. It cannot read another organiser, and it cannot change anything.\n\n## Authenticate\n\nSend the key as a bearer token on every request.\n\n```sh\ncurl -H \"Authorization: Bearer $STAGEWERK_KEY\" -H \"Accept: application\/json\" \"$STAGEWERK_URL\/api\/v1\/events\"\n```\n\nA missing, wrong or revoked key gets `401`. Always send `Accept: application\/json`.\n\n## Pagination\n\nList endpoints that can grow (events, entries, bulletins) use cursor pagination. A response looks like this:\n\n```json\n{\n    \"data\": [ ... ],\n    \"links\": { \"first\": null, \"last\": null, \"prev\": null, \"next\": \"https:\/\/...\/api\/v1\/events?cursor=eyJ...\" },\n    \"meta\": { \"path\": \"https:\/\/...\/api\/v1\/events\", \"per_page\": 50, \"next_cursor\": \"eyJ...\", \"prev_cursor\": null }\n}\n```\n\nAsk for a page size with `limit` (1 to 100, default 50). To get the next page, request `links.next`, or repeat the request with `cursor` set to `meta.next_cursor`. When `meta.next_cursor` is `null` you have everything. Treat cursors as opaque strings. Lists that are always short (classes, itinerary) are returned whole.\n\n## Sparse fields\n\nAdd `fields` with a comma-separated list of keys to receive only those keys in each object, for example `fields=competition_number,driver_name`. An unknown key returns `422` and the message lists the keys that exist. The keys of every object are listed in the reference below.\n\n## Rate limits\n\nEach key may make 120 requests a minute. Every response carries `X-RateLimit-Limit` and `X-RateLimit-Remaining`. Over the limit you get `429` with a `Retry-After` header holding the seconds to wait. Back off for that long, then continue.\n\n## Errors\n\nErrors are JSON with a `message`. Validation errors (`422`) also have an `errors` object keyed by parameter.\n\n| Status | Meaning                                                                          |\n| ------ | -------------------------------------------------------------------------------- |\n| 401    | The key is missing, wrong or revoked.                                            |\n| 403    | The key may not read.                                                            |\n| 404    | No such event, or it is not public, or nothing is published yet (results).       |\n| 422    | A query parameter is invalid, for example an unknown field or a limit above 100. |\n| 429    | Rate limit reached. Wait `Retry-After` seconds.                                  |\n\n## Worked example: an entry list\n\nThis builds an entry-list page for one event: find the event, read its classes, then read every entry.\n\n1. List the organiser's events and pick one by its `slug`.\n\n    ```sh\n    curl -s -H \"Authorization: Bearer $STAGEWERK_KEY\" -H \"Accept: application\/json\" \\\n      \"$STAGEWERK_URL\/api\/v1\/events?fields=name,slug,starts_on,status\"\n    ```\n\n    ```json\n    { \"data\": [ { \"name\": \"Club Rallysprint\", \"slug\": \"club-rallysprint\", \"starts_on\": \"2027-03-14\", \"status\": \"entries_open\" } ], \"links\": { ... }, \"meta\": { ... } }\n    ```\n\n2. Read the classes, to show group headings (`code` and `name` match `class_code` and `class_name` on each entry).\n\n    ```sh\n    curl -s -H \"Authorization: Bearer $STAGEWERK_KEY\" -H \"Accept: application\/json\" \\\n      \"$STAGEWERK_URL\/api\/v1\/events\/club-rallysprint\/classes?fields=code,name,sort_order\"\n    ```\n\n3. Read the entry list, 100 at a time.\n\n    ```sh\n    curl -s -H \"Authorization: Bearer $STAGEWERK_KEY\" -H \"Accept: application\/json\" \\\n      \"$STAGEWERK_URL\/api\/v1\/events\/club-rallysprint\/entries?limit=100&fields=competition_number,class_name,driver_name,co_driver_name,vehicle_description\"\n    ```\n\n    ```json\n    {\n        \"data\": [\n            {\n                \"competition_number\": 7,\n                \"class_name\": \"Club Sprint\",\n                \"driver_name\": \"A. Driver\",\n                \"co_driver_name\": null,\n                \"vehicle_description\": \"2004 Subaru Impreza\"\n            }\n        ],\n        \"links\": {\n            \"first\": null,\n            \"last\": null,\n            \"prev\": null,\n            \"next\": \"https:\/\/...\/entries?limit=100&cursor=eyJ...\"\n        },\n        \"meta\": {\n            \"path\": \"https:\/\/...\/entries\",\n            \"per_page\": 100,\n            \"next_cursor\": \"eyJ...\",\n            \"prev_cursor\": null\n        }\n    }\n    ```\n\n4. While `meta.next_cursor` is not `null`, request the same URL with `&cursor=<next_cursor>` and append `data`.\n\nThe entry list holds the entries that have a place in the event. It shows names, class, vehicle and state. It never includes email addresses, phone numbers, licence numbers or dates of birth.\n\n## TypeScript types\n\n`resources\/js\/api\/v1.d.ts` in the Stagewerk repository holds TypeScript types generated from the OpenAPI document. Generate your own from `\/developers\/openapi.json` with `npx openapi-typescript`.\n\n## Reference\n\nThe sections below are generated from the same OpenAPI 3.1 document you can download at `\/developers\/openapi.json`.\n"
    },
    "servers": [
        {
            "url": "\/api\/v1"
        }
    ],
    "security": [
        {
            "http": []
        }
    ],
    "paths": {
        "\/events\/{event}\/bulletins": {
            "get": {
                "operationId": "v1.events.bulletins.index",
                "description": "Published bulletins the organiser made public, in number order.",
                "summary": "List the bulletins of an event",
                "tags": [
                    "Bulletin"
                ],
                "parameters": [
                    {
                        "name": "event",
                        "in": "path",
                        "required": true,
                        "description": "The event slug",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Rows per page, 1 to 100. Default 50.",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "description": "The `next_cursor` of the previous page. Opaque; do not build one.",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ]
                        }
                    },
                    {
                        "name": "fields",
                        "in": "query",
                        "description": "Comma-separated keys to keep in each returned object, for example `fields=name,slug`.",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 500
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `PublicBulletinResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/PublicBulletinResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "next_cursor": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "The \"cursor\" that points to the next set of items."
                                                },
                                                "prev_cursor": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "The \"cursor\" that points to the previous set of items."
                                                }
                                            },
                                            "required": [
                                                "path",
                                                "per_page",
                                                "next_cursor",
                                                "prev_cursor"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/events\/{event}\/entries": {
            "get": {
                "operationId": "v1.events.entries.index",
                "description": "The entries that hold a place in the event, in the order they were created (by `id`); sort by `competition_number` on your side, since not every entry has a number yet.\nNames, team, class, vehicle and state only: no contact details, licence numbers or dates of birth.\nCompetitors who asked not to be named on public entry lists are left out (a driver loses the whole entry, a co-driver only their name).\nOnly served once the organiser has published the entry list; until then the response is 404, as on the public Entries tab.",
                "summary": "List the entry list of an event",
                "tags": [
                    "Entry"
                ],
                "parameters": [
                    {
                        "name": "event",
                        "in": "path",
                        "required": true,
                        "description": "The event slug",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Rows per page, 1 to 100. Default 50.",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "description": "The `next_cursor` of the previous page. Opaque; do not build one.",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ]
                        }
                    },
                    {
                        "name": "fields",
                        "in": "query",
                        "description": "Comma-separated keys to keep in each returned object, for example `fields=name,slug`.",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 500
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `PublicEntryResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/PublicEntryResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "next_cursor": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "The \"cursor\" that points to the next set of items."
                                                },
                                                "prev_cursor": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "The \"cursor\" that points to the previous set of items."
                                                }
                                            },
                                            "required": [
                                                "path",
                                                "per_page",
                                                "next_cursor",
                                                "prev_cursor"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/events": {
            "get": {
                "operationId": "v1.events.index",
                "description": "The events of the organiser that owns the key which are visible on its public site, oldest start first.",
                "summary": "List events",
                "tags": [
                    "Event"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Rows per page, 1 to 100. Default 50.",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "description": "The `next_cursor` of the previous page. Opaque; do not build one.",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ]
                        }
                    },
                    {
                        "name": "fields",
                        "in": "query",
                        "description": "Comma-separated keys to keep in each returned object, for example `fields=name,slug`.",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 500
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `PublicEventResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/PublicEventResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "next_cursor": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "The \"cursor\" that points to the next set of items."
                                                },
                                                "prev_cursor": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "The \"cursor\" that points to the previous set of items."
                                                }
                                            },
                                            "required": [
                                                "path",
                                                "per_page",
                                                "next_cursor",
                                                "prev_cursor"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/events\/{event}": {
            "get": {
                "operationId": "v1.events.show",
                "summary": "Get an event",
                "tags": [
                    "Event"
                ],
                "parameters": [
                    {
                        "name": "event",
                        "in": "path",
                        "required": true,
                        "description": "The event slug",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Rows per page, 1 to 100. Default 50.",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "description": "The `next_cursor` of the previous page. Opaque; do not build one.",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ]
                        }
                    },
                    {
                        "name": "fields",
                        "in": "query",
                        "description": "Comma-separated keys to keep in each returned object, for example `fields=name,slug`.",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 500
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`PublicEventResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#\/components\/schemas\/PublicEventResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "contacts",
                                                        "distances"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/events\/{event}\/classes": {
            "get": {
                "operationId": "v1.events.classes.index",
                "description": "Every class of the event in the organiser's order. Not paginated: an event has a handful of classes.",
                "summary": "List the classes of an event",
                "tags": [
                    "EventClass"
                ],
                "parameters": [
                    {
                        "name": "event",
                        "in": "path",
                        "required": true,
                        "description": "The event slug",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Rows per page, 1 to 100. Default 50.",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "description": "The `next_cursor` of the previous page. Opaque; do not build one.",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ]
                        }
                    },
                    {
                        "name": "fields",
                        "in": "query",
                        "description": "Comma-separated keys to keep in each returned object, for example `fields=name,slug`.",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 500
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Array of `EventClassResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/EventClassResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/events\/{event}\/itinerary": {
            "get": {
                "operationId": "v1.events.itinerary.index",
                "description": "Stages, liaisons and service points in running order, with the computed time the first car is due at each.\nNot paginated. The totals are in `meta.totals`, in metres.",
                "summary": "List the itinerary of an event",
                "tags": [
                    "Itinerary"
                ],
                "parameters": [
                    {
                        "name": "event",
                        "in": "path",
                        "required": true,
                        "description": "The event slug",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Rows per page, 1 to 100. Default 50.",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "description": "The `next_cursor` of the previous page. Opaque; do not build one.",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ]
                        }
                    },
                    {
                        "name": "fields",
                        "in": "query",
                        "description": "Comma-separated keys to keep in each returned object, for example `fields=name,slug`.",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 500
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Array of `ItineraryItemResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/ItineraryItemResource"
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "totals": {
                                                    "type": "object",
                                                    "properties": {
                                                        "competitive_m": {
                                                            "type": "integer"
                                                        },
                                                        "liaison_m": {
                                                            "type": "integer"
                                                        },
                                                        "total_m": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "competitive_m",
                                                        "liaison_m",
                                                        "total_m"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "totals"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/events\/{event}\/results": {
            "get": {
                "operationId": "v1.events.results",
                "description": "The latest published classification of the event, or the one in `version` (a version number from the\n`versions` list). Only what the organiser has published; unpublished figures are never served. 404 until\nsomething is published.",
                "summary": "Get published classifications",
                "tags": [
                    "Results"
                ],
                "parameters": [
                    {
                        "name": "event",
                        "in": "path",
                        "required": true,
                        "description": "The event slug",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "version",
                        "in": "query",
                        "description": "Classification version number. Default: the latest published version.",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "event": {
                                                    "type": "object",
                                                    "properties": {
                                                        "name": {
                                                            "type": "string"
                                                        },
                                                        "slug": {
                                                            "type": "string"
                                                        },
                                                        "url": {
                                                            "type": "string"
                                                        },
                                                        "results_url": {
                                                            "type": "string"
                                                        },
                                                        "timezone": {
                                                            "type": "string"
                                                        },
                                                        "venue_name": {
                                                            "type": "string"
                                                        },
                                                        "dates_display": {
                                                            "type": "string"
                                                        },
                                                        "status_label": {
                                                            "type": "string"
                                                        },
                                                        "organiser": {
                                                            "type": "object",
                                                            "properties": {
                                                                "name": {
                                                                    "type": "string"
                                                                },
                                                                "slug": {
                                                                    "type": "string"
                                                                }
                                                            },
                                                            "required": [
                                                                "name",
                                                                "slug"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "name",
                                                        "slug",
                                                        "url",
                                                        "results_url",
                                                        "timezone",
                                                        "venue_name",
                                                        "dates_display",
                                                        "status_label",
                                                        "organiser"
                                                    ]
                                                },
                                                "version": {
                                                    "type": "object",
                                                    "properties": {
                                                        "number": {
                                                            "type": "integer"
                                                        },
                                                        "kind": {
                                                            "type": "string",
                                                            "enum": [
                                                                "provisional",
                                                                "final"
                                                            ]
                                                        },
                                                        "kind_label": {
                                                            "type": "string"
                                                        },
                                                        "label": {
                                                            "type": "string"
                                                        },
                                                        "method_label": {
                                                            "type": "string",
                                                            "enum": [
                                                                "Sum of stages",
                                                                "Best run"
                                                            ]
                                                        },
                                                        "published_display": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "signed_off_display": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "protest": {
                                                            "anyOf": [
                                                                {
                                                                    "type": "object",
                                                                    "properties": {
                                                                        "state": {
                                                                            "type": "string",
                                                                            "const": "superseded"
                                                                        },
                                                                        "summary": {
                                                                            "type": "string"
                                                                        }
                                                                    },
                                                                    "required": [
                                                                        "state",
                                                                        "summary"
                                                                    ]
                                                                },
                                                                {
                                                                    "type": "object",
                                                                    "properties": {
                                                                        "state": {
                                                                            "type": "string",
                                                                            "const": "open"
                                                                        },
                                                                        "summary": {
                                                                            "type": "string"
                                                                        }
                                                                    },
                                                                    "required": [
                                                                        "state",
                                                                        "summary"
                                                                    ]
                                                                },
                                                                {
                                                                    "type": "object",
                                                                    "properties": {
                                                                        "state": {
                                                                            "type": "string",
                                                                            "const": "closed"
                                                                        },
                                                                        "summary": {
                                                                            "type": "string"
                                                                        }
                                                                    },
                                                                    "required": [
                                                                        "state",
                                                                        "summary"
                                                                    ]
                                                                },
                                                                {
                                                                    "type": "null"
                                                                }
                                                            ]
                                                        },
                                                        "superseded_by": {
                                                            "type": [
                                                                "object",
                                                                "null"
                                                            ],
                                                            "properties": {
                                                                "number": {
                                                                    "type": "string"
                                                                },
                                                                "label": {
                                                                    "type": "string"
                                                                }
                                                            },
                                                            "required": [
                                                                "number",
                                                                "label"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "number",
                                                        "kind",
                                                        "kind_label",
                                                        "label",
                                                        "method_label",
                                                        "published_display",
                                                        "signed_off_display",
                                                        "protest",
                                                        "superseded_by"
                                                    ]
                                                },
                                                "is_latest": {
                                                    "type": "boolean"
                                                },
                                                "scopes": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "stages": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "array",
                                                        "items": {}
                                                    }
                                                },
                                                "show_runs": {
                                                    "type": "boolean"
                                                },
                                                "versions": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "number": {
                                                                "type": "integer"
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "kind": {
                                                                "type": "string",
                                                                "enum": [
                                                                    "provisional",
                                                                    "final"
                                                                ]
                                                            },
                                                            "published_display": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "is_current": {
                                                                "type": "boolean"
                                                            },
                                                            "is_latest": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "number",
                                                            "label",
                                                            "kind",
                                                            "published_display",
                                                            "is_current",
                                                            "is_latest"
                                                        ]
                                                    }
                                                },
                                                "live": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "interval_seconds": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "interval_seconds"
                                                    ]
                                                },
                                                "standings": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "url": {
                                                            "type": "string"
                                                        },
                                                        "label": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "url",
                                                        "label"
                                                    ]
                                                },
                                                "updated_display": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "event",
                                                "version",
                                                "is_latest",
                                                "scopes",
                                                "stages",
                                                "show_runs",
                                                "versions",
                                                "live",
                                                "standings",
                                                "updated_display"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/events\/{event}\/stage-times\/{itineraryItem}": {
            "get": {
                "operationId": "v1.events.stage-times",
                "description": "One stage of the itinerary (use the `id` from the itinerary list), in order of time. Which times are shown,\npublished or live, follows the event's stage-times setting; 404 when the event shows none.",
                "summary": "Get the times of one stage",
                "tags": [
                    "Results"
                ],
                "parameters": [
                    {
                        "name": "event",
                        "in": "path",
                        "required": true,
                        "description": "The event slug",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "itineraryItem",
                        "in": "path",
                        "required": true,
                        "description": "The itinerary item ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "version",
                        "in": "query",
                        "description": "Classification version number. Default: the latest published version.",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "event": {
                                                    "type": "object",
                                                    "properties": {
                                                        "name": {
                                                            "type": "string"
                                                        },
                                                        "slug": {
                                                            "type": "string"
                                                        },
                                                        "url": {
                                                            "type": "string"
                                                        },
                                                        "results_url": {
                                                            "type": "string"
                                                        },
                                                        "timezone": {
                                                            "type": "string"
                                                        },
                                                        "venue_name": {
                                                            "type": "string"
                                                        },
                                                        "dates_display": {
                                                            "type": "string"
                                                        },
                                                        "status_label": {
                                                            "type": "string"
                                                        },
                                                        "organiser": {
                                                            "type": "object",
                                                            "properties": {
                                                                "name": {
                                                                    "type": "string"
                                                                },
                                                                "slug": {
                                                                    "type": "string"
                                                                }
                                                            },
                                                            "required": [
                                                                "name",
                                                                "slug"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "name",
                                                        "slug",
                                                        "url",
                                                        "results_url",
                                                        "timezone",
                                                        "venue_name",
                                                        "dates_display",
                                                        "status_label",
                                                        "organiser"
                                                    ]
                                                },
                                                "stage": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "rows": {
                                                    "type": "array",
                                                    "description": "Links to public profiles are added here, after the cached rows, so a switched-off profile loses its link at once.",
                                                    "items": {}
                                                },
                                                "previous": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "id": {},
                                                        "code": {},
                                                        "name": {}
                                                    },
                                                    "required": [
                                                        "id",
                                                        "code",
                                                        "name"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "id": {},
                                                        "code": {},
                                                        "name": {}
                                                    },
                                                    "required": [
                                                        "id",
                                                        "code",
                                                        "name"
                                                    ]
                                                },
                                                "stages": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "source": {
                                                    "type": "object",
                                                    "properties": {
                                                        "mode": {
                                                            "type": "string",
                                                            "const": "published"
                                                        },
                                                        "label": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "mode",
                                                        "label"
                                                    ]
                                                },
                                                "has_results": {
                                                    "type": "boolean"
                                                },
                                                "live": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "interval_seconds": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "interval_seconds"
                                                    ]
                                                },
                                                "updated_display": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "event",
                                                "stage",
                                                "rows",
                                                "previous",
                                                "next",
                                                "stages",
                                                "source",
                                                "has_results",
                                                "live",
                                                "updated_display"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "http": {
                "type": "http",
                "scheme": "bearer"
            }
        },
        "schemas": {
            "Drivetrain": {
                "type": "string",
                "enum": [
                    "two_wd",
                    "four_wd",
                    "any"
                ],
                "title": "Drivetrain"
            },
            "EventClassResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "event_id": {
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    },
                    "code": {
                        "type": "string"
                    },
                    "category": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "sort_order": {
                        "type": "integer"
                    },
                    "cap": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "drivetrain": {
                        "$ref": "#\/components\/schemas\/Drivetrain"
                    },
                    "min_capacity_cc": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "max_capacity_cc": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "forced_induction": {
                        "$ref": "#\/components\/schemas\/ForcedInduction"
                    },
                    "min_year": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "max_year": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "tyre_rule": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "event_id",
                    "name",
                    "code",
                    "category",
                    "sort_order",
                    "cap",
                    "drivetrain",
                    "min_capacity_cc",
                    "max_capacity_cc",
                    "forced_induction",
                    "min_year",
                    "max_year",
                    "tyre_rule"
                ],
                "title": "EventClassResource"
            },
            "ForcedInduction": {
                "type": "string",
                "enum": [
                    "allowed",
                    "not_allowed",
                    "required"
                ],
                "title": "ForcedInduction"
            },
            "ItineraryItemResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "event_id": {
                        "type": "integer"
                    },
                    "position": {
                        "type": "integer"
                    },
                    "kind": {
                        "$ref": "#\/components\/schemas\/ItineraryKind"
                    },
                    "code": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "heat": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "leg": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "scored": {
                        "type": "boolean"
                    },
                    "distance_m": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "distance_label": {
                        "type": "string"
                    },
                    "target_seconds": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "target_label": {
                        "type": "string"
                    },
                    "fixed_first_car_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "fixed_first_car_local": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "notes": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "first_car_due": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "first_car_label": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "event_id",
                    "position",
                    "kind",
                    "code",
                    "name",
                    "heat",
                    "leg",
                    "scored",
                    "distance_m",
                    "distance_label",
                    "target_seconds",
                    "target_label",
                    "fixed_first_car_at",
                    "fixed_first_car_local",
                    "notes",
                    "first_car_due",
                    "first_car_label"
                ],
                "title": "ItineraryItemResource"
            },
            "ItineraryKind": {
                "type": "string",
                "description": "What a row of the itinerary is. Only stages count as competitive distance.\n",
                "enum": [
                    "stage",
                    "time_control",
                    "service",
                    "regroup",
                    "liaison"
                ],
                "title": "ItineraryKind"
            },
            "PublicBulletinResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "number": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "title": {
                        "type": "string"
                    },
                    "body": {
                        "type": "string"
                    },
                    "published_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "published_display": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "replaces_number": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Only the number: the replaced bulletin may not have been addressed to this reader."
                    },
                    "event": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "name": {
                                "type": "string"
                            },
                            "slug": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "name",
                            "slug"
                        ]
                    },
                    "organiser": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "name": {
                                "type": "string"
                            },
                            "slug": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "name",
                            "slug"
                        ]
                    }
                },
                "required": [
                    "id",
                    "number",
                    "title",
                    "body",
                    "published_at",
                    "published_display",
                    "replaces_number",
                    "event",
                    "organiser"
                ],
                "title": "PublicBulletinResource"
            },
            "PublicEntryResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "competition_number": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "class_code": {
                        "type": "string"
                    },
                    "class_name": {
                        "type": "string"
                    },
                    "driver_name": {
                        "type": "string"
                    },
                    "co_driver_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Null when the co-driver asked not to be named on public entry lists (see ListApiEntries, which reads that)."
                    },
                    "entrant_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The team or company the entry is made under. Needs `entrant` loaded."
                    },
                    "vehicle_description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "state": {
                        "type": "string",
                        "enum": [
                            "draft",
                            "submitted",
                            "pending_documents",
                            "pending_payment",
                            "accepted",
                            "waitlisted",
                            "withdrawn",
                            "refunded",
                            "rejected",
                            "started",
                            "finished",
                            "dnf",
                            "dsq"
                        ]
                    },
                    "state_label": {
                        "type": "string"
                    },
                    "photo_url": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The car's main photo (a thumbnail), only when its owner has chosen to show it publicly. Needs `vehicle.photos` loaded."
                    }
                },
                "required": [
                    "id",
                    "competition_number",
                    "class_code",
                    "class_name",
                    "driver_name",
                    "co_driver_name",
                    "entrant_name",
                    "vehicle_description",
                    "state",
                    "state_label",
                    "photo_url"
                ],
                "title": "PublicEntryResource"
            },
            "PublicEventResource": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string"
                    },
                    "slug": {
                        "type": "string"
                    },
                    "url": {
                        "type": "string",
                        "description": "A path, not a full URL: payloads are cached and an absolute URL would bake in the request's Host header."
                    },
                    "discipline": {
                        "type": "string",
                        "enum": [
                            "rally",
                            "rallysprint",
                            "hillclimb",
                            "circuit",
                            "khanacross",
                            "motorkhana",
                            "autocross",
                            "drift",
                            "tarmac",
                            "other"
                        ]
                    },
                    "discipline_label": {
                        "type": "string",
                        "enum": [
                            "Rally",
                            "Rallysprint",
                            "Hillclimb",
                            "Circuit",
                            "Khanacross",
                            "Motorkhana",
                            "Autocross",
                            "Drift",
                            "Tarmac",
                            "Other"
                        ]
                    },
                    "sanctioning_body": {
                        "type": "string",
                        "enum": [
                            "amsag",
                            "motorsport_australia",
                            "aasa"
                        ]
                    },
                    "sanctioning_body_label": {
                        "type": "string",
                        "enum": [
                            "AMSAG",
                            "Motorsport Australia",
                            "AASA"
                        ]
                    },
                    "venue_name": {
                        "type": "string"
                    },
                    "venue_address": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "town": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "state": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "ACT",
                            "NSW",
                            "NT",
                            "QLD",
                            "SA",
                            "TAS",
                            "VIC",
                            "WA",
                            null
                        ]
                    },
                    "timezone": {
                        "type": "string"
                    },
                    "starts_on": {
                        "type": "string"
                    },
                    "ends_on": {
                        "type": "string"
                    },
                    "permit_number": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "starts_display": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "finishes_display": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "pace_notes": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "pace_noted",
                            "blind",
                            "both",
                            null
                        ]
                    },
                    "pace_notes_label": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "enum": [
                            "Pace-noted",
                            "Blind (no pace notes)",
                            "Pace-noted and blind classes",
                            null
                        ]
                    },
                    "scrutineering_notes": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "sessions": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "type": {
                                    "type": "string",
                                    "enum": [
                                        "reconnaissance",
                                        "testing",
                                        "practice",
                                        "documentation",
                                        "scrutineering",
                                        "shakedown",
                                        "other"
                                    ]
                                },
                                "type_label": {
                                    "type": "string"
                                },
                                "when_display": {
                                    "type": "string"
                                },
                                "note": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                }
                            },
                            "required": [
                                "type",
                                "type_label",
                                "when_display",
                                "note"
                            ]
                        }
                    },
                    "dates_display": {
                        "type": "string"
                    },
                    "entries_open_local": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "entries_open_display": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "entries_close_local": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "entries_close_display": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "draft",
                            "published",
                            "entries_open",
                            "entries_closed",
                            "running",
                            "complete",
                            "cancelled"
                        ]
                    },
                    "status_label": {
                        "type": "string"
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "organiser": {
                        "type": "object",
                        "properties": {
                            "name": {
                                "type": "string"
                            },
                            "slug": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "name",
                            "slug"
                        ]
                    },
                    "locations": {
                        "type": "array",
                        "items": {}
                    },
                    "contacts": {
                        "type": "array",
                        "description": "Personal details: only where the caller loaded them (the single-event paths), never on lists or in the list cache.",
                        "items": {}
                    },
                    "documents": {
                        "type": "array",
                        "items": {}
                    },
                    "cover": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "The cover photograph: paths on the Stagewerk host, like `url` (payloads are cached, so no absolute address). Null until the organiser adds a processed cover with alt text; clients then show no image (or their own plain treatment).",
                        "properties": {
                            "display_url": {
                                "type": "string"
                            },
                            "thumb_url": {
                                "type": "string"
                            },
                            "alt": {
                                "type": "string"
                            },
                            "caption": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "credit": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "width": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            },
                            "height": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            }
                        },
                        "required": [
                            "display_url",
                            "thumb_url",
                            "alt",
                            "caption",
                            "credit",
                            "width",
                            "height"
                        ]
                    },
                    "course": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "One or the other, null when empty: a circuit, hillclimb or sprint states its course; any other event sums its itinerary (see EventDistances).",
                        "properties": {
                            "length_m": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            },
                            "length_km": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "direction": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "direction_label": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        },
                        "required": [
                            "length_m",
                            "length_km",
                            "direction",
                            "direction_label"
                        ]
                    },
                    "distances": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "Only where the itinerary is loaded (the single-event paths): a list would load every row just to sum it.",
                        "properties": {
                            "competitive_m": {
                                "type": "integer"
                            },
                            "liaison_m": {
                                "type": "integer"
                            },
                            "total_m": {
                                "type": "integer"
                            },
                            "competitive_km": {
                                "type": "string"
                            },
                            "liaison_km": {
                                "type": "string"
                            },
                            "total_km": {
                                "type": "string"
                            },
                            "legs": {
                                "type": "array",
                                "items": {
                                    "type": "object",
                                    "additionalProperties": {}
                                }
                            }
                        },
                        "required": [
                            "competitive_m",
                            "liaison_m",
                            "total_m",
                            "competitive_km",
                            "liaison_km",
                            "total_km",
                            "legs"
                        ]
                    }
                },
                "required": [
                    "name",
                    "slug",
                    "url",
                    "discipline",
                    "discipline_label",
                    "sanctioning_body",
                    "sanctioning_body_label",
                    "venue_name",
                    "venue_address",
                    "town",
                    "state",
                    "timezone",
                    "starts_on",
                    "ends_on",
                    "permit_number",
                    "starts_display",
                    "finishes_display",
                    "pace_notes",
                    "pace_notes_label",
                    "scrutineering_notes",
                    "sessions",
                    "dates_display",
                    "entries_open_local",
                    "entries_open_display",
                    "entries_close_local",
                    "entries_close_display",
                    "status",
                    "status_label",
                    "description",
                    "organiser",
                    "locations",
                    "documents",
                    "cover",
                    "course"
                ],
                "title": "PublicEventResource"
            }
        },
        "responses": {
            "ValidationException": {
                "description": "Validation error",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Errors overview."
                                },
                                "errors": {
                                    "type": "object",
                                    "description": "A detailed description of each field that failed validation.",
                                    "additionalProperties": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            },
                            "required": [
                                "message",
                                "errors"
                            ]
                        }
                    }
                }
            },
            "AuthenticationException": {
                "description": "Unauthenticated",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": [
                                "message"
                            ]
                        }
                    }
                }
            },
            "ModelNotFoundException": {
                "description": "Not found",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": [
                                "message"
                            ]
                        }
                    }
                }
            }
        }
    }
}