{
    "openapi": "3.1.2",
    "info": {
        "title": "Lottevo API",
        "version": "v1",
        "description": "The Lottevo data API. Every route is served at `/v1/...` and authenticates with an API key, sent as `Authorization: Bearer <key>` or `X-Api-Key: <key>`. A sandbox key (`lv_test_...`) reads one game (EU-002) on the same routes: its latest 50 results, each once it is a week old."
    },
    "servers": [
        {
            "url": "https://api.lottevo.com/v1"
        }
    ],
    "security": [
        {
            "http": []
        }
    ],
    "paths": {
        "/account": {
            "get": {
                "operationId": "v1.account",
                "summary": "What the calling key is: its account's plan, its scopes and how many\nrequests the account has made today. The integration smoke test — a client can\nverify a key works without needing a scope, and read its own ceiling\nfrom the answer",
                "tags": [
                    "Account"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "key": {
                                                    "type": "object",
                                                    "properties": {
                                                        "name": {
                                                            "type": "string"
                                                        },
                                                        "prefix": {
                                                            "type": "string"
                                                        },
                                                        "sandbox": {
                                                            "type": "boolean",
                                                            "description": "A sandbox key reads real results, but only once they\nare `plan.history_delay_days` old."
                                                        },
                                                        "scopes": {
                                                            "type": "string"
                                                        },
                                                        "lottery_codes": {
                                                            "type": [
                                                                "array",
                                                                "null"
                                                            ],
                                                            "description": "Null = the whole catalogue; a list is exactly what this\nkey may read, subscribe to and stream.",
                                                            "items": {}
                                                        },
                                                        "history_from": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ],
                                                            "description": "The oldest draw time this key reads. Null = the whole\nhistory since the first recorded draw, or only each\ngame's latest `plan.history_draws` results."
                                                        },
                                                        "history_until": {
                                                            "type": "null",
                                                            "description": "The newest draw time this key reads, exclusive. Null =\nresults as soon as they land."
                                                        },
                                                        "expires_at": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "name",
                                                        "prefix",
                                                        "sandbox",
                                                        "scopes",
                                                        "lottery_codes",
                                                        "history_from",
                                                        "history_until",
                                                        "expires_at"
                                                    ]
                                                },
                                                "plan": {
                                                    "type": "object",
                                                    "properties": {
                                                        "name": {
                                                            "type": "string"
                                                        },
                                                        "requests_per_day": {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ]
                                                        },
                                                        "requests_per_minute": {
                                                            "type": "integer"
                                                        },
                                                        "history_days": {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ]
                                                        },
                                                        "history_delay_days": {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ]
                                                        },
                                                        "history_draws": {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ],
                                                            "description": "How many of each game's latest results this key reads,\ncounted back from `key.history_until`. Null = no count."
                                                        },
                                                        "trial_ends_at": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ],
                                                            "description": "When the trial stops answering. Null on a paid plan."
                                                        },
                                                        "exports_per_month": {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ],
                                                            "description": "Bulk exports the account may take each UTC month, with\n`exports:read`. Null = uncapped."
                                                        }
                                                    },
                                                    "required": [
                                                        "name",
                                                        "requests_per_day",
                                                        "requests_per_minute",
                                                        "history_days",
                                                        "history_delay_days",
                                                        "history_draws",
                                                        "trial_ends_at",
                                                        "exports_per_month"
                                                    ]
                                                },
                                                "usage": {
                                                    "type": "object",
                                                    "properties": {
                                                        "date": {
                                                            "type": "string"
                                                        },
                                                        "requests": {
                                                            "type": "integer"
                                                        },
                                                        "remaining": {},
                                                        "resets_at": {
                                                            "type": "string"
                                                        },
                                                        "exports_remaining": {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ],
                                                            "description": "Exports the account may still take this UTC month.\nNull = uncapped."
                                                        }
                                                    },
                                                    "required": [
                                                        "date",
                                                        "requests",
                                                        "remaining",
                                                        "resets_at",
                                                        "exports_remaining"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "key",
                                                "plan",
                                                "usage"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/lotteries/{lottery}/compliance": {
            "get": {
                "operationId": "v1.lotteries.compliance",
                "description": "A national game lists its country only: which states or provinces\nsell it is not known for every game, and the country entry says when\nthe rules differ between them.",
                "summary": "The legal frame of every jurisdiction a lottery is sold in",
                "tags": [
                    "Compliance"
                ],
                "parameters": [
                    {
                        "name": "lottery",
                        "in": "path",
                        "required": true,
                        "description": "The lottery code",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Array of `JurisdictionComplianceResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/JurisdictionComplianceResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/compliance": {
            "get": {
                "operationId": "v1.compliance.index",
                "description": "Countries and their states or provinces come in one list, each\ncountry followed by its states. A US state carries the federal tax\nlevel alongside its own, so it can be read on its own.",
                "summary": "The legal frame of every researched jurisdiction, optionally within\none country",
                "tags": [
                    "Compliance"
                ],
                "responses": {
                    "200": {
                        "description": "Array of `JurisdictionComplianceResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/JurisdictionComplianceResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/draws": {
            "get": {
                "operationId": "v1.draws.index",
                "summary": "The results feed, newest first, across the whole catalogue or narrowed\nto a game, a country or a date range. The cursor is what a client\nre-syncs against; an offset page would be shifted by every draw that\nlands while it reads. Results older than the history your plan\nincludes are not listed — `/v1/account` gives the exact start",
                "tags": [
                    "Draw"
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `DrawResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/DrawResource"
                                            }
                                        },
                                        "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"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/draws/latest": {
            "get": {
                "operationId": "v1.draws.latest",
                "summary": "The latest result of every game, paginated over games — the board a\ndashboard renders. A game with no result yet is listed with\n`latest_draw: null`",
                "tags": [
                    "Draw"
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `LotteryResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/LotteryResource"
                                            }
                                        },
                                        "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"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/draws/{draw}": {
            "get": {
                "operationId": "v1.draws.show",
                "summary": "One result by id. Ids are stable, and this is the URL a webhook\npayload points back at. A result older than the\nhistory your plan includes is refused with `history_not_included`",
                "tags": [
                    "Draw"
                ],
                "parameters": [
                    {
                        "name": "draw",
                        "in": "path",
                        "required": true,
                        "description": "The draw ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`DrawResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/DrawResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "lottery_code",
                                                        "currency",
                                                        "prizes"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/draws/changes": {
            "get": {
                "operationId": "v1.draws.changes",
                "description": "The feed to keep a copy of the results in step without re-reading\nthem. Each entry says what happened — `published`, `updated` (money\nfilled in later: the jackpot, the prize categories), `revised` (the\nnumbers or the draw time corrected) or `deleted` — which fields it\ntouched, and carries the draw as it stands now; a deleted draw carries\nonly its id. Start from `filter[since]`, then follow `next_cursor`\nfrom one request to the next. Entries older than the retention window\nare no longer listed, except corrections; a client further behind\nthan that re-reads the results feed.",
                "summary": "Everything that happened to the results, in order",
                "tags": [
                    "DrawChange"
                ],
                "parameters": [
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `DrawChangeResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/DrawChangeResource"
                                            }
                                        },
                                        "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"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/draws/{draw}/revisions": {
            "get": {
                "operationId": "v1.draws.revisions",
                "description": "Each entry holds the fields that were corrected, with their values\nbefore and after. A result that was never corrected has none.",
                "summary": "The corrections of one result, oldest first",
                "tags": [
                    "DrawChange"
                ],
                "parameters": [
                    {
                        "name": "draw",
                        "in": "path",
                        "required": true,
                        "description": "The draw ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Array of `DrawRevisionResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/DrawRevisionResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/exports": {
            "get": {
                "operationId": "v1.exports.index",
                "description": "The latest 100, newest first. `meta` says how many exports the account\nmay still ask for this UTC month, across all its keys.",
                "summary": "List this key's exports",
                "tags": [
                    "Export"
                ],
                "responses": {
                    "200": {
                        "description": "Array of `ExportResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/ExportResource"
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "exports_per_month": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "remaining_this_month": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "resets_at": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "exports_per_month",
                                                "remaining_this_month",
                                                "resets_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "v1.exports.store",
                "description": "Of one lottery (`lottery`) this key is entitled to, as `csv` or\n`ndjson`, gzip-compressed. The whole history the plan includes is\nwritten, oldest draw first.\n\nThe file is built in the background: poll `GET /v1/exports/{id}` until\n`status` is `ready`, then follow `download_url`. Each export counts\nagainst the account's monthly allowance (see `meta` on the listing);\none that fails does not. NDJSON lines are the draw objects of\n`GET /v1/draws/{id}`, prize categories included; CSV carries the same\nfields without the categories, lists separated by spaces.",
                "summary": "Ask for a bulk export",
                "tags": [
                    "Export"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/StoreExportRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/exports/{export}": {
            "get": {
                "operationId": "v1.exports.show",
                "summary": "Show one export, with its download link once it is ready",
                "tags": [
                    "Export"
                ],
                "parameters": [
                    {
                        "name": "export",
                        "in": "path",
                        "required": true,
                        "description": "The export UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`ExportResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/ExportResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/continents": {
            "get": {
                "operationId": "v1.continents.index",
                "summary": "The continents that have any lottery. Unpaginated on purpose: there\nare only a handful of them, and a client building a dropdown should\nnot have to follow a cursor for it",
                "tags": [
                    "Location"
                ],
                "responses": {
                    "200": {
                        "description": "Array of `ContinentResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/ContinentResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/countries": {
            "get": {
                "operationId": "v1.countries.index",
                "summary": "The countries that have any lottery, optionally within one continent.\nLists both the countries that own games and those where games are\nsold, so Cyprus appears for the Greek games",
                "tags": [
                    "Location"
                ],
                "parameters": [
                    {
                        "name": "filter[continent]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Array of `CountryResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "allOf": [
                                                    {
                                                        "$ref": "#/components/schemas/CountryResource"
                                                    },
                                                    {
                                                        "type": "object",
                                                        "required": [
                                                            "continent"
                                                        ]
                                                    }
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/states": {
            "get": {
                "operationId": "v1.states.index",
                "summary": "The states that have any lottery, optionally within one country",
                "tags": [
                    "Location"
                ],
                "parameters": [
                    {
                        "name": "filter[country]",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Array of `StateResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "allOf": [
                                                    {
                                                        "$ref": "#/components/schemas/StateResource"
                                                    },
                                                    {
                                                        "type": "object",
                                                        "required": [
                                                            "country"
                                                        ]
                                                    }
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/lotteries": {
            "get": {
                "operationId": "v1.lotteries.index",
                "summary": "The catalogue. Inactive games are not listed",
                "tags": [
                    "Lottery"
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `LotteryResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/LotteryResource"
                                            }
                                        },
                                        "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"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/lotteries/{lottery}": {
            "get": {
                "operationId": "v1.lotteries.show",
                "summary": "One game, addressed by its code — plus its last results and its payout\ntable, which are cheap for one game and are what a game's own page\nshows",
                "tags": [
                    "Lottery"
                ],
                "parameters": [
                    {
                        "name": "lottery",
                        "in": "path",
                        "required": true,
                        "description": "The lottery code",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`LotteryResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#/components/schemas/LotteryResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "ticket_check",
                                                        "continent",
                                                        "country",
                                                        "state",
                                                        "schedules",
                                                        "draws",
                                                        "payouts"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/lotteries/{lottery}/data-quality": {
            "get": {
                "operationId": "v1.lotteries.data-quality",
                "description": "Over the last 30 days: how many draws the game's schedule called for,\nhow many were published, how many the operator did not hold, and how\nmany are missing — plus how long after each draw's scheduled time its\nresult was available, as the median, the 90th percentile and the\nslowest. Recomputed once a day. `completeness` is null for a game drawn\non a calendar no fixed schedule describes; `data` is null for a game\nthat has not been measured yet.",
                "summary": "How complete and how fast a game's results have been",
                "tags": [
                    "LotteryDataQuality"
                ],
                "parameters": [
                    {
                        "name": "lottery",
                        "in": "path",
                        "required": true,
                        "description": "The lottery code",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`LotteryDataQualityResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "null"
                                                }
                                            },
                                            "required": [
                                                "data"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "$ref": "#/components/schemas/LotteryDataQualityResource"
                                                }
                                            },
                                            "required": [
                                                "data"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/lotteries/{lottery}/draws": {
            "get": {
                "operationId": "v1.lotteries.draws",
                "description": "Besides the dates, `filter[numbers]=7,23` keeps the draws whose main\nnumbers include all of those, `filter[weekday]=7` the draws held on a\nweekday (1 = Monday, 7 = Sunday, on the game's local clock; several\nseparated by commas), and `filter[jackpot_won]=true` the draws whose top\nprize was won (`false`: published without a winner).",
                "summary": "One game's result history, newest first, as far back as your plan\nincludes (see `/v1/account`). Pages stay equally fast however deep\nyou walk back",
                "tags": [
                    "LotteryDraw"
                ],
                "parameters": [
                    {
                        "name": "lottery",
                        "in": "path",
                        "required": true,
                        "description": "The lottery code",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `DrawResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/DrawResource"
                                            }
                                        },
                                        "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"
                    }
                }
            }
        },
        "/lotteries/{lottery}/freshness": {
            "get": {
                "operationId": "v1.lotteries.freshness",
                "description": "Whether the latest scheduled draw has its result (`current`), is still\nwithin the time results normally take (`awaiting`) or is late and\nflagged as missing (`overdue`); when the game's results last changed\nhere, which is not the same as when it was last drawn; how long after\nits scheduled time the latest result arrived, against the usual delay;\nand how many results were corrected after publication recently.\nComputed on every request, unlike the daily data-quality figures.",
                "summary": "How current a game's results are right now",
                "tags": [
                    "LotteryFreshness"
                ],
                "parameters": [
                    {
                        "name": "lottery",
                        "in": "path",
                        "required": true,
                        "description": "The lottery code",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`LotteryFreshnessResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/LotteryFreshnessResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/lotteries/{lottery}/generate": {
            "get": {
                "operationId": "v1.lotteries.generate",
                "description": "Every ticket is valid for the game and distinct from the others, and\nevery ticket the filters allow is equally likely unless `weighting`\nsays otherwise. No filter changes the chance of winning: they choose\nwhich tickets you play, not how likely they are to come up.\n\n`meta.space` counts the tickets the filters allow — exactly while only\nthe counted filters are used (`odd`, `low`, `ranges`, `include`,\n`exclude`, `numbers_from`), estimated once the sum, neighbour, ending,\ngroup-of-ten or popular-pattern filters are added (`exact: false`).\nA request no ticket can meet is refused at once with the reason\n(`generator_impossible`), and one asking for more tickets than exist\nsays how many do (`generator_space_too_small`).\n\n`seed` makes a request repeatable: the same request with the same seed\nreturns the same tickets while the game's history stands. The seed\nused is always in `meta.seed`.\n\nThe filters read from past draws (`numbers_from`, `weighting`) need at\nleast 100 draws in `window` (`not_enough_draws`). `avoid_popular`\nleaves out the patterns many players mark — the latest draw, only\ndates, even-step rows, long runs, one ending, one multiple: in a\npari-mutuel game a prize is then shared with fewer winners.\n\nDigit games (Pick 3, Joker, …) take only `exclude`, `sum_min`,\n`sum_max`, `never_drawn`, `avoid_popular`, `numbers_from` and\n`weighting`; games whose count of numbers is the result, games drawn\nfrom several drums and races answer 422 `generator_unsupported`.",
                "summary": "Generate tickets for a game",
                "tags": [
                    "LotteryGenerator"
                ],
                "parameters": [
                    {
                        "name": "lottery",
                        "in": "path",
                        "required": true,
                        "description": "The lottery code",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "count",
                        "in": "query",
                        "description": "How many tickets to generate, 1 to 50.",
                        "schema": {
                            "type": "integer",
                            "default": 5
                        }
                    },
                    {
                        "name": "size",
                        "in": "query",
                        "description": "How many numbers each ticket holds, within the game's own range (`meta.sizes`). Defaults to the most a ticket may hold.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "seed",
                        "in": "query",
                        "description": "A whole number from 0 to 9007199254740991 that makes the request repeatable. Chosen at random when absent.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "odd",
                        "in": "query",
                        "description": "How many odd numbers each ticket holds, exactly.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "low",
                        "in": "query",
                        "description": "How many numbers from the lower half of the pool (`meta.low`) each ticket holds, exactly.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "ranges",
                        "in": "query",
                        "description": "Exact counts from stretches of the pool, as `from-to:count` separated by commas: `1-10:2,11-20:1` is two numbers from 1 to 10 and one from 11 to 20. The stretches may not overlap.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "description": "Numbers every ticket holds, separated by commas.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "exclude",
                        "in": "query",
                        "description": "Numbers no ticket holds, separated by commas.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sum_min",
                        "in": "query",
                        "description": "The lowest sum of a ticket's numbers.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "sum_max",
                        "in": "query",
                        "description": "The highest sum of a ticket's numbers.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "max_consecutive",
                        "in": "query",
                        "description": "The longest run of neighbouring numbers a ticket may hold (14, 15, 16 is a run of 3).",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "max_same_ending",
                        "in": "query",
                        "description": "The most numbers a ticket may hold with the same last digit.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "max_per_decade",
                        "in": "query",
                        "description": "The most numbers a ticket may hold from one group of ten (1-10, 11-20, …).",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "never_drawn",
                        "in": "query",
                        "description": "Only tickets no past draw held. For number games, only when a ticket holds as many numbers as a draw.",
                        "schema": {
                            "type": "boolean",
                            "default": false
                        }
                    },
                    {
                        "name": "avoid_popular",
                        "in": "query",
                        "description": "Leave out the patterns many players mark.",
                        "schema": {
                            "type": "boolean",
                            "default": false
                        }
                    },
                    {
                        "name": "numbers_from",
                        "in": "query",
                        "description": "Draw the tickets only from the `hot` (most drawn), `cold` (least drawn) or `overdue` (longest absent) numbers of `window`. Historical analysis, not a prediction.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "numbers_from_top",
                        "in": "query",
                        "description": "How many of those numbers to draw from. Defaults to a third of the pool.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "weighting",
                        "in": "query",
                        "description": "`hot` picks numbers drawn more often in `window` more often, `cold` the reverse, `none` weighs every ticket alike. A preference, not a better chance.",
                        "schema": {
                            "type": "string",
                            "default": "none"
                        }
                    },
                    {
                        "name": "window",
                        "in": "query",
                        "description": "The past draws `numbers_from` and `weighting` read: `meta.available_windows` on the game's statistics lists them.",
                        "schema": {
                            "type": "string",
                            "default": "all_time"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {}
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "lottery_code": {
                                                    "type": "string"
                                                },
                                                "kind": {
                                                    "type": "string",
                                                    "enum": [
                                                        "numbers",
                                                        "digits"
                                                    ]
                                                },
                                                "seed": {
                                                    "type": "integer"
                                                },
                                                "requested": {
                                                    "type": "integer"
                                                },
                                                "size": {
                                                    "type": "integer"
                                                },
                                                "sizes": {
                                                    "type": "object",
                                                    "properties": {
                                                        "min": {
                                                            "type": "integer"
                                                        },
                                                        "max": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "min",
                                                        "max"
                                                    ]
                                                },
                                                "pool": {
                                                    "type": "object",
                                                    "properties": {
                                                        "from": {
                                                            "type": "integer"
                                                        },
                                                        "to": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "from",
                                                        "to"
                                                    ]
                                                },
                                                "low": {
                                                    "type": "object",
                                                    "description": "The lower half of the pool, as `low` counts it.",
                                                    "properties": {
                                                        "from": {
                                                            "type": "integer"
                                                        },
                                                        "to": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "from",
                                                        "to"
                                                    ]
                                                },
                                                "bonus": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "description": "The bonus a ticket plays separately; null when the game has none.",
                                                    "properties": {
                                                        "size": {
                                                            "type": "integer"
                                                        },
                                                        "from": {},
                                                        "to": {},
                                                        "repeats": {
                                                            "type": "boolean"
                                                        }
                                                    },
                                                    "required": [
                                                        "size",
                                                        "from",
                                                        "to",
                                                        "repeats"
                                                    ]
                                                },
                                                "space": {
                                                    "type": "object",
                                                    "description": "How many tickets the filters allow, out of every ticket of this size, as whole numbers in strings.",
                                                    "properties": {
                                                        "combinations": {
                                                            "type": "string"
                                                        },
                                                        "total": {
                                                            "type": "string"
                                                        },
                                                        "exact": {
                                                            "type": "boolean"
                                                        }
                                                    },
                                                    "required": [
                                                        "combinations",
                                                        "total",
                                                        "exact"
                                                    ]
                                                },
                                                "odds": {
                                                    "type": "object",
                                                    "description": "The chance of a ticket having every number drawn (a digit ticket: exactly), bonus included.",
                                                    "properties": {
                                                        "all_matched_one_in": {
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "all_matched_one_in"
                                                    ]
                                                },
                                                "statistics": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "description": "The past draws the filters read; null when none were read.",
                                                    "properties": {
                                                        "window": {
                                                            "type": "string"
                                                        },
                                                        "counted_from": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "window",
                                                        "counted_from"
                                                    ]
                                                },
                                                "filters": {
                                                    "type": "object",
                                                    "properties": {
                                                        "odd": {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ]
                                                        },
                                                        "low": {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ]
                                                        },
                                                        "ranges": {
                                                            "type": "array",
                                                            "items": {}
                                                        },
                                                        "include": {
                                                            "type": "array",
                                                            "items": {}
                                                        },
                                                        "exclude": {
                                                            "type": "array",
                                                            "items": {}
                                                        },
                                                        "sum_min": {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ]
                                                        },
                                                        "sum_max": {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ]
                                                        },
                                                        "max_consecutive": {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ]
                                                        },
                                                        "max_same_ending": {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ]
                                                        },
                                                        "max_per_decade": {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ]
                                                        },
                                                        "never_drawn": {
                                                            "type": "boolean"
                                                        },
                                                        "avoid_popular": {
                                                            "type": "boolean"
                                                        },
                                                        "numbers_from": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ],
                                                            "enum": [
                                                                "hot",
                                                                "cold",
                                                                "overdue",
                                                                null
                                                            ]
                                                        },
                                                        "numbers_from_top": {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ]
                                                        },
                                                        "weighting": {
                                                            "type": "string",
                                                            "enum": [
                                                                "none",
                                                                "hot",
                                                                "cold"
                                                            ]
                                                        },
                                                        "window": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ],
                                                            "enum": [
                                                                "day",
                                                                "two_days",
                                                                "three_days",
                                                                "four_days",
                                                                "five_days",
                                                                "six_days",
                                                                "seven_days",
                                                                "fourteen_days",
                                                                "thirty_days",
                                                                "three_months",
                                                                "six_months",
                                                                "nine_months",
                                                                "year",
                                                                "all_time",
                                                                null
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "odd",
                                                        "low",
                                                        "ranges",
                                                        "include",
                                                        "exclude",
                                                        "sum_min",
                                                        "sum_max",
                                                        "max_consecutive",
                                                        "max_same_ending",
                                                        "max_per_decade",
                                                        "never_drawn",
                                                        "avoid_popular",
                                                        "numbers_from",
                                                        "numbers_from_top",
                                                        "weighting",
                                                        "window"
                                                    ]
                                                },
                                                "never_drawn_available": {
                                                    "type": "boolean"
                                                },
                                                "archive_minimum_draws": {
                                                    "type": "integer",
                                                    "const": 100
                                                }
                                            },
                                            "required": [
                                                "lottery_code",
                                                "kind",
                                                "seed",
                                                "requested",
                                                "size",
                                                "sizes",
                                                "pool",
                                                "low",
                                                "bonus",
                                                "space",
                                                "odds",
                                                "statistics",
                                                "filters",
                                                "never_drawn_available",
                                                "archive_minimum_draws"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "code": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/lotteries/{lottery}/jackpots": {
            "get": {
                "operationId": "v1.lotteries.jackpots",
                "description": "Every distinct figure the operator announced for an upcoming draw, newest\nfirst, with the span over which it stood unchanged. A figure revised\nduring the week becomes a new entry, so the list shows how the estimate\ngrew toward each draw. The history starts when we began recording it.",
                "summary": "How a game's announced jackpot has moved",
                "tags": [
                    "LotteryJackpot"
                ],
                "parameters": [
                    {
                        "name": "lottery",
                        "in": "path",
                        "required": true,
                        "description": "The lottery code",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `JackpotSnapshotResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/JackpotSnapshotResource"
                                            }
                                        },
                                        "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"
                    }
                }
            }
        },
        "/lotteries/{lottery}/payouts": {
            "get": {
                "operationId": "v1.lotteries.payouts",
                "description": "Some games do not split a pool between winners: the prize is a function\nof the ticket — what was bet on, how many numbers were played, how many\nmatched — so it is the same for every draw and is published here rather\nthan with each result. A game that splits a pool returns an empty list;\nits money is on the draws.",
                "summary": "The payout table of a fixed-odds game",
                "tags": [
                    "LotteryPayout"
                ],
                "parameters": [
                    {
                        "name": "lottery",
                        "in": "path",
                        "required": true,
                        "description": "The lottery code",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Array of `LotteryPayoutResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/LotteryPayoutResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/lotteries/{lottery}/schedule": {
            "get": {
                "operationId": "v1.lotteries.schedule",
                "description": "`regular` is false for a game that draws on irregular days, such as\none tied to horse-racing fixtures: it has no timetable, so the\nschedules, the next draw and the upcoming occurrences are empty.",
                "summary": "When a game draws: each schedule written out in the language of the\nrequest, plus the next few occurrences already resolved to UTC\ninstants so a client does not have to handle DST to build a calendar",
                "tags": [
                    "LotterySchedule"
                ],
                "parameters": [
                    {
                        "name": "lottery",
                        "in": "path",
                        "required": true,
                        "description": "The lottery code",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "occurrences",
                        "in": "query",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "lottery_code": {
                                                    "type": "string"
                                                },
                                                "timezone": {
                                                    "type": "string"
                                                },
                                                "regular": {
                                                    "type": "boolean"
                                                },
                                                "schedules": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "next_draw_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "upcoming": {
                                                    "type": "array",
                                                    "items": {}
                                                }
                                            },
                                            "required": [
                                                "lottery_code",
                                                "timezone",
                                                "regular",
                                                "schedules",
                                                "next_draw_at",
                                                "upcoming"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/lotteries/{lottery}/statistics": {
            "get": {
                "operationId": "v1.lotteries.statistics",
                "description": "Historical analysis of past results, not a prediction of future ones.",
                "summary": "The three rankings for a game: most drawn, least drawn, and longest\nwithout appearing",
                "tags": [
                    "LotteryStatistics"
                ],
                "parameters": [
                    {
                        "name": "lottery",
                        "in": "path",
                        "required": true,
                        "description": "The lottery code",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "combo_size",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 0
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "window",
                        "in": "query",
                        "description": "How far back to count: `day`, `two_days` … `six_days`, `seven_days`, `fourteen_days`, `thirty_days`, `three_months`, `six_months`, `nine_months`, `year` or `all_time`. The windows shorter than seven days exist only for games drawn several times a day; any other value counts the whole history. `meta.available_windows` lists the game's.",
                        "schema": {
                            "type": "string",
                            "default": "all_time"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "hot": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "numbers": {
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "integer"
                                                                }
                                                            },
                                                            "appearances": {
                                                                "type": "integer"
                                                            },
                                                            "current_streak": {
                                                                "type": "integer"
                                                            },
                                                            "max_streak": {
                                                                "type": "integer"
                                                            }
                                                        },
                                                        "required": [
                                                            "numbers",
                                                            "appearances",
                                                            "current_streak",
                                                            "max_streak"
                                                        ]
                                                    }
                                                },
                                                "cold": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "numbers": {
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "integer"
                                                                }
                                                            },
                                                            "appearances": {
                                                                "type": "integer"
                                                            },
                                                            "current_streak": {
                                                                "type": "integer"
                                                            },
                                                            "max_streak": {
                                                                "type": "integer"
                                                            }
                                                        },
                                                        "required": [
                                                            "numbers",
                                                            "appearances",
                                                            "current_streak",
                                                            "max_streak"
                                                        ]
                                                    }
                                                },
                                                "streaks": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "numbers": {
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "integer"
                                                                }
                                                            },
                                                            "appearances": {
                                                                "type": "integer"
                                                            },
                                                            "current_streak": {
                                                                "type": "integer"
                                                            },
                                                            "max_streak": {
                                                                "type": "integer"
                                                            }
                                                        },
                                                        "required": [
                                                            "numbers",
                                                            "appearances",
                                                            "current_streak",
                                                            "max_streak"
                                                        ]
                                                    }
                                                }
                                            },
                                            "required": [
                                                "hot",
                                                "cold",
                                                "streaks"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "lottery_code": {
                                                    "type": "string"
                                                },
                                                "combo_size": {
                                                    "type": "integer"
                                                },
                                                "window": {
                                                    "type": "string",
                                                    "enum": [
                                                        "day",
                                                        "two_days",
                                                        "three_days",
                                                        "four_days",
                                                        "five_days",
                                                        "six_days",
                                                        "seven_days",
                                                        "fourteen_days",
                                                        "thirty_days",
                                                        "three_months",
                                                        "six_months",
                                                        "nine_months",
                                                        "year",
                                                        "all_time"
                                                    ]
                                                },
                                                "limit": {},
                                                "available_combo_sizes": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "available_windows": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string",
                                                        "enum": [
                                                            "day",
                                                            "two_days",
                                                            "three_days",
                                                            "four_days",
                                                            "five_days",
                                                            "six_days",
                                                            "seven_days",
                                                            "fourteen_days",
                                                            "thirty_days",
                                                            "three_months",
                                                            "six_months",
                                                            "nine_months",
                                                            "year",
                                                            "all_time"
                                                        ]
                                                    }
                                                },
                                                "combinations_tracked": {
                                                    "type": "integer"
                                                },
                                                "counted_from": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "The earliest draw time the rankings count from: the window's\ncutoff, or the first draw on record when that is later."
                                                },
                                                "history": {
                                                    "description": "The stretch of results on record the rankings are drawn from,\nwith how complete it is.",
                                                    "$ref": "#/components/schemas/LotteryHistoryResource"
                                                }
                                            },
                                            "required": [
                                                "lottery_code",
                                                "combo_size",
                                                "window",
                                                "limit",
                                                "available_combo_sizes",
                                                "available_windows",
                                                "combinations_tracked",
                                                "counted_from",
                                                "history"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/lotteries/{lottery}/statistics/distributions": {
            "get": {
                "operationId": "v1.lotteries.statistics.distributions",
                "description": "Historical analysis of past results, not a prediction of future ones.\nCounted over the main numbers of the draws made with the game's current\nnumber pool, within the window; `meta` says which draws that was.\n\n- `sum`: the sum of each draw's numbers, in ranges.\n- `odd_even` and `high_low`: how many odd, and how many low numbers, a draw held. Low is the lower half of the pool (`high_low.low`).\n- `consecutive`: pairs of neighbouring numbers in a draw, such as 14 and 15. The fair-draw figure is only given for games where a number cannot come up twice.\n- `positions`: which numbers came up at each position — the lowest number first, or the order of the draw for games where it is part of the result (`positions.order`). Null for games drawing more than 10 numbers or from more than 100.\n- `gaps`: how many draws passed between two appearances of the same number.\n- `randomness`: a chi-square test of how evenly the numbers came up. A small `p_value` (below 0.01) says the spread is unlikely from a fair draw; it is null while too few draws are counted. For a digit game where some position draws from a narrower range (a first digit from 1 to 6 only), every figure follows each position's own range and the test runs position by position; `expected_per_number` is then the smallest count any position expects of a digit.\n\nBingo-style games, whose count of numbers is the result, and games\ndrawn from several drums answer 422 `distributions_unsupported`.",
                "summary": "How a game's past draws are spread, each figure beside what a fair draw\nwould have produced",
                "tags": [
                    "LotteryStatistics"
                ],
                "parameters": [
                    {
                        "name": "lottery",
                        "in": "path",
                        "required": true,
                        "description": "The lottery code",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "window",
                        "in": "query",
                        "description": "How far back to count: `day`, `two_days` … `six_days`, `seven_days`, `fourteen_days`, `thirty_days`, `three_months`, `six_months`, `nine_months`, `year` or `all_time`. The windows shorter than seven days exist only for games drawn several times a day; any other value counts the whole history. `meta.available_windows` lists the game's.",
                        "schema": {
                            "type": "string",
                            "default": "all_time"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "sum": {
                                                    "type": "object",
                                                    "properties": {
                                                        "mean": {
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "expected_mean": {
                                                            "type": "number"
                                                        },
                                                        "std_dev": {
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "expected_std_dev": {
                                                            "type": "number"
                                                        },
                                                        "buckets": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "from": {
                                                                        "type": "integer"
                                                                    },
                                                                    "to": {
                                                                        "type": "integer"
                                                                    },
                                                                    "draws": {
                                                                        "type": "integer"
                                                                    },
                                                                    "expected": {
                                                                        "type": "number"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "from",
                                                                    "to",
                                                                    "draws",
                                                                    "expected"
                                                                ]
                                                            }
                                                        }
                                                    },
                                                    "required": [
                                                        "mean",
                                                        "expected_mean",
                                                        "std_dev",
                                                        "expected_std_dev",
                                                        "buckets"
                                                    ]
                                                },
                                                "odd_even": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "odd": {
                                                                "type": "integer"
                                                            },
                                                            "even": {
                                                                "type": "integer"
                                                            },
                                                            "draws": {
                                                                "type": "integer"
                                                            },
                                                            "expected": {
                                                                "type": "number"
                                                            }
                                                        },
                                                        "required": [
                                                            "odd",
                                                            "even",
                                                            "draws",
                                                            "expected"
                                                        ]
                                                    }
                                                },
                                                "high_low": {
                                                    "type": "object",
                                                    "properties": {
                                                        "low": {
                                                            "type": "object",
                                                            "properties": {
                                                                "from": {
                                                                    "type": "integer"
                                                                },
                                                                "to": {
                                                                    "type": "integer"
                                                                }
                                                            },
                                                            "required": [
                                                                "from",
                                                                "to"
                                                            ]
                                                        },
                                                        "high": {
                                                            "type": "object",
                                                            "properties": {
                                                                "from": {
                                                                    "type": "integer"
                                                                },
                                                                "to": {
                                                                    "type": "integer"
                                                                }
                                                            },
                                                            "required": [
                                                                "from",
                                                                "to"
                                                            ]
                                                        },
                                                        "splits": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "low": {
                                                                        "type": "integer"
                                                                    },
                                                                    "high": {
                                                                        "type": "integer"
                                                                    },
                                                                    "draws": {
                                                                        "type": "integer"
                                                                    },
                                                                    "expected": {
                                                                        "type": "number"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "low",
                                                                    "high",
                                                                    "draws",
                                                                    "expected"
                                                                ]
                                                            }
                                                        }
                                                    },
                                                    "required": [
                                                        "low",
                                                        "high",
                                                        "splits"
                                                    ]
                                                },
                                                "consecutive": {
                                                    "type": "object",
                                                    "properties": {
                                                        "mean": {
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "expected_mean": {
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "splits": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "pairs": {
                                                                        "type": "integer"
                                                                    },
                                                                    "draws": {
                                                                        "type": "integer"
                                                                    },
                                                                    "expected": {
                                                                        "type": [
                                                                            "number",
                                                                            "null"
                                                                        ]
                                                                    }
                                                                },
                                                                "required": [
                                                                    "pairs",
                                                                    "draws",
                                                                    "expected"
                                                                ]
                                                            }
                                                        }
                                                    },
                                                    "required": [
                                                        "mean",
                                                        "expected_mean",
                                                        "splits"
                                                    ]
                                                },
                                                "positions": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "order": {
                                                            "type": "string"
                                                        },
                                                        "positions": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "position": {
                                                                        "type": "integer"
                                                                    },
                                                                    "mean": {
                                                                        "type": [
                                                                            "number",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "numbers": {
                                                                        "type": "array",
                                                                        "items": {
                                                                            "type": "object",
                                                                            "properties": {
                                                                                "number": {
                                                                                    "type": "integer"
                                                                                },
                                                                                "draws": {
                                                                                    "type": "integer"
                                                                                }
                                                                            },
                                                                            "required": [
                                                                                "number",
                                                                                "draws"
                                                                            ]
                                                                        }
                                                                    }
                                                                },
                                                                "required": [
                                                                    "position",
                                                                    "mean",
                                                                    "numbers"
                                                                ]
                                                            }
                                                        }
                                                    },
                                                    "required": [
                                                        "order",
                                                        "positions"
                                                    ]
                                                },
                                                "gaps": {
                                                    "type": "object",
                                                    "properties": {
                                                        "mean": {
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "expected_mean": {
                                                            "type": "number"
                                                        },
                                                        "longest": {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ]
                                                        },
                                                        "buckets": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "from": {
                                                                        "type": "integer"
                                                                    },
                                                                    "to": {
                                                                        "type": [
                                                                            "integer",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "gaps": {
                                                                        "type": "integer"
                                                                    },
                                                                    "expected": {
                                                                        "type": "number"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "from",
                                                                    "to",
                                                                    "gaps",
                                                                    "expected"
                                                                ]
                                                            }
                                                        }
                                                    },
                                                    "required": [
                                                        "mean",
                                                        "expected_mean",
                                                        "longest",
                                                        "buckets"
                                                    ]
                                                },
                                                "randomness": {
                                                    "type": "object",
                                                    "properties": {
                                                        "test": {
                                                            "type": "string"
                                                        },
                                                        "statistic": {
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "degrees_of_freedom": {
                                                            "type": "integer"
                                                        },
                                                        "p_value": {
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "expected_per_number": {
                                                            "type": "number"
                                                        }
                                                    },
                                                    "required": [
                                                        "test",
                                                        "statistic",
                                                        "degrees_of_freedom",
                                                        "p_value",
                                                        "expected_per_number"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "sum",
                                                "odd_even",
                                                "high_low",
                                                "consecutive",
                                                "positions",
                                                "gaps",
                                                "randomness"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "lottery_code": {
                                                    "type": "string"
                                                },
                                                "window": {
                                                    "type": "string",
                                                    "enum": [
                                                        "day",
                                                        "two_days",
                                                        "three_days",
                                                        "four_days",
                                                        "five_days",
                                                        "six_days",
                                                        "seven_days",
                                                        "fourteen_days",
                                                        "thirty_days",
                                                        "three_months",
                                                        "six_months",
                                                        "nine_months",
                                                        "year",
                                                        "all_time"
                                                    ]
                                                },
                                                "available_windows": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string",
                                                        "enum": [
                                                            "day",
                                                            "two_days",
                                                            "three_days",
                                                            "four_days",
                                                            "five_days",
                                                            "six_days",
                                                            "seven_days",
                                                            "fourteen_days",
                                                            "thirty_days",
                                                            "three_months",
                                                            "six_months",
                                                            "nine_months",
                                                            "year",
                                                            "all_time"
                                                        ]
                                                    }
                                                },
                                                "draws": {
                                                    "type": "integer",
                                                    "description": "How many draws were counted, and how many numbers each holds."
                                                },
                                                "numbers_per_draw": {
                                                    "type": "integer"
                                                },
                                                "pool": {
                                                    "type": "object",
                                                    "properties": {
                                                        "from": {},
                                                        "to": {}
                                                    },
                                                    "required": [
                                                        "from",
                                                        "to"
                                                    ]
                                                },
                                                "counted_from": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "The first and the last draw counted."
                                                },
                                                "counted_to": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "computed_at": {
                                                    "type": "string",
                                                    "description": "When the figures were counted. Long windows of frequent\ngames are counted once a day, the rest at most an hour ago."
                                                },
                                                "history": {
                                                    "description": "The stretch of results on record, with how complete it is.",
                                                    "$ref": "#/components/schemas/LotteryHistoryResource"
                                                }
                                            },
                                            "required": [
                                                "lottery_code",
                                                "window",
                                                "available_windows",
                                                "draws",
                                                "numbers_per_draw",
                                                "pool",
                                                "counted_from",
                                                "counted_to",
                                                "computed_at",
                                                "history"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Draw distributions are not available for this lottery."
                                        },
                                        "code": {
                                            "type": "string",
                                            "const": "distributions_unsupported"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/lotteries/{lottery}/check": {
            "get": {
                "operationId": "v1.lotteries.check",
                "description": "Pass the ticket as `numbers=3,11,17,24,38,45` — plus `bonus=7` for a game\nwhose bonus is played separately, and `refund=3` for one that draws a\nrefund digit (`ticket_check.refund`) — and get every past draw it matched,\nnewest first. For a number game a draw is listed when it contained at\nleast `min_matched` of the numbers; for a digit game (Pick 3, Joker, …)\nwhen it was an exact or any-order hit, or matched at least `min_matched`\ndigits by position or in a row from either end. `meta.summary` counts\nevery outcome over the whole window, and for a game whose operator\npublishes prizes per draw `meta.winnings` adds up what the ticket would\nhave won, by currency, at the amounts paid per winner then — gross, as\npublished; `complete` is false when some draws could not be judged.\nFor a fixed-odds game (Pick 3, keno, fixed-odds lotto bets) name the bet with\n`bet_type` — one of the game's `ticket_check.bet_types` — and\noptionally `stake`, and every draw is priced at the game's payout table\ninstead: `meta.bet` says the stake, currency and whether the amounts\nare before withholdings. The window is `range` (`3months`,\n`6months`, `1year`, `2years`, `all`) or `from`/`to`, and never reaches\nback before the game took its current format nor further than your plan\nincludes (`meta.window`).",
                "summary": "Check a ticket against a game's history",
                "tags": [
                    "LotteryTicketCheck"
                ],
                "parameters": [
                    {
                        "name": "lottery",
                        "in": "path",
                        "required": true,
                        "description": "The lottery code",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "numbers",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "bonus",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "bet_type",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "stake",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "refund",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "min_matched",
                        "in": "query",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Array of `DigitTicketMatchResource`\n\nArray of `TicketMatchResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/DigitTicketMatchResource"
                                                    }
                                                },
                                                "meta": {
                                                    "type": "object",
                                                    "properties": {
                                                        "kind": {
                                                            "type": "string",
                                                            "enum": [
                                                                "digits",
                                                                "numbers"
                                                            ]
                                                        },
                                                        "ticket": {
                                                            "type": "array",
                                                            "items": {}
                                                        },
                                                        "bonus": {
                                                            "type": "array",
                                                            "items": {}
                                                        },
                                                        "refund": {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ]
                                                        },
                                                        "bet": {
                                                            "type": [
                                                                "object",
                                                                "null"
                                                            ],
                                                            "properties": {
                                                                "bet_type": {
                                                                    "type": [
                                                                        "string",
                                                                        "array",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "stake": {
                                                                    "type": "string"
                                                                },
                                                                "currency": {
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "is_gross": {
                                                                    "type": [
                                                                        "boolean",
                                                                        "null"
                                                                    ]
                                                                }
                                                            },
                                                            "required": [
                                                                "bet_type",
                                                                "stake",
                                                                "currency",
                                                                "is_gross"
                                                            ]
                                                        },
                                                        "min_matched": {},
                                                        "window": {
                                                            "type": "object",
                                                            "properties": {
                                                                "from": {
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "to": {
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "limited_by_format_change": {
                                                                    "type": "boolean"
                                                                },
                                                                "limited_by_plan": {
                                                                    "type": "boolean"
                                                                }
                                                            },
                                                            "required": [
                                                                "from",
                                                                "to",
                                                                "limited_by_format_change",
                                                                "limited_by_plan"
                                                            ]
                                                        },
                                                        "draws_checked": {
                                                            "type": "integer"
                                                        },
                                                        "summary": {
                                                            "anyOf": [
                                                                {
                                                                    "type": "array"
                                                                },
                                                                {
                                                                    "type": "object",
                                                                    "properties": {
                                                                        "exact": {
                                                                            "type": "integer"
                                                                        },
                                                                        "any_order": {
                                                                            "type": "integer"
                                                                        },
                                                                        "positions": {
                                                                            "type": "array",
                                                                            "items": {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                    "matched": {
                                                                                        "type": "integer"
                                                                                    },
                                                                                    "draws": {
                                                                                        "type": "integer"
                                                                                    }
                                                                                },
                                                                                "required": [
                                                                                    "matched",
                                                                                    "draws"
                                                                                ]
                                                                            }
                                                                        },
                                                                        "leading": {
                                                                            "type": "array",
                                                                            "items": {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                    "matched": {
                                                                                        "type": "integer"
                                                                                    },
                                                                                    "draws": {
                                                                                        "type": "integer"
                                                                                    }
                                                                                },
                                                                                "required": [
                                                                                    "matched",
                                                                                    "draws"
                                                                                ]
                                                                            }
                                                                        },
                                                                        "trailing": {
                                                                            "type": "array",
                                                                            "items": {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                    "matched": {
                                                                                        "type": "integer"
                                                                                    },
                                                                                    "draws": {
                                                                                        "type": "integer"
                                                                                    }
                                                                                },
                                                                                "required": [
                                                                                    "matched",
                                                                                    "draws"
                                                                                ]
                                                                            }
                                                                        }
                                                                    },
                                                                    "required": [
                                                                        "exact",
                                                                        "any_order",
                                                                        "positions",
                                                                        "leading",
                                                                        "trailing"
                                                                    ]
                                                                }
                                                            ]
                                                        },
                                                        "winnings": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "kind",
                                                        "ticket",
                                                        "bonus",
                                                        "refund",
                                                        "bet",
                                                        "min_matched",
                                                        "window",
                                                        "draws_checked",
                                                        "summary",
                                                        "winnings"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "data",
                                                "meta"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#/components/schemas/TicketMatchResource"
                                                    }
                                                },
                                                "meta": {
                                                    "type": "object",
                                                    "properties": {
                                                        "kind": {
                                                            "type": "string",
                                                            "enum": [
                                                                "digits",
                                                                "numbers"
                                                            ]
                                                        },
                                                        "ticket": {
                                                            "type": "array",
                                                            "items": {}
                                                        },
                                                        "bonus": {
                                                            "type": "array",
                                                            "items": {}
                                                        },
                                                        "refund": {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ]
                                                        },
                                                        "bet": {
                                                            "type": [
                                                                "object",
                                                                "null"
                                                            ],
                                                            "properties": {
                                                                "bet_type": {
                                                                    "type": [
                                                                        "string",
                                                                        "array",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "stake": {
                                                                    "type": "string"
                                                                },
                                                                "currency": {
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "is_gross": {
                                                                    "type": [
                                                                        "boolean",
                                                                        "null"
                                                                    ]
                                                                }
                                                            },
                                                            "required": [
                                                                "bet_type",
                                                                "stake",
                                                                "currency",
                                                                "is_gross"
                                                            ]
                                                        },
                                                        "min_matched": {},
                                                        "window": {
                                                            "type": "object",
                                                            "properties": {
                                                                "from": {
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "to": {
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "limited_by_format_change": {
                                                                    "type": "boolean"
                                                                },
                                                                "limited_by_plan": {
                                                                    "type": "boolean"
                                                                }
                                                            },
                                                            "required": [
                                                                "from",
                                                                "to",
                                                                "limited_by_format_change",
                                                                "limited_by_plan"
                                                            ]
                                                        },
                                                        "draws_checked": {
                                                            "type": "integer"
                                                        },
                                                        "summary": {
                                                            "anyOf": [
                                                                {
                                                                    "type": "array"
                                                                },
                                                                {
                                                                    "type": "object",
                                                                    "properties": {
                                                                        "exact": {
                                                                            "type": "integer"
                                                                        },
                                                                        "any_order": {
                                                                            "type": "integer"
                                                                        },
                                                                        "positions": {
                                                                            "type": "array",
                                                                            "items": {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                    "matched": {
                                                                                        "type": "integer"
                                                                                    },
                                                                                    "draws": {
                                                                                        "type": "integer"
                                                                                    }
                                                                                },
                                                                                "required": [
                                                                                    "matched",
                                                                                    "draws"
                                                                                ]
                                                                            }
                                                                        },
                                                                        "leading": {
                                                                            "type": "array",
                                                                            "items": {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                    "matched": {
                                                                                        "type": "integer"
                                                                                    },
                                                                                    "draws": {
                                                                                        "type": "integer"
                                                                                    }
                                                                                },
                                                                                "required": [
                                                                                    "matched",
                                                                                    "draws"
                                                                                ]
                                                                            }
                                                                        },
                                                                        "trailing": {
                                                                            "type": "array",
                                                                            "items": {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                    "matched": {
                                                                                        "type": "integer"
                                                                                    },
                                                                                    "draws": {
                                                                                        "type": "integer"
                                                                                    }
                                                                                },
                                                                                "required": [
                                                                                    "matched",
                                                                                    "draws"
                                                                                ]
                                                                            }
                                                                        }
                                                                    },
                                                                    "required": [
                                                                        "exact",
                                                                        "any_order",
                                                                        "positions",
                                                                        "leading",
                                                                        "trailing"
                                                                    ]
                                                                }
                                                            ]
                                                        },
                                                        "winnings": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "kind",
                                                        "ticket",
                                                        "bonus",
                                                        "refund",
                                                        "bet",
                                                        "min_matched",
                                                        "window",
                                                        "draws_checked",
                                                        "summary",
                                                        "winnings"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "data",
                                                "meta"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Tickets cannot be checked for this lottery yet."
                                        },
                                        "code": {
                                            "type": "string",
                                            "const": "ticket_check_unsupported"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            },
            "post": {
                "operationId": "v1.lotteries.check.batch",
                "description": "Send `tickets` — each `{\"numbers\": [...], \"bonus\": [...]}`, plus\n`bet_type` and `stake` for a fixed-odds game — with the same window as\na single check (`range` or `from`/`to`), and get each ticket's summary:\nhow many draws it matched, and how. The draws themselves are\nlisted by the single-ticket check. Counts as one request. A game with a\nvery long history may need a shorter window for many tickets at once\n(`ticket_check_too_large`).",
                "summary": "Check up to twenty tickets against a game's history at once",
                "tags": [
                    "LotteryTicketCheck"
                ],
                "parameters": [
                    {
                        "name": "lottery",
                        "in": "path",
                        "required": true,
                        "description": "The lottery code",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "tickets": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "minItems": 1,
                                        "maxItems": 20
                                    }
                                },
                                "required": [
                                    "tickets"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {}
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "kind": {
                                                    "type": "string",
                                                    "enum": [
                                                        "digits",
                                                        "numbers"
                                                    ]
                                                },
                                                "window": {
                                                    "type": "object",
                                                    "properties": {
                                                        "from": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "to": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "limited_by_format_change": {
                                                            "type": "boolean"
                                                        },
                                                        "limited_by_plan": {
                                                            "type": "boolean"
                                                        }
                                                    },
                                                    "required": [
                                                        "from",
                                                        "to",
                                                        "limited_by_format_change",
                                                        "limited_by_plan"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "kind",
                                                "window"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/lotteries/{lottery}/wheel": {
            "get": {
                "operationId": "v1.lotteries.wheel",
                "description": "Choose more numbers than a ticket holds and a guarantee: with\n`guarantee=4&if_drawn=5`, whenever 5 of the draw's numbers are among\nyours, at least one ticket holds 4 of them. `if_drawn` defaults to\n`guarantee`. The system plays far fewer tickets than every combination\nof your numbers (`meta.full_system`); it is not always the smallest\nsystem there is, but the guarantee always holds.\n\nThe guarantee is about the main numbers only. `bonus` puts the same\nbonus numbers on every ticket; without it the tickets carry none, and\n`meta.bonus` says what each still needs. `meta.odds.condition_met_one_in`\nis how rarely enough of the draw's numbers fall among yours for the\nguarantee to apply: a system changes which tickets you play, not the\nchance of winning.\n\nThe same request always returns the same tickets. A system too large\nto work out answers 422 `wheel_too_large`; digit games, games drawn\nfrom several drums and races answer 422 `wheel_unsupported`. This route\nhas a per-minute rate of its own, on top of the plan's.",
                "summary": "Build a reduced system (a wheel) on your numbers",
                "tags": [
                    "LotteryWheel"
                ],
                "parameters": [
                    {
                        "name": "lottery",
                        "in": "path",
                        "required": true,
                        "description": "The lottery code",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "numbers",
                        "in": "query",
                        "required": true,
                        "description": "Your numbers, separated by commas: more than a ticket holds, and at most 40.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "size",
                        "in": "query",
                        "description": "How many numbers each ticket holds, within the game's own range (`meta.sizes`). Defaults to the most a ticket may hold.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "guarantee",
                        "in": "query",
                        "required": true,
                        "description": "How many of the drawn numbers one ticket is sure to hold, from 1 to the ticket's size.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "if_drawn",
                        "in": "query",
                        "description": "How many of the draw's numbers must be among yours for the guarantee to apply: from `guarantee` to the draw's count. Defaults to `guarantee`.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "bonus",
                        "in": "query",
                        "description": "The bonus numbers every ticket carries, separated by commas, for a game whose bonus is played separately.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "numbers": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "bonus": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "integer"
                                                        }
                                                    }
                                                },
                                                "required": [
                                                    "numbers",
                                                    "bonus"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "lottery_code": {
                                                    "type": "string"
                                                },
                                                "numbers": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "size": {
                                                    "type": "integer"
                                                },
                                                "sizes": {
                                                    "type": "object",
                                                    "properties": {
                                                        "min": {
                                                            "type": "integer"
                                                        },
                                                        "max": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "min",
                                                        "max"
                                                    ]
                                                },
                                                "pool": {
                                                    "type": "object",
                                                    "properties": {
                                                        "from": {
                                                            "type": "integer"
                                                        },
                                                        "to": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "from",
                                                        "to"
                                                    ]
                                                },
                                                "guarantee": {
                                                    "type": "object",
                                                    "description": "Whenever `if_drawn` of the draw's numbers are among yours, one ticket holds at least `matched` of them.",
                                                    "properties": {
                                                        "matched": {
                                                            "type": "integer"
                                                        },
                                                        "if_drawn": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "matched",
                                                        "if_drawn"
                                                    ]
                                                },
                                                "tickets": {
                                                    "type": "integer"
                                                },
                                                "full_system": {
                                                    "type": "string",
                                                    "description": "Every ticket your numbers make, as a whole number in a string: what playing them all would take."
                                                },
                                                "bonus": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "description": "The bonus a ticket plays separately; null when the game has none.",
                                                    "properties": {
                                                        "size": {
                                                            "type": "integer"
                                                        },
                                                        "from": {},
                                                        "to": {},
                                                        "repeats": {
                                                            "type": "boolean"
                                                        },
                                                        "given": {
                                                            "type": "boolean"
                                                        }
                                                    },
                                                    "required": [
                                                        "size",
                                                        "from",
                                                        "to",
                                                        "repeats",
                                                        "given"
                                                    ]
                                                },
                                                "odds": {
                                                    "type": "object",
                                                    "description": "How rarely, as \"one in\", at least `if_drawn` of a draw's numbers fall among yours.",
                                                    "properties": {
                                                        "condition_met_one_in": {
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "condition_met_one_in"
                                                    ]
                                                },
                                                "max_numbers": {
                                                    "type": "integer",
                                                    "const": 40
                                                }
                                            },
                                            "required": [
                                                "lottery_code",
                                                "numbers",
                                                "size",
                                                "sizes",
                                                "pool",
                                                "guarantee",
                                                "tickets",
                                                "full_system",
                                                "bonus",
                                                "odds",
                                                "max_numbers"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "code": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/stream": {
            "get": {
                "operationId": "v1.stream",
                "description": "A new result reaches an open stream within a few seconds of being\npublished — well inside what \"live\" means for a game that draws every\nfour minutes at best.\n\n`Last-Event-ID` (which the browser resends on reconnect) is honoured,\nso a reconnect resumes rather than replaying or skipping.\n\nOpen streams are capped per account and in total; a connection over the\ncap is refused with 429 and told when to try again.",
                "summary": "Results as they land, as Server-Sent Events",
                "tags": [
                    "Stream"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/webhooks/{webhookEndpoint}/deliveries": {
            "get": {
                "operationId": "v1.webhooks.deliveries",
                "summary": "What this subscription has been sent, newest first. Filterable by\n`filter[status]=dead` — which is the dead-letter list, and the only\nthing most clients ever look at",
                "tags": [
                    "WebhookDelivery"
                ],
                "parameters": [
                    {
                        "name": "webhookEndpoint",
                        "in": "path",
                        "required": true,
                        "description": "The webhook endpoint ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `WebhookDeliveryResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/WebhookDeliveryResource"
                                            }
                                        },
                                        "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"
                    }
                }
            }
        },
        "/webhooks/{webhookEndpoint}/deliveries/{uuid}/replay": {
            "post": {
                "operationId": "v1.webhooks.replay",
                "description": "The uuid is kept, so a receiver that DID process the original still\nrecognises it as the same event and can drop it. Only a delivery that\nis no longer being retried — dead, or already delivered — can be\noffered again.",
                "summary": "Offer a delivery again — the recovery path for a receiver that was\ndown longer than the backoff lasts",
                "tags": [
                    "WebhookDelivery"
                ],
                "parameters": [
                    {
                        "name": "webhookEndpoint",
                        "in": "path",
                        "required": true,
                        "description": "The webhook endpoint ID",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "202": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Webhook delivery queued for another attempt."
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {}
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "This delivery is still being retried and cannot be replayed yet."
                                        },
                                        "code": {
                                            "type": "string",
                                            "const": "delivery_still_retrying"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/webhooks": {
            "get": {
                "operationId": "v1.webhooks.index",
                "summary": "The subscriptions this key holds",
                "tags": [
                    "WebhookEndpoint"
                ],
                "responses": {
                    "200": {
                        "description": "Array of `WebhookEndpointResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/WebhookEndpointResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "v1.webhooks.store",
                "summary": "Subscribe. The signing secret comes back on this response only —\nafterwards it is encrypted at rest and can be rotated but not read",
                "tags": [
                    "WebhookEndpoint"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/StoreWebhookEndpointRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "`WebhookEndpointResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/WebhookEndpointResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/webhooks/{webhookEndpoint}": {
            "get": {
                "operationId": "v1.webhooks.show",
                "summary": "Show one subscription",
                "tags": [
                    "WebhookEndpoint"
                ],
                "parameters": [
                    {
                        "name": "webhookEndpoint",
                        "in": "path",
                        "required": true,
                        "description": "The webhook endpoint ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`WebhookEndpointResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/WebhookEndpointResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            },
            "patch": {
                "operationId": "v1.webhooks.update",
                "summary": "Change what a subscription listens to, or switch it back on after it\nwas disabled for being unreachable",
                "tags": [
                    "WebhookEndpoint"
                ],
                "parameters": [
                    {
                        "name": "webhookEndpoint",
                        "in": "path",
                        "required": true,
                        "description": "The webhook endpoint ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/UpdateWebhookEndpointRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`WebhookEndpointResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/WebhookEndpointResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            },
            "delete": {
                "operationId": "v1.webhooks.destroy",
                "summary": "Unsubscribe for good, taking the delivery history with it",
                "tags": [
                    "WebhookEndpoint"
                ],
                "parameters": [
                    {
                        "name": "webhookEndpoint",
                        "in": "path",
                        "required": true,
                        "description": "The webhook endpoint ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Webhook subscription removed."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/webhooks/{webhookEndpoint}/rotate-secret": {
            "post": {
                "operationId": "v1.webhooks.rotate-secret",
                "summary": "Replace the signing secret, returning the new one once. The old one\nstops verifying immediately — rotate when it has leaked, not on a\nschedule",
                "tags": [
                    "WebhookEndpoint"
                ],
                "parameters": [
                    {
                        "name": "webhookEndpoint",
                        "in": "path",
                        "required": true,
                        "description": "The webhook endpoint ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`WebhookEndpointResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/WebhookEndpointResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        },
        "/webhooks/{webhookEndpoint}/test": {
            "post": {
                "operationId": "v1.webhooks.test",
                "summary": "Send the receiver a signed `webhook.ping` now and answer with what it\ndid. Nothing is logged and the failure streak is untouched: a test is\nfor whoever is looking at the result",
                "tags": [
                    "WebhookEndpoint"
                ],
                "parameters": [
                    {
                        "name": "webhookEndpoint",
                        "in": "path",
                        "required": true,
                        "description": "The webhook endpoint ID",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`WebhookTestResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/WebhookTestResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "http": {
                "type": "http",
                "scheme": "bearer"
            }
        },
        "schemas": {
            "ContinentResource": {
                "type": "object",
                "properties": {
                    "code": {
                        "type": "string"
                    },
                    "name": {
                        "type": "array",
                        "items": {}
                    }
                },
                "required": [
                    "code",
                    "name"
                ],
                "title": "ContinentResource"
            },
            "CountryResource": {
                "type": "object",
                "properties": {
                    "code": {
                        "type": "string"
                    },
                    "name": {
                        "type": "array",
                        "items": {}
                    },
                    "continent": {
                        "$ref": "#/components/schemas/ContinentResource"
                    }
                },
                "required": [
                    "code",
                    "name"
                ],
                "title": "CountryResource"
            },
            "DigitTicketMatchResource": {
                "type": "object",
                "properties": {
                    "draw_id": {
                        "type": "integer",
                        "description": "The draw, as served by `/v1/draws/{id}`."
                    },
                    "drawn_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "numbers": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "exact": {
                        "type": "boolean",
                        "description": "The same digits in the same order."
                    },
                    "any_order": {
                        "type": "boolean",
                        "description": "The same digits in any order."
                    },
                    "positions_matched": {
                        "type": "integer",
                        "description": "Digits equal position by position."
                    },
                    "leading_matched": {
                        "type": "integer",
                        "description": "Equal digits in a row from the first position, and from the last."
                    },
                    "trailing_matched": {
                        "type": "integer"
                    },
                    "prize_status": {
                        "description": "For a ticket checked with a `bet_type`: `won` with what the\npayout table paid that bet at the stake, `not_won`, or\n`unknown`. Without a bet there is nothing to price: `unknown`.",
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "string",
                                "enum": [
                                    "unknown"
                                ]
                            }
                        ]
                    },
                    "prize": {
                        "type": "string"
                    }
                },
                "required": [
                    "draw_id",
                    "drawn_at",
                    "numbers",
                    "exact",
                    "any_order",
                    "positions_matched",
                    "leading_matched",
                    "trailing_matched",
                    "prize_status",
                    "prize"
                ],
                "title": "DigitTicketMatchResource"
            },
            "DrawChangeResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "Increases with every entry."
                    },
                    "kind": {
                        "type": "string",
                        "description": "`published`, `updated`, `revised` or `deleted`.",
                        "enum": [
                            "published",
                            "updated",
                            "revised",
                            "deleted"
                        ]
                    },
                    "changed_at": {
                        "type": "string"
                    },
                    "draw_id": {
                        "type": "integer"
                    },
                    "fields": {
                        "type": "array",
                        "description": "The public fields the change touched; `prizes` for the prize\ncategories. Empty for a publication or a deletion.",
                        "items": {}
                    },
                    "draw": {
                        "anyOf": [
                            {
                                "description": "The draw as it stands now. Null once it has been deleted.",
                                "$ref": "#/components/schemas/DrawResource"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    }
                },
                "required": [
                    "id",
                    "kind",
                    "changed_at",
                    "draw_id",
                    "fields",
                    "draw"
                ],
                "title": "DrawChangeResource"
            },
            "DrawPrizeResource": {
                "type": "object",
                "properties": {
                    "tier": {
                        "type": "integer",
                        "description": "The category's rank as the operator publishes it, 1 being the\ntop prize."
                    },
                    "match_rule": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "What had to be matched to win the category, in the operator's\nown notation."
                    },
                    "winners_count": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "prize_per_winner": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "prize_total": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "What the category's winners were paid between them, as the\noperator published it. Null when it published no total, and\nalways null on a category nobody won: the pot such a category\nwas played for is `rollover_amount` when it carried."
                    },
                    "paid_as": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "Null for a lump sum. For a category paid as an annuity,\n`prize_per_winner` is the payment per `per` (`day`, `week`,\n`month`, `year`), for `years` years, or for life when `years`\nis null.",
                        "properties": {
                            "per": {
                                "type": "string",
                                "enum": [
                                    "day",
                                    "week",
                                    "month",
                                    "year"
                                ]
                            },
                            "years": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            }
                        },
                        "required": [
                            "per",
                            "years"
                        ]
                    },
                    "rollover_amount": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "What the category carried into the next draw because nobody\nwon it."
                    },
                    "is_parimutuel": {
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "description": "Whether this category splits a pool between its winners or pays\na fixed amount. Null when the operator does not say. It is a\nproperty of the category, not of the game: the same draw can\ncarry both."
                    },
                    "is_rollover": {
                        "type": "boolean",
                        "description": "True when the category had no winner and rolled over."
                    },
                    "is_jackpot": {
                        "type": "boolean"
                    }
                },
                "required": [
                    "tier",
                    "match_rule",
                    "winners_count",
                    "prize_per_winner",
                    "prize_total",
                    "paid_as",
                    "rollover_amount",
                    "is_parimutuel",
                    "is_rollover",
                    "is_jackpot"
                ],
                "title": "DrawPrizeResource"
            },
            "DrawResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "lottery_code": {
                        "type": "string"
                    },
                    "numbers": {
                        "type": "array",
                        "items": {}
                    },
                    "sorted_numbers": {
                        "type": "array",
                        "items": {}
                    },
                    "bonus_numbers": {
                        "type": "array",
                        "items": {}
                    },
                    "refund_number": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "The first refund digit, or null. Use `refund_numbers`, which carries every refund digit a draw makes. This field keeps only the first.",
                        "deprecated": true
                    },
                    "refund_numbers": {
                        "type": "array",
                        "description": "Every refund digit (0-9) the draw made apart from its numbers and\nits bonus, in the operator's order: the reintegro that returns\nthe stake. One for La Primitiva, Bonoloto and Lototurf; three for\nLotería Nacional (the first prize's last figure, then two special\nextractions). Empty for every other game.",
                        "items": {
                            "type": "integer"
                        }
                    },
                    "multiplier": {
                        "description": "The multiplier drawn with the result, exactly: a whole number\n(2, 3) or a fractional face such as BC Keno's 1.5; 0 when the\ngame draws none.",
                        "type": "number"
                    },
                    "jackpot_amount": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Null means no amount was reported for this draw, which is not\nthe same as a draw that paid nothing — that is a zero."
                    },
                    "next_jackpot_amount": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "jackpot_amount_eur": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The two amounts above in euros and in US dollars, at the\nofficial rates of the draw's day. Null when the amount is null\nor zero, or when no official rate covers that day."
                    },
                    "jackpot_amount_usd": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "next_jackpot_amount_eur": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "next_jackpot_amount_usd": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "exchange_rate": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "The rates they were converted at: units of `currency` for one\neuro and for one US dollar, as published on `date`.",
                        "properties": {
                            "eur": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "usd": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "date": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "eur",
                            "usd",
                            "date"
                        ]
                    },
                    "currency": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The ISO 4217 code every amount on this draw is in, prize\ncategories included. A game's older results can predate a\ncurrency change in its country (ROL before RON), so it belongs\nto the draw rather than to the lottery."
                    },
                    "timezone": {
                        "type": "string"
                    },
                    "drawn_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "scheduled_at": {
                        "type": "string"
                    },
                    "next_draw_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "revised_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "When the numbers or the draw time were last corrected after\npublication; null for a result never corrected."
                    },
                    "provisional": {
                        "type": "boolean",
                        "description": "True while the result was read live from the draw's broadcast\nand the operator has not published it yet. It turns false, with\n`confirmed_at` set, when the operator's own publication confirms\nit; a live result the operator contradicts is corrected and\nannounced as a revision."
                    },
                    "broadcaster": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "\"TV\" while the result is provisional, read off the draw's\nbroadcast; null once the operator confirms it, and for every\nresult that was never provisional."
                    },
                    "confirmed_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "When the operator's publication confirmed a result first\npublished live; null for a result that was never provisional."
                    },
                    "prizes_status": {
                        "description": "Why the list below is empty, when it is: `published` when the\ncategories are here, `pending` while the operator has not put\nthem out yet, `not_applicable` for a game that pays fixed odds\non the ticket and therefore never publishes them per draw, and\n`not_tracked` for a game whose categories are not available.",
                        "$ref": "#/components/schemas/PrizesStatus"
                    },
                    "prizes": {
                        "type": "array",
                        "description": "The prize categories the operator published for this draw, top\nprize first. Always served by the single-draw endpoint; ask for\n`include=prizes` to get them in the feed.",
                        "items": {
                            "$ref": "#/components/schemas/DrawPrizeResource"
                        }
                    }
                },
                "required": [
                    "id",
                    "numbers",
                    "sorted_numbers",
                    "bonus_numbers",
                    "refund_number",
                    "refund_numbers",
                    "multiplier",
                    "jackpot_amount",
                    "next_jackpot_amount",
                    "jackpot_amount_eur",
                    "jackpot_amount_usd",
                    "next_jackpot_amount_eur",
                    "next_jackpot_amount_usd",
                    "exchange_rate",
                    "timezone",
                    "drawn_at",
                    "scheduled_at",
                    "next_draw_at",
                    "revised_at",
                    "provisional",
                    "broadcaster",
                    "confirmed_at",
                    "prizes_status"
                ],
                "title": "DrawResource"
            },
            "DrawRevisionResource": {
                "type": "object",
                "properties": {
                    "revised_at": {
                        "type": "string"
                    },
                    "fields": {
                        "type": "array",
                        "items": {}
                    },
                    "before": {
                        "description": "The corrected fields' values before and after, keyed by field.",
                        "type": [
                            "array",
                            "string"
                        ]
                    },
                    "after": {
                        "type": [
                            "array",
                            "string"
                        ]
                    }
                },
                "required": [
                    "revised_at",
                    "fields",
                    "before",
                    "after"
                ],
                "title": "DrawRevisionResource"
            },
            "DrawScheduleResource": {
                "type": "object",
                "properties": {
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "When the game draws, written out in the language the request\nasked for. Null for the rare schedule too irregular to state\nin one sentence — read the occurrences instead."
                    },
                    "timezone": {
                        "type": "string",
                        "description": "The IANA zone the times above are wall-clock times in."
                    }
                },
                "required": [
                    "description",
                    "timezone"
                ],
                "title": "DrawScheduleResource"
            },
            "ExportFormat": {
                "type": "string",
                "description": "The file formats a bulk export is written in. Both are gzip-compressed text, one draw per line (CSV after its header row).\n",
                "enum": [
                    "csv",
                    "ndjson"
                ],
                "title": "ExportFormat"
            },
            "ExportResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "status": {
                        "description": "`building` while the file is written, `ready` while it can be\ndownloaded, `expired` once the file is gone, `failed` when it\ncould not be written (it does not count against the month).",
                        "$ref": "#/components/schemas/ExportStatus"
                    },
                    "format": {
                        "$ref": "#/components/schemas/ExportFormat"
                    },
                    "lottery_code": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "as_of": {
                        "type": "string",
                        "description": "Draws held after this moment are not in the file."
                    },
                    "rows": {
                        "type": "integer",
                        "description": "Rows written so far; the total once the export is ready."
                    },
                    "size_bytes": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "The size of the compressed file, once ready."
                    },
                    "sha256": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "SHA-256 of the compressed file as served, to check a download."
                    },
                    "download_url": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "A link to the gzip file, valid until `expires_at`; no API key is\nneeded to follow it, so treat it as a secret. Null until ready."
                    },
                    "downloads": {
                        "type": "integer"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "ready_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "expires_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "status",
                    "format",
                    "lottery_code",
                    "as_of",
                    "rows",
                    "size_bytes",
                    "sha256",
                    "download_url",
                    "downloads",
                    "created_at",
                    "ready_at",
                    "expires_at"
                ],
                "title": "ExportResource"
            },
            "ExportStatus": {
                "type": "string",
                "description": "Where a bulk export stands: being written, ready to download until it expires, gone, or failed. A failed export does not count against the month's allowance; the client did nothing wrong.\n",
                "enum": [
                    "building",
                    "ready",
                    "expired",
                    "failed"
                ],
                "title": "ExportStatus"
            },
            "JackpotSnapshotResource": {
                "type": "object",
                "properties": {
                    "draw_at": {
                        "type": "string",
                        "description": "The draw the figure was announced for."
                    },
                    "amount": {
                        "type": "string"
                    },
                    "currency": {
                        "type": "string"
                    },
                    "basis": {
                        "type": "string",
                        "description": "`announced` is the operator's estimate, `guaranteed` an amount it\ncommits to, `rollover` only the pot carried over unwon — a floor\nfor the prize rather than the prize.",
                        "enum": [
                            "announced",
                            "guaranteed",
                            "rollover"
                        ]
                    },
                    "first_observed_at": {
                        "type": "string",
                        "description": "When this figure was first published, and when it was last\nconfirmed unchanged."
                    },
                    "last_observed_at": {
                        "type": "string"
                    }
                },
                "required": [
                    "draw_at",
                    "amount",
                    "currency",
                    "basis",
                    "first_observed_at",
                    "last_observed_at"
                ],
                "title": "JackpotSnapshotResource"
            },
            "JurisdictionComplianceResource": {
                "type": "object",
                "properties": {
                    "jurisdiction": {
                        "type": "string",
                        "description": "ISO 3166 code: `RO` for a country, `US-TX` for a state or province."
                    },
                    "type": {
                        "type": "string",
                        "enum": [
                            "state",
                            "country"
                        ]
                    },
                    "name": {
                        "type": "string"
                    },
                    "minimum_age": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The age to buy a ticket in a shop, and online when it differs."
                    },
                    "minimum_age_online": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "regulator": {
                        "type": "string",
                        "description": "The authority that licenses and supervises the lottery: {name, url}."
                    },
                    "operators": {
                        "type": "string",
                        "description": "Who runs the lottery here: [{name, url, licence}]."
                    },
                    "responsible_gambling": {
                        "type": "string",
                        "description": "Help lines and programmes: [{name, url, phone}]."
                    },
                    "winnings_tax": {
                        "type": "string",
                        "description": "`tax_free` for residents, and each level that taxes a prize:\n{level, rate_percent, threshold, currency, withheld_at_source, applies_to, note}."
                    },
                    "claim_period_days": {
                        "type": "string",
                        "description": "How long a winner has to claim, in days from the draw."
                    },
                    "claim_period_note": {
                        "type": "string"
                    },
                    "online_sales": {
                        "type": "string",
                        "description": "`yes`, `no` or `partial`."
                    },
                    "online_sales_note": {
                        "type": "string"
                    },
                    "official_apps": {
                        "type": "string",
                        "description": "The operator's own apps: [{platform, url}]."
                    },
                    "couriers": {
                        "type": "string",
                        "description": "Ticket courier services: `permitted`, `prohibited`, `not_regulated` or `unknown`."
                    },
                    "couriers_note": {
                        "type": "string"
                    },
                    "affiliates": {
                        "type": "string",
                        "description": "Third parties promoting the lottery for commission:\n`permitted`, `restricted`, `prohibited` or `unknown`."
                    },
                    "affiliates_note": {
                        "type": "string"
                    },
                    "sources": {
                        "type": "string",
                        "description": "Where each fact was read: [{field, url, official}]."
                    },
                    "notes": {
                        "type": "string"
                    },
                    "verified_at": {
                        "type": "string",
                        "description": "The day the facts were last checked against their sources."
                    }
                },
                "required": [
                    "jurisdiction",
                    "type",
                    "name",
                    "minimum_age",
                    "minimum_age_online",
                    "regulator",
                    "operators",
                    "responsible_gambling",
                    "winnings_tax",
                    "claim_period_days",
                    "claim_period_note",
                    "online_sales",
                    "online_sales_note",
                    "official_apps",
                    "couriers",
                    "couriers_note",
                    "affiliates",
                    "affiliates_note",
                    "sources",
                    "notes",
                    "verified_at"
                ],
                "title": "JurisdictionComplianceResource"
            },
            "LotteryDataQualityResource": {
                "type": "object",
                "properties": {
                    "computed_at": {
                        "type": "string"
                    },
                    "window": {
                        "type": "object",
                        "description": "The draw times the figures below cover.",
                        "properties": {
                            "from": {
                                "type": "string"
                            },
                            "to": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "from",
                            "to"
                        ]
                    },
                    "completeness": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "Null for a game with no fixed schedule to count draws against.\n`percent` is published over the draws actually held, so a draw\nthe operator cancelled does not count against it.",
                        "properties": {
                            "expected_draws": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            },
                            "published_draws": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            },
                            "not_held_draws": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            },
                            "missing_draws": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            },
                            "percent": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        },
                        "required": [
                            "expected_draws",
                            "published_draws",
                            "not_held_draws",
                            "missing_draws",
                            "percent"
                        ]
                    },
                    "latency": {
                        "type": "object",
                        "description": "Seconds from a draw's scheduled time to its result being\navailable here, over the draws published as they happened.\nNegative when an operator publishes ahead of its own schedule.",
                        "properties": {
                            "measured_draws": {
                                "type": "integer"
                            },
                            "p50_seconds": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            },
                            "p90_seconds": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            },
                            "max_seconds": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            }
                        },
                        "required": [
                            "measured_draws",
                            "p50_seconds",
                            "p90_seconds",
                            "max_seconds"
                        ]
                    }
                },
                "required": [
                    "computed_at",
                    "window",
                    "completeness",
                    "latency"
                ],
                "title": "LotteryDataQualityResource"
            },
            "LotteryFreshnessResource": {
                "type": "object",
                "properties": {
                    "status": {
                        "type": "string",
                        "description": "`current`, `awaiting`, `overdue`, or `unscheduled` for a game\nwith no schedule its results can be held to (no fixed calendar,\nnot launched yet, or paused) and nothing flagged as missing.",
                        "enum": [
                            "current",
                            "awaiting",
                            "overdue",
                            "unscheduled"
                        ]
                    },
                    "paused": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "Set while the operator publishes no results, as on the lottery.",
                        "properties": {
                            "since": {
                                "type": "string"
                            },
                            "reason": {
                                "type": "string",
                                "const": "operator_not_publishing"
                            }
                        },
                        "required": [
                            "since",
                            "reason"
                        ]
                    },
                    "awaited_draw_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The scheduled draw whose result is still awaited — the oldest\none when several are overdue. Null while the game is current."
                    },
                    "last_updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The last time a result of this game was published or corrected\nhere — not the time of its last draw."
                    },
                    "latest_result": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "drawn_at": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "published_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "When the result became available here."
                            },
                            "delay_seconds": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "description": "Seconds from the draw's scheduled time to `published_at`;\nnull for a result recovered from an archive."
                            },
                            "revised_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "When this result was last corrected; null if never."
                            }
                        },
                        "required": [
                            "id",
                            "drawn_at",
                            "published_at",
                            "delay_seconds",
                            "revised_at"
                        ]
                    },
                    "typical_delay_seconds": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "The median delay over the last 30 days, from the data-quality\nfigures; null for a game not measured yet."
                    },
                    "revisions": {
                        "type": "object",
                        "description": "Results corrected after publication: the most recent correction,\nand how many results were corrected within `window_days`.",
                        "properties": {
                            "last_revised_at": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "recent_count": {
                                "type": "integer"
                            },
                            "window_days": {
                                "type": "integer",
                                "const": 30
                            }
                        },
                        "required": [
                            "last_revised_at",
                            "recent_count",
                            "window_days"
                        ]
                    }
                },
                "required": [
                    "status",
                    "paused",
                    "awaited_draw_at",
                    "last_updated_at",
                    "latest_result",
                    "typical_delay_seconds",
                    "revisions"
                ],
                "title": "LotteryFreshnessResource"
            },
            "LotteryHistoryResource": {
                "type": "object",
                "properties": {
                    "from": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The first draw on record for the game. Statistics over all time\nare counted from here."
                    },
                    "to": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "The last draw on record, as of the daily update — for a sandbox\nkey, capped at its `history_until`."
                    },
                    "complete": {
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "description": "Whether the stretch holds at least 99.5% of the draws the game's\ncalendar held, draws the operator cancelled not counted. Null\nfor a game drawn on irregular days, which has no calendar to\nmeasure it against, and for one not measured yet."
                    },
                    "completeness_pct": {
                        "type": [
                            "number",
                            "null"
                        ]
                    },
                    "source": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "`official` when most of the results come from the operator\nitself, `secondary` when most were read from a publisher of\nthe operator's results because the operator's own cannot be.",
                        "enum": [
                            "official",
                            "secondary",
                            null
                        ]
                    }
                },
                "required": [
                    "from",
                    "to",
                    "complete",
                    "completeness_pct",
                    "source"
                ],
                "title": "LotteryHistoryResource"
            },
            "LotteryPayoutResource": {
                "type": "object",
                "properties": {
                    "bet_type": {
                        "type": "string",
                        "description": "What was bet on, in the operator's own vocabulary."
                    },
                    "selection_size": {
                        "type": "integer",
                        "description": "How many numbers the ticket played, and how many it matched.\nZero means the bet type already determines it."
                    },
                    "match_count": {
                        "type": "integer"
                    },
                    "option": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "An add-on that changes the table rather than the draw."
                    },
                    "payout_amount": {
                        "type": "string",
                        "description": "What the row pays for `stake_amount` staked."
                    },
                    "paid_as": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "Null for a lump sum. For a prize paid as an annuity,\n`payout_amount` is the payment per `per` (`day`, `week`,\n`month`, `year`), for `years` years, or for life when `years`\nis null.",
                        "properties": {
                            "per": {
                                "type": "string",
                                "enum": [
                                    "day",
                                    "week",
                                    "month",
                                    "year"
                                ]
                            },
                            "years": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            }
                        },
                        "required": [
                            "per",
                            "years"
                        ]
                    },
                    "stake_amount": {
                        "type": "string"
                    },
                    "currency": {
                        "type": "string"
                    },
                    "is_gross": {
                        "type": "boolean",
                        "description": "True when the amount is before the withholdings the\njurisdiction applies at payment."
                    },
                    "effective_from": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "effective_to": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "bet_type",
                    "selection_size",
                    "match_count",
                    "option",
                    "payout_amount",
                    "paid_as",
                    "stake_amount",
                    "currency",
                    "is_gross",
                    "effective_from",
                    "effective_to"
                ],
                "title": "LotteryPayoutResource"
            },
            "LotteryResource": {
                "type": "object",
                "properties": {
                    "code": {
                        "type": "string"
                    },
                    "slug": {
                        "type": "string",
                        "description": "The game's address on lottevo.com, built from where it is\nplayed and its name. Stable once published."
                    },
                    "name": {
                        "type": "array",
                        "items": {}
                    },
                    "names": {
                        "type": "array",
                        "description": "The game's name in each language its operator publishes it in,\nkeyed by ISO 639-1 code. A brand is never translated: a\nlanguage appears here only where the operator itself uses it.",
                        "items": {}
                    },
                    "display_name": {
                        "type": "string"
                    },
                    "short_description": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "What is drawn and when, in a sentence or two."
                    },
                    "description": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "system": {
                        "type": "string"
                    },
                    "currency": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "ISO 4217 code every amount this lottery reports is in. Null\nwhen it has not been established for the game yet."
                    },
                    "numbers": {
                        "type": "object",
                        "properties": {
                            "pool": {
                                "type": "integer"
                            },
                            "drawn": {
                                "type": "integer"
                            },
                            "bonus_drawn": {
                                "type": "integer"
                            }
                        },
                        "required": [
                            "pool",
                            "drawn",
                            "bonus_drawn"
                        ]
                    },
                    "timezone": {
                        "type": "string"
                    },
                    "url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "logo_url": {
                        "type": "null"
                    },
                    "logos": {
                        "type": "array",
                        "description": "The logo in several renditions, present once the artwork has been\nconfirmed: `original` as the operator publishes it, `square`\nand `wide` fitted onto fixed canvases so a row of games lines up,\nand `compact`, the original's own shape as a small PNG.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "logo_background": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "What the logo needs behind it: `needs_dark` for an all-white\nmark, `needs_light` for an all-black one, `any` otherwise.",
                        "enum": [
                            "any",
                            "needs_light",
                            "needs_dark",
                            null
                        ]
                    },
                    "brand_color": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "brand_text_color": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Black or white, whichever reads best on `brand_color`, and the\nWCAG contrast between the two."
                    },
                    "brand_contrast_ratio": {
                        "type": [
                            "number",
                            "null"
                        ]
                    },
                    "ball_colors": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "description": "The colours the balls are drawn in, as number ranges per pool:\n`{\"main\": [{\"from\", \"to\", \"color\"}], \"bonus\": [...]}`; null\nwhen the game's balls carry no official colour. Optional\n`by_position` (`{\"bonus\": [\"#ff0000\", ...]}`) colours the n-th\nball a pool draws, whatever its number, and wins over a range.\nOptional `paired_with` (`{\"main\": \"bonus\"}`) gives the n-th\nball of the first pool the colour the n-th ball of the second\nmaps to; it needs the draw order (`numbers`, not `sorted_numbers`).",
                        "items": {}
                    },
                    "prize_model": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "How this game's prizes are determined: `parimutuel` splits a\npool between winners and publishes categories per draw, `fixed`\npays on the ticket and publishes a payout table instead,\n`mixed` does both, and null means it has not been established."
                    },
                    "odds": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "The odds of the top prize on one play, as \"1 in `jackpot_one_in`\".\n`basis` is `published` when the figure is the operator's own and\n`computed` when it is worked out of the matrix. Null for games\nwith no single top prize, such as keno, where it depends on how\nmany numbers are played.",
                        "properties": {
                            "jackpot_one_in": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            },
                            "basis": {
                                "anyOf": [
                                    {
                                        "$ref": "#/components/schemas/OddsBasis"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            }
                        },
                        "required": [
                            "jackpot_one_in",
                            "basis"
                        ]
                    },
                    "ticket": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "What one play costs and when sales close, as the operator\nstates them. `price.lines` is how many lines that price buys\n(some games are sold only in bundles); a game sold in several\ncountries adds `prices_by_country`. `sales_close` gives the\nminutes before the draw and/or the local clock time.",
                        "properties": {
                            "price": {},
                            "prices_by_country": {},
                            "min_lines": {},
                            "add_ons": {},
                            "sales_close": {}
                        },
                        "required": [
                            "price",
                            "prices_by_country",
                            "min_lines",
                            "add_ons",
                            "sales_close"
                        ]
                    },
                    "ticket_check": {
                        "type": "object",
                        "description": "What `/check` takes for this game: `kind` is `numbers` (a set\nfrom the pool, any order) or `digits` (one per position, in\norder), null when its tickets cannot be checked yet; `bonus` says\nwhether a ticket carries bonus numbers of its own; `refund` whether\nit carries a refund digit (the Spanish reintegro); `bet_types`\nare the fixed-odds bets a ticket can be priced at, served\nwherever `payouts` is.",
                        "properties": {
                            "kind": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "enum": [
                                    "numbers",
                                    "digits",
                                    null
                                ]
                            },
                            "bonus": {
                                "type": "boolean"
                            },
                            "refund": {
                                "type": "boolean"
                            },
                            "bet_types": {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                }
                            }
                        },
                        "required": [
                            "kind",
                            "bonus",
                            "refund"
                        ]
                    },
                    "statistics": {
                        "type": "object",
                        "description": "Which statistics this game can be counted for: `distributions`\nis false for bingo-style games, whose count of numbers is the\nresult, and for games drawn from several drums — asking for\nthem there answers 422 `distributions_unsupported`.",
                        "properties": {
                            "distributions": {
                                "type": "boolean"
                            }
                        },
                        "required": [
                            "distributions"
                        ]
                    },
                    "tools": {
                        "type": "object",
                        "description": "Which ticket tools take this game: `generate` is false for\nbingo-style games, games drawn from several drums and races;\n`wheel` only holds where a ticket is a set of different numbers,\nso digit games are left out too. Elsewhere those routes answer\n422 `generator_unsupported` and `wheel_unsupported`.",
                        "properties": {
                            "generate": {
                                "type": "boolean"
                            },
                            "wheel": {
                                "type": "boolean"
                            }
                        },
                        "required": [
                            "generate",
                            "wheel"
                        ]
                    },
                    "started_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "next_draw_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "paused": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "Set while the operator publishes no results, null otherwise.\n`since` is when publishing stopped; no draw is missed meanwhile.",
                        "properties": {
                            "since": {
                                "type": "string"
                            },
                            "reason": {
                                "type": "string",
                                "const": "operator_not_publishing"
                            }
                        },
                        "required": [
                            "since",
                            "reason"
                        ]
                    },
                    "upcoming": {
                        "type": "object",
                        "description": "The next draw and what its top prize is announced to be.",
                        "properties": {
                            "draw_at": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "jackpot": {
                                "type": [
                                    "object",
                                    "null"
                                ],
                                "properties": {
                                    "amount": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "currency": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "amount_eur": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "The amount in euros and in US dollars at today's official\nrates; null when no official rate covers the currency."
                                    },
                                    "amount_usd": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "basis": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "What kind of figure it is: `announced` (the operator's\nadvertised amount, an estimate on a pool game),\n`guaranteed`, or `rollover` (only the unwon pot carried\nover — the prize will be at least this).",
                                        "enum": [
                                            "announced",
                                            "guaranteed",
                                            "rollover",
                                            null
                                        ]
                                    },
                                    "paid_as": {
                                        "type": [
                                            "object",
                                            "null"
                                        ],
                                        "description": "Null for a lump sum. For a top prize paid as an annuity\n(Chau Chamba: \"S/ 5,000 a month for 20 years\"), `amount` is\nthe payment per `per` (`day`, `week`, `month`, `year`),\nfor `years` years, or for life when `years` is null.",
                                        "properties": {
                                            "per": {
                                                "type": "string",
                                                "enum": [
                                                    "day",
                                                    "week",
                                                    "month",
                                                    "year"
                                                ]
                                            },
                                            "years": {
                                                "type": [
                                                    "integer",
                                                    "null"
                                                ]
                                            }
                                        },
                                        "required": [
                                            "per",
                                            "years"
                                        ]
                                    },
                                    "draw_at": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "observed_at": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    }
                                },
                                "required": [
                                    "amount",
                                    "currency",
                                    "amount_eur",
                                    "amount_usd",
                                    "basis",
                                    "paid_as",
                                    "draw_at",
                                    "observed_at"
                                ]
                            },
                            "jackpot_status": {
                                "type": "string",
                                "const": "delayed"
                            }
                        },
                        "required": [
                            "draw_at",
                            "jackpot",
                            "jackpot_status"
                        ]
                    },
                    "history": {
                        "description": "The stretch of past results on record for the game, how\ncomplete it is and what kind of source it comes from. Updated\ndaily.",
                        "$ref": "#/components/schemas/LotteryHistoryResource"
                    },
                    "continent": {
                        "description": "The canonical home of the game. Null country/state is normal,\nnot missing data: a multi-country game has no single owner.",
                        "$ref": "#/components/schemas/ContinentResource"
                    },
                    "country": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/CountryResource"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "state": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/StateResource"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "available_in": {
                        "type": "object",
                        "description": "Where the game can be played: a superset of the canonical\nlocation for the multi-country games.",
                        "properties": {
                            "continents": {
                                "type": "object",
                                "additionalProperties": {}
                            },
                            "countries": {
                                "type": "object",
                                "additionalProperties": {}
                            },
                            "states": {
                                "type": "object",
                                "additionalProperties": {}
                            }
                        },
                        "required": [
                            "continents",
                            "countries",
                            "states"
                        ]
                    },
                    "schedules": {
                        "description": "Empty for a game that draws on irregular days: what it is\nstored with is when results are looked for, not a timetable.",
                        "anyOf": [
                            {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                },
                                "minItems": 0,
                                "maxItems": 0
                            },
                            {
                                "type": "array",
                                "items": {
                                    "$ref": "#/components/schemas/DrawScheduleResource"
                                }
                            }
                        ]
                    },
                    "latest_draw": {
                        "$ref": "#/components/schemas/DrawResource"
                    },
                    "draws": {
                        "type": "array",
                        "description": "The game's last results, newest first, capped at the 25 every\nlist on this API stops at. Served with the game itself; ask for\n`include=draws` to get them in the catalogue listing.",
                        "items": {
                            "$ref": "#/components/schemas/DrawResource"
                        }
                    },
                    "payouts": {
                        "type": "array",
                        "description": "The payout table of a fixed-odds game: what a ticket wins,\nindependent of any draw. Empty for a game that splits a pool\ninstead — its money is on the draws.",
                        "items": {
                            "$ref": "#/components/schemas/LotteryPayoutResource"
                        }
                    }
                },
                "required": [
                    "code",
                    "slug",
                    "name",
                    "names",
                    "display_name",
                    "short_description",
                    "system",
                    "currency",
                    "numbers",
                    "timezone",
                    "url",
                    "logo_url",
                    "brand_color",
                    "brand_text_color",
                    "brand_contrast_ratio",
                    "ball_colors",
                    "prize_model",
                    "odds",
                    "ticket",
                    "ticket_check",
                    "statistics",
                    "tools",
                    "started_at",
                    "next_draw_at",
                    "paused",
                    "upcoming",
                    "history"
                ],
                "title": "LotteryResource"
            },
            "OddsBasis": {
                "type": "string",
                "description": "Where a game's published odds come from, so a client can tell the operator's own figure from one worked out of the matrix.\n| |\n|---|\n| `published` <br/> Printed by the operator on its own odds or rules page. |\n| `computed` <br/> Computed from the game's matrix where the operator prints none. |",
                "enum": [
                    "published",
                    "computed"
                ],
                "title": "OddsBasis"
            },
            "PrizesStatus": {
                "type": "string",
                "description": "Why a draw's prize list looks the way it does. An empty list means four different things, and a client cannot act on it without being told which: the categories are here, they are coming, they are not available for this game, or they will never exist because the game pays fixed odds on the ticket rather than splitting a pool.\n",
                "enum": [
                    "published",
                    "pending",
                    "not_tracked",
                    "not_applicable"
                ],
                "title": "PrizesStatus"
            },
            "StateResource": {
                "type": "object",
                "properties": {
                    "code": {
                        "type": "string"
                    },
                    "name": {
                        "type": "array",
                        "items": {}
                    },
                    "country": {
                        "$ref": "#/components/schemas/CountryResource"
                    }
                },
                "required": [
                    "code",
                    "name"
                ],
                "title": "StateResource"
            },
            "StoreExportRequest": {
                "type": "object",
                "properties": {
                    "format": {
                        "type": "string",
                        "enum": [
                            "csv",
                            "ndjson"
                        ]
                    },
                    "lottery": {
                        "type": "string"
                    }
                },
                "required": [
                    "format",
                    "lottery"
                ],
                "title": "StoreExportRequest"
            },
            "StoreWebhookEndpointRequest": {
                "type": "object",
                "properties": {
                    "url": {
                        "type": "string",
                        "format": "uri",
                        "maxLength": 2048
                    },
                    "events": {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "enum": [
                                "draw.published",
                                "draw.revised",
                                "jackpot.updated",
                                "draw.missed",
                                "draw.confirmed",
                                "lottery.paused",
                                "lottery.resumed"
                            ]
                        },
                        "minItems": 1
                    },
                    "lottery_codes": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "maxItems": 200
                    }
                },
                "required": [
                    "url",
                    "events"
                ],
                "title": "StoreWebhookEndpointRequest"
            },
            "TicketMatchResource": {
                "type": "object",
                "properties": {
                    "draw_id": {
                        "type": "integer",
                        "description": "The draw, as served by `/v1/draws/{id}`."
                    },
                    "drawn_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "numbers": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "bonus_numbers": {
                        "type": "array",
                        "items": {}
                    },
                    "matched_count": {
                        "type": "integer",
                        "description": "How many of the ticket's numbers the draw contained, and which."
                    },
                    "matched_numbers": {
                        "type": "string"
                    },
                    "bonus_matched": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Bonus numbers hit: the ticket's own bonus for a separately drawn\none, its main numbers for an extra ball of the main drum. Null\nwhere the game or the ticket has no bonus to compare."
                    },
                    "matched_bonus_numbers": {
                        "type": "string"
                    },
                    "refund_number": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "The draw's first refund digit, or null. Use `refund_numbers`, which carries every refund digit the draw made. This field keeps only the first.",
                        "deprecated": true
                    },
                    "refund_numbers": {
                        "type": "array",
                        "description": "The draw's refund digits, in the operator's order; empty where\nthe game draws none.",
                        "items": {
                            "type": "integer"
                        }
                    },
                    "refund_matched": {
                        "type": [
                            "boolean",
                            "null"
                        ],
                        "description": "Whether the ticket's refund digit is one of the draw's: null\nwhere the game draws none or the ticket named none."
                    },
                    "prize_status": {
                        "description": "`won` with the category it fell in — its amount per winner as\npublished, null when nobody won that category that draw —\n`not_won`, or `unknown` when the draw's prizes are not published,\nnot all understood, or turn on a bonus that cannot be told.\nChecked with a `bet_type`, the amount is the payout table's for\nthat bet at the stake, with the bet as `category` and no `tier`.",
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "string",
                                "enum": [
                                    "unknown"
                                ]
                            }
                        ]
                    },
                    "prize": {
                        "type": "string"
                    },
                    "refund_prize": {
                        "type": "string",
                        "description": "The stake back the refund digit won, on top of `prize`, with\nthe same fields; null when it won nothing or was not named."
                    }
                },
                "required": [
                    "draw_id",
                    "drawn_at",
                    "numbers",
                    "bonus_numbers",
                    "matched_count",
                    "matched_numbers",
                    "bonus_matched",
                    "matched_bonus_numbers",
                    "refund_number",
                    "refund_numbers",
                    "refund_matched",
                    "prize_status",
                    "prize",
                    "refund_prize"
                ],
                "title": "TicketMatchResource"
            },
            "UpdateWebhookEndpointRequest": {
                "type": "object",
                "properties": {
                    "url": {
                        "type": "string",
                        "format": "uri",
                        "maxLength": 2048
                    },
                    "events": {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "enum": [
                                "draw.published",
                                "draw.revised",
                                "jackpot.updated",
                                "draw.missed",
                                "draw.confirmed",
                                "lottery.paused",
                                "lottery.resumed"
                            ]
                        },
                        "minItems": 1
                    },
                    "lottery_codes": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "maxItems": 200
                    },
                    "active": {
                        "type": "boolean"
                    }
                },
                "title": "UpdateWebhookEndpointRequest"
            },
            "WebhookDeliveryResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "event": {
                        "type": "string",
                        "enum": [
                            "draw.published",
                            "draw.revised",
                            "jackpot.updated",
                            "draw.missed",
                            "draw.confirmed",
                            "lottery.paused",
                            "lottery.resumed"
                        ]
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "pending",
                            "delivered",
                            "failed",
                            "dead"
                        ]
                    },
                    "attempts": {
                        "type": "integer"
                    },
                    "last_status_code": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "last_error": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "delivered_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "payload": {
                        "type": "array",
                        "items": {}
                    }
                },
                "required": [
                    "id",
                    "event",
                    "status",
                    "attempts",
                    "last_status_code",
                    "last_error",
                    "delivered_at",
                    "created_at",
                    "payload"
                ],
                "title": "WebhookDeliveryResource"
            },
            "WebhookEndpointResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "url": {
                        "type": "string"
                    },
                    "events": {
                        "type": "string"
                    },
                    "lottery_codes": {
                        "type": "string"
                    },
                    "active": {
                        "type": "boolean"
                    },
                    "secret": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "consecutive_failures": {
                        "type": "integer"
                    },
                    "last_success_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "last_failure_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "disabled_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "url",
                    "events",
                    "lottery_codes",
                    "active",
                    "consecutive_failures",
                    "last_success_at",
                    "last_failure_at",
                    "disabled_at",
                    "created_at"
                ],
                "title": "WebhookEndpointResource"
            },
            "WebhookTestResource": {
                "type": "object",
                "properties": {
                    "delivered": {
                        "type": "boolean",
                        "description": "Whether the receiver answered with a 2xx status."
                    },
                    "status_code": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "The HTTP status it answered with; null when no answer came back."
                    },
                    "error": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Why the test failed, in English; null when it was delivered."
                    },
                    "duration_ms": {
                        "type": "integer",
                        "description": "How long the receiver took to answer, in milliseconds."
                    }
                },
                "required": [
                    "delivered",
                    "status_code",
                    "error",
                    "duration_ms"
                ],
                "title": "WebhookTestResource"
            }
        },
        "responses": {
            "ModelNotFoundException": {
                "description": "Not found",
                "content": {
                    "application/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": [
                                "message"
                            ]
                        }
                    }
                }
            },
            "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"
                            ]
                        }
                    }
                }
            }
        }
    }
}
