{
    "openapi": "3.0.3",
    "info": {
        "title": "Get Ticket Events (BETA)",
        "description": "Get ticket events.",
        "version": "1.0.0",
        "contact": {
            "name": "RunSignup API Support",
            "url": "https://runsignup.com/API",
            "email": "info@runsignup.com"
        }
    },
    "servers": [
        {
            "url": "https://api.runsignup.com/rest",
            "description": "Production API Server"
        }
    ],
    "tags": [
        {
            "name": "Ticket Events",
            "description": "APIs related to Ticket Events"
        }
    ],
    "components": {
        "schemas": {
            "Error": {
                "type": "object",
                "properties": {
                    "error": {
                        "type": "string",
                        "description": "Error message"
                    },
                    "details": {
                        "type": "object",
                        "description": "Additional error details",
                        "additionalProperties": true
                    }
                },
                "required": [
                    "error"
                ]
            },
            "BadRequestError": {
                "allOf": [
                    {
                        "$ref": "#/components/schemas/Error"
                    },
                    {
                        "description": "Error indicating invalid request parameters or structure"
                    }
                ]
            },
            "UnauthorizedError": {
                "allOf": [
                    {
                        "$ref": "#/components/schemas/Error"
                    },
                    {
                        "description": "Error indicating authentication failure"
                    }
                ]
            },
            "ForbiddenError": {
                "allOf": [
                    {
                        "$ref": "#/components/schemas/Error"
                    },
                    {
                        "description": "Error indicating the authenticated user lacks required permissions"
                    }
                ]
            },
            "NotFoundError": {
                "allOf": [
                    {
                        "$ref": "#/components/schemas/Error"
                    },
                    {
                        "description": "Error indicating the requested resource does not exist"
                    }
                ]
            },
            "ServerError": {
                "allOf": [
                    {
                        "$ref": "#/components/schemas/Error"
                    },
                    {
                        "description": "Error indicating an unexpected server-side issue"
                    }
                ]
            }
        },
        "securitySchemes": {
            "apiKey": {
                "type": "apiKey",
                "in": "query",
                "name": "api_key",
                "description": "RunSignup API Key"
            },
            "apiSecret": {
                "type": "apiKey",
                "in": "query",
                "name": "api_secret",
                "description": "RunSignup API Secret"
            }
        }
    },
    "paths": {
        "/v2/tickets/get-ticket-events.json": {
            "get": {
                "tags": [
                    "Ticket Events"
                ],
                "summary": "Get Ticket Events (BETA)",
                "description": "Get ticket events.",
                "operationId": "v2_tickets_get_ticket_events_json",
                "parameters": [
                    {
                        "name": "supports_timed_entry_events",
                        "in": "query",
                        "description": "Are timed entry events supported?",
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "enum": [
                                "T",
                                "F"
                            ],
                            "default": "F"
                        }
                    },
                    {
                        "name": "num",
                        "in": "query",
                        "description": "Number of results per page (max 500).",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": "100"
                        }
                    },
                    {
                        "name": "min_ticket_event_id",
                        "in": "query",
                        "description": "Get ticket events with ID of at least given ID.",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "max_ticket_event_id",
                        "in": "query",
                        "description": "Get ticket events with ID no larger than given ID.",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "created_on_or_after_ts",
                        "in": "query",
                        "description": "Get ticket events created since a given time.",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "created_on_or_before_ts",
                        "in": "query",
                        "description": "Get ticket events created on or before a given time.",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "modified_on_or_after_ts",
                        "in": "query",
                        "description": "Get ticket events modified since a given time.",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "modified_on_or_before_ts",
                        "in": "query",
                        "description": "Get ticket events modified on or before a given time.",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "city",
                        "in": "query",
                        "description": "Search by city.",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "state",
                        "in": "query",
                        "description": "Search by state. E.g. NJ",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "country",
                        "in": "query",
                        "description": "Search by country. E.g. US",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "US",
                                "AD",
                                "AE",
                                "AF",
                                "AG",
                                "AI",
                                "AL",
                                "AM",
                                "AO",
                                "AQ",
                                "AR",
                                "AS",
                                "AT",
                                "AU",
                                "AW",
                                "AX",
                                "AZ",
                                "BA",
                                "BB",
                                "BD",
                                "BE",
                                "BF",
                                "BG",
                                "BH",
                                "BI",
                                "BJ",
                                "BL",
                                "BM",
                                "BN",
                                "BO",
                                "BQ",
                                "BR",
                                "BS",
                                "BT",
                                "BV",
                                "BW",
                                "BY",
                                "BZ",
                                "CA",
                                "CC",
                                "CD",
                                "CF",
                                "CG",
                                "CH",
                                "CI",
                                "CK",
                                "CL",
                                "CM",
                                "CN",
                                "CO",
                                "CR",
                                "CU",
                                "CV",
                                "CW",
                                "CX",
                                "CY",
                                "CZ",
                                "DE",
                                "DJ",
                                "DK",
                                "DM",
                                "DO",
                                "DZ",
                                "EC",
                                "EE",
                                "EG",
                                "EH",
                                "ER",
                                "ES",
                                "ET",
                                "FI",
                                "FJ",
                                "FK",
                                "FM",
                                "FO",
                                "FR",
                                "GA",
                                "GB",
                                "GD",
                                "GE",
                                "GF",
                                "GG",
                                "GH",
                                "GI",
                                "GL",
                                "GM",
                                "GN",
                                "GP",
                                "GQ",
                                "GR",
                                "GS",
                                "GT",
                                "GU",
                                "GW",
                                "GY",
                                "HK",
                                "HM",
                                "HN",
                                "HR",
                                "HT",
                                "HU",
                                "ID",
                                "IE",
                                "IL",
                                "IM",
                                "IN",
                                "IO",
                                "IQ",
                                "IR",
                                "IS",
                                "IT",
                                "JE",
                                "JM",
                                "JO",
                                "JP",
                                "KE",
                                "KG",
                                "KH",
                                "KI",
                                "KM",
                                "KN",
                                "KP",
                                "KR",
                                "KW",
                                "KY",
                                "KZ",
                                "LA",
                                "LB",
                                "LC",
                                "LI",
                                "LK",
                                "LR",
                                "LS",
                                "LT",
                                "LU",
                                "LV",
                                "LY",
                                "MA",
                                "MC",
                                "MD",
                                "ME",
                                "MF",
                                "MG",
                                "MH",
                                "MK",
                                "ML",
                                "MM",
                                "MN",
                                "MO",
                                "MP",
                                "MQ",
                                "MR",
                                "MS",
                                "MT",
                                "MU",
                                "MV",
                                "MW",
                                "MX",
                                "MY",
                                "MZ",
                                "NA",
                                "NC",
                                "NE",
                                "NF",
                                "NG",
                                "NI",
                                "NL",
                                "NO",
                                "NP",
                                "NR",
                                "NU",
                                "NZ",
                                "OM",
                                "PA",
                                "PE",
                                "PF",
                                "PG",
                                "PH",
                                "PK",
                                "PL",
                                "PM",
                                "PN",
                                "PR",
                                "PS",
                                "PT",
                                "PW",
                                "PY",
                                "QA",
                                "RE",
                                "RO",
                                "RS",
                                "RU",
                                "RW",
                                "SA",
                                "SB",
                                "SC",
                                "SD",
                                "SE",
                                "SG",
                                "SH",
                                "SI",
                                "SJ",
                                "SK",
                                "SL",
                                "SM",
                                "SN",
                                "SO",
                                "SR",
                                "SS",
                                "ST",
                                "SV",
                                "SX",
                                "SY",
                                "SZ",
                                "TC",
                                "TD",
                                "TF",
                                "TG",
                                "TH",
                                "TJ",
                                "TK",
                                "TL",
                                "TM",
                                "TN",
                                "TO",
                                "TR",
                                "TT",
                                "TV",
                                "TW",
                                "TZ",
                                "UA",
                                "UG",
                                "UM",
                                "UY",
                                "UZ",
                                "VA",
                                "VC",
                                "VE",
                                "VG",
                                "VI",
                                "VN",
                                "VU",
                                "WF",
                                "WS",
                                "XK",
                                "YE",
                                "YT",
                                "ZA",
                                "ZM",
                                "ZW"
                            ]
                        }
                    },
                    {
                        "name": "zipcode",
                        "in": "query",
                        "description": "Search by zipcode.",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "radius",
                        "in": "query",
                        "description": "Search for events within radius miles from zipcode (US Only; Max 250 miles).",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "event_type",
                        "in": "query",
                        "description": "Search by event type.",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "default": ""
                        }
                    },
                    {
                        "name": "include_html_description",
                        "in": "query",
                        "description": "Include event description as HTML.",
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "enum": [
                                "T",
                                "F"
                            ],
                            "default": "F"
                        }
                    },
                    {
                        "name": "include_text_description",
                        "in": "query",
                        "description": "Include event description as text.",
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "enum": [
                                "T",
                                "F"
                            ],
                            "default": "F"
                        }
                    },
                    {
                        "name": "include_pricing",
                        "in": "query",
                        "description": "Should pricing be included?",
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "enum": [
                                "T",
                                "F"
                            ],
                            "default": ""
                        }
                    }
                ],
                "security": [
                    {
                        "apiKey": [],
                        "apiSecret": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BadRequestError"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/UnauthorizedError"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ForbiddenError"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/NotFoundError"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ServerError"
                                }
                            }
                        }
                    }
                },
                "x-permissions": [
                    "affiliates",
                    "partners",
                    "race_directors",
                    "timers"
                ]
            }
        }
    }
}