{
    "openapi": "3.0.3",
    "info": {
        "title": "Get Race",
        "description": "Information about a specific race.",
        "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": "Basic Race Information",
            "description": "APIs related to Basic Race Information"
        }
    ],
    "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"
                    }
                ]
            },
            "Race_raceIdGetResponse": {
                "type": "object",
                "title": "Race Response",
                "description": "Response schema for detailed race information including events and registration periods",
                "properties": {
                    "race": {
                        "type": "object",
                        "description": "Detailed information about the race",
                        "example": {
                            "race_id": 12345,
                            "name": "Annual Marathon 2023",
                            "last_date": "06/15/2022",
                            "last_end_date": "06/15/2022",
                            "next_date": "06/15/2023",
                            "next_end_date": "06/15/2023",
                            "is_draft_race": "F",
                            "is_private_race": "F",
                            "is_registration_open": "T",
                            "created": "8/27/2020 07:37",
                            "last_modified": "11/15/2021 14:54",
                            "description": "<p>Annual Marathon 2023</p>",
                            "url": "http://example.com/Race/PA/Philadelphia/AnnualMarathon2023",
                            "external_race_url": null,
                            "external_results_url": null,
                            "fb_page_id": null,
                            "fb_event_id": null,
                            "address": {
                                "street": "123 Main St",
                                "street2": null,
                                "city": "Philadelphia",
                                "state": "PA",
                                "zipcode": "19103",
                                "country_code": "US"
                            },
                            "timezone": "America/New_York",
                            "latitude": 39.9526,
                            "longitude": -75.1652,
                            "can_use_registration_api": "F",
                            "is_partner_race": null,
                            "real_time_notifications_enabled": "F",
                            "logo_url": "https://example.com/race-logo.png",
                            "email_sender": "race@example.com",
                            "waiver": "Sample race waiver text...",
                            "waivers": [
                                {
                                    "waiver_id": 1,
                                    "waiver_text": "Main race waiver text..."
                                },
                                {
                                    "waiver_id": 2,
                                    "waiver_text": "Additional waiver text..."
                                }
                            ],
                            "donation_settings": {
                                "type": "runsignup",
                                "start_date": "01/01/2023 05:00",
                                "start_date_ts": 1672549200,
                                "end_date": "01/01/2024 04:59",
                                "end_date_ts": 1704085199,
                                "periods": [
                                    {
                                        "donation_period_id": 1,
                                        "start_date_ts": 1672549200,
                                        "end_date_ts": 1704085199
                                    }
                                ]
                            },
                            "membership_settings": [
                                {
                                    "membership_type_id": 1,
                                    "membership_type_name": "Club Member",
                                    "discount_amount": "$5.00",
                                    "is_active": "T"
                                },
                                {
                                    "membership_type_id": 2,
                                    "membership_type_name": "Student",
                                    "discount_amount": "$3.00",
                                    "is_active": "T"
                                }
                            ],
                            "postponed_cancelled_text": null,
                            "postponed_to_date_text": null,
                            "events": [
                                {
                                    "event_id": 67890,
                                    "race_event_days_id": 334879,
                                    "name": "5K Run",
                                    "details": "A scenic 5K run through the park",
                                    "start_time": "06/15/2023 08:00",
                                    "end_time": "06/15/2023 10:00",
                                    "age_calc_base_date": "06/15/2023",
                                    "registration_opens": "01/01/2023 05:00",
                                    "event_type": "Running",
                                    "distance": "5K",
                                    "volunteer": "F",
                                    "require_dob": "T",
                                    "require_phone": "T",
                                    "max_duration_in_min": "60",
                                    "alt_reg_url": null,
                                    "sub_event_ids": [],
                                    "previous_year_event_id": null,
                                    "giveaway": "Race T-Shirt",
                                    "giveaway_cutoff_date": "5/1/2023",
                                    "giveaway_options": [
                                        {
                                            "giveaway_option_id": 1,
                                            "giveaway_option_text": "Long Sleeve T-Shirt",
                                            "additional_cost": "$5.00",
                                            "giveaway_option_inventory_id": 101
                                        },
                                        {
                                            "giveaway_option_id": 2,
                                            "giveaway_option_text": "Hoodie",
                                            "additional_cost": "$15.00",
                                            "giveaway_option_inventory_id": 102
                                        }
                                    ],
                                    "registration_periods": [
                                        {
                                            "registration_opens": "01/01/2023 05:00",
                                            "registration_closes": "06/15/2023 03:59",
                                            "race_fee": "$25.00",
                                            "processing_fee": "$2.50"
                                        }
                                    ],
                                    "participant_cap": 1000,
                                    "soft_participant_cap": 900,
                                    "waitlist_settings": {
                                        "waitlist_in_effect": "F"
                                    },
                                    "multievent_participant_caps": [
                                        {
                                            "event_ids": [
                                                67890,
                                                67891
                                            ],
                                            "participant_cap": 500
                                        }
                                    ],
                                    "membership_settings": [
                                        {
                                            "membership_type_id": 1,
                                            "membership_type_name": "Club Member",
                                            "discount_amount": "$5.00",
                                            "is_active": "T"
                                        }
                                    ],
                                    "age_based_pricing": [
                                        {
                                            "age_group_pricing_id": 1,
                                            "start_time": "01/01/2023 05:00",
                                            "end_time": "06/15/2023 03:59",
                                            "race_fee": "$20.00",
                                            "min_age": 0,
                                            "max_age": 18,
                                            "no_giveaway": "F",
                                            "no_membership_price_adjustments": "F"
                                        }
                                    ],
                                    "corral_settings": {
                                        "ask_for_estimated_finish_time": "T",
                                        "min_finish_time_sec": 900,
                                        "max_finish_time_sec": 3600,
                                        "male_max_finish_time_sec_requiring_verification": 1200,
                                        "female_max_finish_time_sec_requiring_verification": 1500,
                                        "corral_selection_during_registration": "T",
                                        "corrals": [
                                            {
                                                "race_corral_id": 1,
                                                "corral_name": "Elite",
                                                "corral_start_desc": "8:00 AM Start",
                                                "corral_desc": "For runners expecting to finish under 20 minutes"
                                            },
                                            {
                                                "race_corral_id": 2,
                                                "corral_name": "Wave 1",
                                                "corral_start_desc": "8:05 AM Start",
                                                "corral_desc": "For runners expecting to finish between 20-25 minutes"
                                            }
                                        ]
                                    },
                                    "racejoy_uploaded_file_url": "https://example.com/racejoy/course.gpx",
                                    "racejoy_external_map_url": "https://example.com/course-map",
                                    "racejoy_buyout_max_race_size": "1000",
                                    "racejoy_buyout_race_distance_class": "S",
                                    "racejoy_buyout_type": "F",
                                    "racejoy_buyout_invoice_id": 12345
                                }
                            ]
                        },
                        "properties": {
                            "race_id": {
                                "type": "integer",
                                "description": "Unique identifier for the race"
                            },
                            "name": {
                                "type": "string",
                                "description": "Name of the race"
                            },
                            "last_date": {
                                "type": "string",
                                "description": "Date when the race last occurred",
                                "nullable": true,
                                "format": "date"
                            },
                            "last_end_date": {
                                "type": "string",
                                "description": "End date when the race last occurred",
                                "nullable": true,
                                "format": "date"
                            },
                            "next_date": {
                                "type": "string",
                                "description": "Date when the race will next occur",
                                "nullable": true,
                                "format": "date"
                            },
                            "next_end_date": {
                                "type": "string",
                                "description": "End date when the race will next occur",
                                "nullable": true,
                                "format": "date"
                            },
                            "is_draft_race": {
                                "type": "string",
                                "description": "Whether this is a draft race",
                                "enum": [
                                    "T",
                                    "F"
                                ]
                            },
                            "is_private_race": {
                                "type": "string",
                                "description": "Whether this is a private race",
                                "enum": [
                                    "T",
                                    "F"
                                ]
                            },
                            "is_registration_open": {
                                "type": "string",
                                "description": "Whether registration is currently open",
                                "enum": [
                                    "T",
                                    "F"
                                ]
                            },
                            "created": {
                                "type": "string",
                                "description": "Date when the race was created"
                            },
                            "last_modified": {
                                "type": "string",
                                "description": "Date when the race was last modified"
                            },
                            "description": {
                                "type": "string",
                                "description": "Full description of the race"
                            },
                            "url": {
                                "type": "string",
                                "description": "URL to the race page"
                            },
                            "external_race_url": {
                                "type": "string",
                                "description": "External URL for the race",
                                "nullable": true
                            },
                            "external_results_url": {
                                "type": "string",
                                "description": "External URL for race results",
                                "nullable": true
                            },
                            "fb_page_id": {
                                "type": "string",
                                "description": "Facebook page ID",
                                "nullable": true
                            },
                            "fb_event_id": {
                                "type": "integer",
                                "description": "Facebook event ID",
                                "nullable": true
                            },
                            "address": {
                                "type": "object",
                                "description": "Location information for the race",
                                "properties": {
                                    "street": {
                                        "type": "string",
                                        "description": "Street address of the race"
                                    },
                                    "street2": {
                                        "type": "string",
                                        "description": "Secondary street address",
                                        "nullable": true
                                    },
                                    "city": {
                                        "type": "string",
                                        "description": "City where the race is located"
                                    },
                                    "state": {
                                        "type": "string",
                                        "description": "State or province where the race is located"
                                    },
                                    "zipcode": {
                                        "type": "string",
                                        "description": "Postal code where the race is located"
                                    },
                                    "country_code": {
                                        "type": "string",
                                        "description": "Two-letter country code"
                                    }
                                },
                                "required": [
                                    "street",
                                    "city",
                                    "state",
                                    "zipcode",
                                    "country_code"
                                ]
                            },
                            "timezone": {
                                "type": "string",
                                "description": "Timezone for the race"
                            },
                            "latitude": {
                                "type": "number",
                                "description": "Latitude coordinate of the race location",
                                "nullable": true
                            },
                            "longitude": {
                                "type": "number",
                                "description": "Longitude coordinate of the race location",
                                "nullable": true
                            },
                            "can_use_registration_api": {
                                "type": "string",
                                "description": "Whether the race can use the registration API",
                                "enum": [
                                    "T",
                                    "F"
                                ]
                            },
                            "is_partner_race": {
                                "type": "string",
                                "description": "Whether this is a partner race",
                                "nullable": true,
                                "enum": [
                                    "T",
                                    "F"
                                ]
                            },
                            "real_time_notifications_enabled": {
                                "type": "string",
                                "description": "Whether real-time notifications are enabled",
                                "enum": [
                                    "T",
                                    "F"
                                ]
                            },
                            "logo_url": {
                                "type": "string",
                                "description": "URL to the race logo image"
                            },
                            "email_sender": {
                                "type": "string",
                                "description": "Email sender address"
                            },
                            "waiver": {
                                "type": "string",
                                "description": "Race waiver text. Present when include_waiver=T",
                                "x-response-field-inclusion": [
                                    {
                                        "request-parameter": "include_waiver",
                                        "value": "T"
                                    }
                                ]
                            },
                            "waivers": {
                                "type": "array",
                                "description": "Array of race waivers. Present when include_multiple_waivers=T",
                                "x-response-field-inclusion": [
                                    {
                                        "request-parameter": "include_multiple_waivers",
                                        "value": "T"
                                    }
                                ],
                                "items": {
                                    "type": "object",
                                    "description": "Individual race waiver",
                                    "properties": {
                                        "waiver_id": {
                                            "type": "integer",
                                            "description": "Unique identifier for the waiver"
                                        },
                                        "waiver_text": {
                                            "type": "string",
                                            "description": "Text content of the waiver"
                                        }
                                    },
                                    "required": [
                                        "waiver_id",
                                        "waiver_text"
                                    ]
                                }
                            },
                            "donation_settings": {
                                "type": "object",
                                "description": "Donation configuration. Present when include_donation_settings=T",
                                "x-response-field-inclusion": [
                                    {
                                        "request-parameter": "include_donation_settings",
                                        "value": "T"
                                    }
                                ],
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "description": "Type of donation configuration",
                                        "enum": [
                                            "none",
                                            "runsignup"
                                        ]
                                    },
                                    "start_date": {
                                        "type": "string",
                                        "description": "Start date of donation period",
                                        "format": "date-time"
                                    },
                                    "start_date_ts": {
                                        "type": "integer",
                                        "description": "Start date timestamp"
                                    },
                                    "end_date": {
                                        "type": "string",
                                        "description": "End date of donation period",
                                        "nullable": true,
                                        "format": "date-time"
                                    },
                                    "end_date_ts": {
                                        "type": "integer",
                                        "description": "End date timestamp",
                                        "nullable": true
                                    },
                                    "periods": {
                                        "type": "array",
                                        "description": "List of donation periods",
                                        "items": {
                                            "type": "object",
                                            "description": "Donation period information",
                                            "properties": {
                                                "donation_period_id": {
                                                    "type": "integer",
                                                    "description": "Unique identifier for the donation period"
                                                },
                                                "start_date_ts": {
                                                    "type": "integer",
                                                    "description": "Start date timestamp"
                                                },
                                                "end_date_ts": {
                                                    "type": "integer",
                                                    "description": "End date timestamp",
                                                    "nullable": true
                                                }
                                            },
                                            "required": [
                                                "donation_period_id",
                                                "start_date_ts"
                                            ]
                                        }
                                    }
                                }
                            },
                            "postponed_cancelled_text": {
                                "type": "string",
                                "description": "Text describing race cancellation. Present when include_extra_date_info=T",
                                "x-response-field-inclusion": [
                                    {
                                        "request-parameter": "include_extra_date_info",
                                        "value": "T"
                                    }
                                ]
                            },
                            "postponed_to_date_text": {
                                "type": "string",
                                "description": "Text describing race postponement date. Present when include_extra_date_info=T",
                                "x-response-field-inclusion": [
                                    {
                                        "request-parameter": "include_extra_date_info",
                                        "value": "T"
                                    }
                                ]
                            },
                            "events": {
                                "type": "array",
                                "description": "List of events associated with the race",
                                "items": {
                                    "type": "object",
                                    "description": "Details about a specific event within the race",
                                    "nullable": true,
                                    "properties": {
                                        "event_id": {
                                            "type": "integer",
                                            "description": "Unique identifier for the event"
                                        },
                                        "race_event_days_id": {
                                            "type": "integer",
                                            "description": "Identifier for the race event day"
                                        },
                                        "name": {
                                            "type": "string",
                                            "description": "Name of the event"
                                        },
                                        "details": {
                                            "type": "string",
                                            "description": "Detailed description of the event",
                                            "nullable": true
                                        },
                                        "start_time": {
                                            "type": "string",
                                            "description": "Start time of the event",
                                            "nullable": true,
                                            "format": "date-time"
                                        },
                                        "end_time": {
                                            "type": "string",
                                            "description": "End time of the event",
                                            "nullable": true,
                                            "format": "date-time"
                                        },
                                        "age_calc_base_date": {
                                            "type": "string",
                                            "description": "Base date for age calculations",
                                            "nullable": true,
                                            "format": "date"
                                        },
                                        "registration_opens": {
                                            "type": "string",
                                            "description": "When registration opens for the event",
                                            "nullable": true,
                                            "format": "date-time"
                                        },
                                        "event_type": {
                                            "type": "string",
                                            "description": "Type of event"
                                        },
                                        "distance": {
                                            "type": "string",
                                            "description": "Distance of the event",
                                            "nullable": true
                                        },
                                        "volunteer": {
                                            "type": "string",
                                            "description": "Whether this is a volunteer event",
                                            "enum": [
                                                "T",
                                                "F"
                                            ]
                                        },
                                        "require_dob": {
                                            "type": "string",
                                            "description": "Whether date of birth is required",
                                            "enum": [
                                                "T",
                                                "F"
                                            ]
                                        },
                                        "require_phone": {
                                            "type": "string",
                                            "description": "Whether phone number is required",
                                            "enum": [
                                                "T",
                                                "F"
                                            ]
                                        },
                                        "max_duration_in_min": {
                                            "type": "string",
                                            "description": "Maximum duration in minutes",
                                            "nullable": true
                                        },
                                        "alt_reg_url": {
                                            "type": "string",
                                            "description": "Alternative registration URL",
                                            "nullable": true
                                        },
                                        "sub_event_ids": {
                                            "type": "array",
                                            "description": "List of sub-event IDs",
                                            "nullable": true,
                                            "items": {
                                                "type": "integer",
                                                "description": "Sub-event identifier"
                                            }
                                        },
                                        "previous_year_event_id": {
                                            "type": "integer",
                                            "description": "Previous year event identifier",
                                            "nullable": true
                                        },
                                        "giveaway": {
                                            "type": "string",
                                            "description": "Giveaway item for the event"
                                        },
                                        "giveaway_cutoff_date": {
                                            "type": "string",
                                            "description": "Cutoff date for giveaway eligibility. Present when include_giveaway_details=T",
                                            "nullable": true,
                                            "x-response-field-inclusion": [
                                                {
                                                    "request-parameter": "include_giveaway_details",
                                                    "value": "T"
                                                }
                                            ]
                                        },
                                        "giveaway_options": {
                                            "type": "array",
                                            "description": "List of available giveaway options for the event. Present when include_giveaway_details=T",
                                            "nullable": true,
                                            "x-response-field-inclusion": [
                                                {
                                                    "request-parameter": "include_giveaway_details",
                                                    "value": "T"
                                                }
                                            ],
                                            "items": {
                                                "type": "object",
                                                "description": "Giveaway option information",
                                                "properties": {
                                                    "giveaway_option_id": {
                                                        "type": "integer",
                                                        "description": "Unique identifier for the giveaway option"
                                                    },
                                                    "giveaway_option_text": {
                                                        "type": "string",
                                                        "description": "Text description of the giveaway option"
                                                    },
                                                    "additional_cost": {
                                                        "type": "string",
                                                        "description": "Additional cost for this giveaway option",
                                                        "format": "currency",
                                                        "x-currency-symbol": "$",
                                                        "x-decimal-places": 2,
                                                        "pattern": "^\\$\\d+\\.\\d{2}$"
                                                    },
                                                    "giveaway_option_inventory_id": {
                                                        "type": "integer",
                                                        "description": "Inventory identifier for the giveaway option",
                                                        "nullable": true
                                                    }
                                                },
                                                "required": [
                                                    "giveaway_option_id",
                                                    "giveaway_option_text",
                                                    "additional_cost"
                                                ]
                                            }
                                        },
                                        "registration_periods": {
                                            "type": "array",
                                            "description": "Registration periods for the event",
                                            "items": {
                                                "type": "object",
                                                "description": "Details about a specific registration period",
                                                "properties": {
                                                    "registration_opens": {
                                                        "type": "string",
                                                        "description": "When registration opens for this period",
                                                        "format": "date-time"
                                                    },
                                                    "registration_closes": {
                                                        "type": "string",
                                                        "description": "When registration closes for this period",
                                                        "format": "date-time"
                                                    },
                                                    "race_fee": {
                                                        "type": "string",
                                                        "description": "Base fee for the race during this period",
                                                        "format": "currency",
                                                        "x-currency-symbol": "$",
                                                        "x-decimal-places": 2,
                                                        "pattern": "^\\$\\d+\\.\\d{2}$"
                                                    },
                                                    "processing_fee": {
                                                        "type": "string",
                                                        "description": "Processing fee added to the race fee",
                                                        "format": "currency",
                                                        "x-currency-symbol": "$",
                                                        "x-decimal-places": 2,
                                                        "pattern": "^\\$\\d+\\.\\d{2}$"
                                                    }
                                                },
                                                "required": [
                                                    "registration_opens",
                                                    "registration_closes",
                                                    "race_fee",
                                                    "processing_fee"
                                                ]
                                            }
                                        },
                                        "participant_cap": {
                                            "type": "integer",
                                            "description": "Maximum number of participants allowed"
                                        },
                                        "soft_participant_cap": {
                                            "type": "integer",
                                            "description": "Soft cap for participants. Present when include_participant_caps=T",
                                            "nullable": true,
                                            "x-response-field-inclusion": [
                                                {
                                                    "request-parameter": "include_participant_caps",
                                                    "value": "T"
                                                }
                                            ]
                                        },
                                        "waitlist_settings": {
                                            "type": "object",
                                            "description": "Waitlist configuration. Present when include_participant_caps=T",
                                            "nullable": true,
                                            "x-response-field-inclusion": [
                                                {
                                                    "request-parameter": "include_participant_caps",
                                                    "value": "T"
                                                }
                                            ],
                                            "properties": {
                                                "waitlist_in_effect": {
                                                    "type": "string",
                                                    "description": "Whether waitlist is active",
                                                    "enum": [
                                                        "T",
                                                        "F"
                                                    ]
                                                }
                                            }
                                        },
                                        "multievent_participant_caps": {
                                            "type": "array",
                                            "description": "Multi-event participant caps. Present when include_participant_caps=T",
                                            "nullable": true,
                                            "x-response-field-inclusion": [
                                                {
                                                    "request-parameter": "include_participant_caps",
                                                    "value": "T"
                                                }
                                            ],
                                            "items": {
                                                "type": "object",
                                                "description": "Multi-event participant cap information",
                                                "properties": {
                                                    "event_ids": {
                                                        "type": "array",
                                                        "description": "List of event IDs",
                                                        "items": {
                                                            "type": "integer",
                                                            "description": "Event identifier"
                                                        }
                                                    },
                                                    "participant_cap": {
                                                        "type": "integer",
                                                        "description": "Participant cap for the multi-event group"
                                                    }
                                                },
                                                "required": [
                                                    "event_ids",
                                                    "participant_cap"
                                                ]
                                            }
                                        },
                                        "membership_settings": {
                                            "type": "array",
                                            "description": "Membership settings for the event. Present when include_membership_settings=T",
                                            "nullable": true,
                                            "x-response-field-inclusion": [
                                                {
                                                    "request-parameter": "include_membership_settings",
                                                    "value": "T"
                                                }
                                            ],
                                            "items": {
                                                "type": "object",
                                                "description": "Membership setting information",
                                                "properties": {
                                                    "membership_type_id": {
                                                        "type": "integer",
                                                        "description": "Membership type identifier",
                                                        "nullable": true
                                                    },
                                                    "membership_type_name": {
                                                        "type": "string",
                                                        "description": "Name of the membership type",
                                                        "nullable": true
                                                    },
                                                    "discount_amount": {
                                                        "type": "string",
                                                        "description": "Discount amount for this membership type",
                                                        "nullable": true,
                                                        "format": "currency",
                                                        "x-currency-symbol": "$",
                                                        "x-decimal-places": 2,
                                                        "pattern": "^\\$\\d+\\.\\d{2}$"
                                                    },
                                                    "is_active": {
                                                        "type": "string",
                                                        "description": "Whether this membership setting is active",
                                                        "nullable": true,
                                                        "enum": [
                                                            "T",
                                                            "F"
                                                        ]
                                                    }
                                                }
                                            }
                                        },
                                        "age_based_pricing": {
                                            "type": "array",
                                            "description": "Age-based pricing rules. Present when include_age_based_pricing=T",
                                            "x-response-field-inclusion": [
                                                {
                                                    "request-parameter": "include_age_based_pricing",
                                                    "value": "T"
                                                }
                                            ],
                                            "items": {
                                                "type": "object",
                                                "description": "Age-based pricing rule",
                                                "properties": {
                                                    "age_group_pricing_id": {
                                                        "type": "integer",
                                                        "description": "Unique identifier for the age group pricing"
                                                    },
                                                    "start_time": {
                                                        "type": "string",
                                                        "description": "Start time for this pricing",
                                                        "format": "date-time"
                                                    },
                                                    "end_time": {
                                                        "type": "string",
                                                        "description": "End time for this pricing",
                                                        "format": "date-time"
                                                    },
                                                    "race_fee": {
                                                        "type": "string",
                                                        "description": "Event cost for this age range",
                                                        "format": "currency",
                                                        "x-currency-symbol": "$",
                                                        "x-decimal-places": 2,
                                                        "pattern": "^\\$\\d+\\.\\d{2}$"
                                                    },
                                                    "min_age": {
                                                        "type": "integer",
                                                        "description": "Minimum age in the range"
                                                    },
                                                    "max_age": {
                                                        "type": "integer",
                                                        "description": "Maximum age in the range"
                                                    },
                                                    "no_giveaway": {
                                                        "type": "string",
                                                        "description": "Whether participants in this range can receive giveaways",
                                                        "enum": [
                                                            "T",
                                                            "F"
                                                        ]
                                                    },
                                                    "no_membership_price_adjustments": {
                                                        "type": "string",
                                                        "description": "Whether participants in this range can use membership discounts",
                                                        "enum": [
                                                            "T",
                                                            "F"
                                                        ]
                                                    }
                                                }
                                            }
                                        },
                                        "corral_settings": {
                                            "type": "object",
                                            "description": "Corral configuration. Present when include_corral_settings=T",
                                            "x-response-field-inclusion": [
                                                {
                                                    "request-parameter": "include_corral_settings",
                                                    "value": "T"
                                                }
                                            ],
                                            "properties": {
                                                "ask_for_estimated_finish_time": {
                                                    "type": "string",
                                                    "description": "Whether to ask for estimated finish time",
                                                    "enum": [
                                                        "T",
                                                        "F"
                                                    ]
                                                },
                                                "min_finish_time_sec": {
                                                    "type": "integer",
                                                    "description": "Minimum finish time in seconds",
                                                    "nullable": true
                                                },
                                                "max_finish_time_sec": {
                                                    "type": "integer",
                                                    "description": "Maximum finish time in seconds",
                                                    "nullable": true
                                                },
                                                "male_max_finish_time_sec_requiring_verification": {
                                                    "type": "integer",
                                                    "description": "Maximum finish time for males requiring verification",
                                                    "nullable": true
                                                },
                                                "female_max_finish_time_sec_requiring_verification": {
                                                    "type": "integer",
                                                    "description": "Maximum finish time for females requiring verification",
                                                    "nullable": true
                                                },
                                                "corral_selection_during_registration": {
                                                    "type": "string",
                                                    "description": "Whether corral selection is available during registration",
                                                    "enum": [
                                                        "T",
                                                        "F"
                                                    ]
                                                },
                                                "corrals": {
                                                    "type": "array",
                                                    "description": "List of available corrals",
                                                    "items": {
                                                        "type": "object",
                                                        "description": "Corral information",
                                                        "properties": {
                                                            "race_corral_id": {
                                                                "type": "integer",
                                                                "description": "Unique identifier for the corral"
                                                            },
                                                            "corral_name": {
                                                                "type": "string",
                                                                "description": "Name of the corral"
                                                            },
                                                            "corral_start_desc": {
                                                                "type": "string",
                                                                "description": "Short description of corral start time"
                                                            },
                                                            "corral_desc": {
                                                                "type": "string",
                                                                "description": "Full corral description"
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        },
                                        "racejoy_uploaded_file_url": {
                                            "type": "string",
                                            "description": "RaceJoy uploaded file URL. Present when include_racejoy_settings=T",
                                            "nullable": true,
                                            "x-response-field-inclusion": [
                                                {
                                                    "request-parameter": "include_racejoy_settings",
                                                    "value": "T"
                                                }
                                            ]
                                        },
                                        "racejoy_external_map_url": {
                                            "type": "string",
                                            "description": "RaceJoy external map URL. Present when include_racejoy_settings=T",
                                            "nullable": true,
                                            "x-response-field-inclusion": [
                                                {
                                                    "request-parameter": "include_racejoy_settings",
                                                    "value": "T"
                                                }
                                            ]
                                        },
                                        "racejoy_buyout_max_race_size": {
                                            "type": "string",
                                            "description": "RaceJoy buyout maximum race size. Present when include_racejoy_settings=T",
                                            "nullable": true,
                                            "x-response-field-inclusion": [
                                                {
                                                    "request-parameter": "include_racejoy_settings",
                                                    "value": "T"
                                                }
                                            ]
                                        },
                                        "racejoy_buyout_race_distance_class": {
                                            "type": "string",
                                            "description": "RaceJoy buyout distance class (S for < 10K, L for >= 10K). Present when include_racejoy_settings=T",
                                            "nullable": true,
                                            "x-response-field-inclusion": [
                                                {
                                                    "request-parameter": "include_racejoy_settings",
                                                    "value": "T"
                                                }
                                            ],
                                            "enum": [
                                                "S",
                                                "L"
                                            ]
                                        },
                                        "racejoy_buyout_type": {
                                            "type": "string",
                                            "description": "RaceJoy buyout type (R for per registrant, F for full buyout). Present when include_racejoy_settings=T",
                                            "nullable": true,
                                            "x-response-field-inclusion": [
                                                {
                                                    "request-parameter": "include_racejoy_settings",
                                                    "value": "T"
                                                }
                                            ],
                                            "enum": [
                                                "R",
                                                "F"
                                            ]
                                        },
                                        "racejoy_buyout_invoice_id": {
                                            "type": "integer",
                                            "description": "RaceJoy buyout invoice ID. Present when include_racejoy_settings=T",
                                            "nullable": true,
                                            "x-response-field-inclusion": [
                                                {
                                                    "request-parameter": "include_racejoy_settings",
                                                    "value": "T"
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "event_id",
                                        "race_event_days_id",
                                        "name",
                                        "volunteer",
                                        "require_dob",
                                        "require_phone",
                                        "registration_periods"
                                    ]
                                }
                            },
                            "headings": {
                                "type": "array",
                                "description": "Race headings and content sections. Present when race_headings=T",
                                "x-response-field-inclusion": [
                                    {
                                        "request-parameter": "race_headings",
                                        "value": "T"
                                    }
                                ],
                                "items": {
                                    "type": "object",
                                    "description": "Race heading information",
                                    "properties": {
                                        "heading_text": {
                                            "type": "string",
                                            "description": "Heading title text"
                                        },
                                        "content": {
                                            "type": "string",
                                            "description": "HTML content for the heading"
                                        }
                                    },
                                    "required": [
                                        "heading_text",
                                        "content"
                                    ]
                                }
                            },
                            "links": {
                                "type": "array",
                                "description": "Race links and descriptions. Present when race_links=T",
                                "x-response-field-inclusion": [
                                    {
                                        "request-parameter": "race_links",
                                        "value": "T"
                                    }
                                ],
                                "items": {
                                    "type": "object",
                                    "description": "Race link information",
                                    "properties": {
                                        "link_text": {
                                            "type": "string",
                                            "description": "Text for the link"
                                        },
                                        "url": {
                                            "type": "string",
                                            "description": "URL the link points to"
                                        },
                                        "description": {
                                            "type": "string",
                                            "description": "HTML description of the link"
                                        }
                                    },
                                    "required": [
                                        "link_text",
                                        "url",
                                        "description"
                                    ]
                                }
                            },
                            "questions": {
                                "type": "array",
                                "description": "Race questions. Present when include_questions=T",
                                "nullable": true,
                                "x-response-field-inclusion": [
                                    {
                                        "request-parameter": "include_questions",
                                        "value": "T"
                                    }
                                ],
                                "items": {
                                    "type": "object",
                                    "description": "Race question information",
                                    "properties": {
                                        "question_id": {
                                            "type": "integer",
                                            "description": "Unique identifier for the question"
                                        },
                                        "question_text": {
                                            "type": "string",
                                            "description": "Question text"
                                        },
                                        "question_type": {
                                            "type": "string",
                                            "description": "Type of question"
                                        },
                                        "question_type_code": {
                                            "type": "string",
                                            "description": "Question type code"
                                        },
                                        "standard_question_type": {
                                            "type": "string",
                                            "description": "Standard question type"
                                        },
                                        "individual": {
                                            "type": "string",
                                            "description": "Whether question is individual",
                                            "enum": [
                                                "T",
                                                "F"
                                            ]
                                        },
                                        "required": {
                                            "type": "string",
                                            "description": "Whether question is required",
                                            "enum": [
                                                "T",
                                                "F"
                                            ]
                                        },
                                        "internal_question": {
                                            "type": "string",
                                            "description": "Whether question is internal",
                                            "enum": [
                                                "T",
                                                "F"
                                            ]
                                        },
                                        "response_uniqueness_constraint": {
                                            "type": "string",
                                            "description": "Whether response must be unique",
                                            "enum": [
                                                "T",
                                                "F"
                                            ]
                                        },
                                        "skip_for_event_ids": {
                                            "type": "array",
                                            "description": "Event IDs to skip this question for",
                                            "items": {
                                                "type": "integer",
                                                "description": "Event identifier"
                                            }
                                        }
                                    },
                                    "required": [
                                        "question_id",
                                        "question_text",
                                        "question_type",
                                        "question_type_code",
                                        "standard_question_type",
                                        "individual",
                                        "required",
                                        "internal_question",
                                        "response_uniqueness_constraint",
                                        "skip_for_event_ids"
                                    ]
                                }
                            },
                            "registration_addons": {
                                "type": "array",
                                "description": "Registration addons. Present when include_addons=T",
                                "nullable": true,
                                "x-response-field-inclusion": [
                                    {
                                        "request-parameter": "include_addons",
                                        "value": "T"
                                    }
                                ],
                                "items": {
                                    "type": "object",
                                    "description": "Registration addon information",
                                    "nullable": true,
                                    "properties": {
                                        "addon_id": {
                                            "type": "integer",
                                            "description": "Unique identifier for the addon"
                                        },
                                        "addon_name": {
                                            "type": "string",
                                            "description": "Name of the addon"
                                        },
                                        "addon_desc": {
                                            "type": "string",
                                            "description": "Description of the addon"
                                        },
                                        "addon_desc_html": {
                                            "type": "string",
                                            "description": "HTML description of the addon"
                                        },
                                        "addon_price": {
                                            "type": "string",
                                            "description": "Price of the addon",
                                            "format": "currency",
                                            "x-currency-symbol": "$",
                                            "x-decimal-places": 2,
                                            "pattern": "^\\$\\d+\\.\\d{2}$"
                                        },
                                        "faux_price": {
                                            "type": "string",
                                            "description": "Display price of the addon",
                                            "format": "currency",
                                            "x-currency-symbol": "$",
                                            "x-decimal-places": 2,
                                            "pattern": "^\\$\\d+\\.\\d{2}$"
                                        },
                                        "min_quantity_per_transaction": {
                                            "type": "integer",
                                            "description": "Minimum quantity per transaction"
                                        },
                                        "max_quantity_per_transaction": {
                                            "type": "integer",
                                            "description": "Maximum quantity per transaction",
                                            "nullable": true
                                        },
                                        "per_registrant": {
                                            "type": "string",
                                            "description": "Whether addon is per registrant",
                                            "enum": [
                                                "T",
                                                "F"
                                            ]
                                        },
                                        "min_quantity_per_registrant": {
                                            "type": "integer",
                                            "description": "Minimum quantity per registrant"
                                        },
                                        "max_quantity_per_registrant": {
                                            "type": "integer",
                                            "description": "Maximum quantity per registrant",
                                            "nullable": true
                                        },
                                        "per_registrant_event": {
                                            "type": "string",
                                            "description": "Whether addon is per registrant event",
                                            "enum": [
                                                "T",
                                                "F"
                                            ]
                                        },
                                        "min_quantity_per_registrant_event": {
                                            "type": "integer",
                                            "description": "Minimum quantity per registrant event"
                                        },
                                        "max_quantity_per_registrant_event": {
                                            "type": "integer",
                                            "description": "Maximum quantity per registrant event",
                                            "nullable": true
                                        },
                                        "quantity_available": {
                                            "type": "integer",
                                            "description": "Quantity available"
                                        },
                                        "available_from": {
                                            "type": "string",
                                            "description": "Available from date",
                                            "nullable": true
                                        },
                                        "available_from_ts": {
                                            "type": "integer",
                                            "description": "Available from timestamp",
                                            "nullable": true
                                        },
                                        "available_until": {
                                            "type": "string",
                                            "description": "Available until date"
                                        },
                                        "available_until_ts": {
                                            "type": "integer",
                                            "description": "Available until timestamp"
                                        },
                                        "only_if_waiver_signed": {
                                            "type": "string",
                                            "description": "Whether addon requires waiver signature",
                                            "enum": [
                                                "T",
                                                "F"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "addon_id",
                                        "addon_name",
                                        "addon_desc",
                                        "addon_desc_html",
                                        "addon_price",
                                        "faux_price",
                                        "min_quantity_per_transaction",
                                        "min_quantity_per_registrant",
                                        "per_registrant_event",
                                        "min_quantity_per_registrant_event",
                                        "quantity_available",
                                        "available_until",
                                        "available_until_ts",
                                        "only_if_waiver_signed"
                                    ]
                                }
                            },
                            "membership_settings": {
                                "type": "array",
                                "description": "Overall membership settings for the race. Present when include_membership_settings=T",
                                "nullable": true,
                                "x-response-field-inclusion": [
                                    {
                                        "request-parameter": "include_membership_settings",
                                        "value": "T"
                                    }
                                ],
                                "items": {
                                    "type": "object",
                                    "description": "Overall membership setting information",
                                    "properties": {
                                        "membership_type_id": {
                                            "type": "integer",
                                            "description": "Membership type identifier"
                                        },
                                        "membership_type_name": {
                                            "type": "string",
                                            "description": "Name of the membership type"
                                        },
                                        "discount_amount": {
                                            "type": "string",
                                            "description": "Discount amount for this membership type",
                                            "format": "currency",
                                            "x-currency-symbol": "$",
                                            "x-decimal-places": 2,
                                            "pattern": "^\\$\\d+\\.\\d{2}$"
                                        },
                                        "is_active": {
                                            "type": "string",
                                            "description": "Whether this membership setting is active",
                                            "enum": [
                                                "T",
                                                "F"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "membership_type_id",
                                        "membership_type_name",
                                        "discount_amount",
                                        "is_active"
                                    ]
                                }
                            }
                        },
                        "required": [
                            "race_id",
                            "name",
                            "is_draft_race",
                            "is_private_race",
                            "is_registration_open",
                            "created",
                            "last_modified",
                            "description",
                            "url",
                            "address",
                            "timezone",
                            "can_use_registration_api",
                            "real_time_notifications_enabled",
                            "logo_url",
                            "events"
                        ]
                    }
                },
                "required": [
                    "race"
                ]
            }
        },
        "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": {
        "/race/{race_id}": {
            "get": {
                "tags": [
                    "Basic Race Information"
                ],
                "summary": "Get Race",
                "description": "Information about a specific race.",
                "operationId": "race_:race_id",
                "parameters": [
                    {
                        "name": "race_id",
                        "in": "path",
                        "description": "Path parameter: race_id",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "api_key",
                        "in": "query",
                        "description": "API Key",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "api_secret",
                        "in": "query",
                        "description": "API Secret",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "rsu_api_key",
                        "in": "query",
                        "description": "API v2 key. If used, you must send the API secret in an HTTP header named X-RSU-API-SECRET.",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sp_api_key",
                        "in": "query",
                        "description": "Super partner API key. If used, you must send the API secret in an HTTP header named X-RSU-API-SECRET.",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-RSU-API-SECRET",
                        "in": "header",
                        "description": "API v2 or super partner secret.",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "Authorization",
                        "in": "header",
                        "description": "Authorization Header. If using OAuth 2.0, fill this in with `Bearer <token>`.",
                        "required": false,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "format",
                        "in": "query",
                        "description": "Format of response. The default if not sent is `xml`, but `json` is preferred.",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "xml",
                                "json",
                                "csv"
                            ],
                            "default": "xml"
                        }
                    },
                    {
                        "name": "future_events_only",
                        "in": "query",
                        "description": "Only outputs events that occur in the future.",
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "enum": [
                                "T",
                                "F"
                            ],
                            "default": "F"
                        }
                    },
                    {
                        "name": "most_recent_events_only",
                        "in": "query",
                        "description": "Only outputs most recent events for the race.",
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "enum": [
                                "T",
                                "F"
                            ],
                            "default": "F"
                        }
                    },
                    {
                        "name": "race_event_days_id",
                        "in": "query",
                        "description": "Get events by race_event_days_id",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "race_headings",
                        "in": "query",
                        "description": "Include race headings in the output.",
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "enum": [
                                "T",
                                "F"
                            ],
                            "default": "F"
                        }
                    },
                    {
                        "name": "race_links",
                        "in": "query",
                        "description": "Include race links in the output.",
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "enum": [
                                "T",
                                "F"
                            ],
                            "default": "F"
                        }
                    },
                    {
                        "name": "include_waiver",
                        "in": "query",
                        "description": "Should waiver be included?",
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "enum": [
                                "T",
                                "F"
                            ],
                            "default": "F"
                        }
                    },
                    {
                        "name": "include_multiple_waivers",
                        "in": "query",
                        "description": "Should multiple waivers be included?",
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "enum": [
                                "T",
                                "F"
                            ],
                            "default": "F"
                        }
                    },
                    {
                        "name": "include_participant_caps",
                        "in": "query",
                        "description": "Should participant caps be included?",
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "enum": [
                                "T",
                                "F"
                            ],
                            "default": "F"
                        }
                    },
                    {
                        "name": "include_age_based_pricing",
                        "in": "query",
                        "description": "Should information on age based pricing be included?",
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "enum": [
                                "T",
                                "F"
                            ],
                            "default": "F"
                        }
                    },
                    {
                        "name": "include_giveaway_details",
                        "in": "query",
                        "description": "Should give-away (e.g. T-shirt) details be included?  This will include options, such as sizes.",
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "enum": [
                                "T",
                                "F"
                            ],
                            "default": "F"
                        }
                    },
                    {
                        "name": "include_questions",
                        "in": "query",
                        "description": "Should questions be included?",
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "enum": [
                                "T",
                                "F"
                            ],
                            "default": "F"
                        }
                    },
                    {
                        "name": "include_addons",
                        "in": "query",
                        "description": "Should registration add-ons be included?",
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "enum": [
                                "T",
                                "F"
                            ],
                            "default": "F"
                        }
                    },
                    {
                        "name": "include_membership_settings",
                        "in": "query",
                        "description": "Should membership settings be included?",
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "enum": [
                                "T",
                                "F"
                            ],
                            "default": "F"
                        }
                    },
                    {
                        "name": "include_corral_settings",
                        "in": "query",
                        "description": "Should corral settings be included?",
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "enum": [
                                "T",
                                "F"
                            ],
                            "default": "F"
                        }
                    },
                    {
                        "name": "include_donation_settings",
                        "in": "query",
                        "description": "Should donations settings be included?",
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "enum": [
                                "T",
                                "F"
                            ],
                            "default": "F"
                        }
                    },
                    {
                        "name": "include_extra_date_info",
                        "in": "query",
                        "description": "Should extra information about cancellations and postponements be included?",
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "enum": [
                                "T",
                                "F"
                            ],
                            "default": "F"
                        }
                    },
                    {
                        "name": "supports_question_application_types",
                        "in": "query",
                        "description": "Does your integration support question application types?",
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "enum": [
                                "T",
                                "F"
                            ],
                            "default": "F"
                        }
                    }
                ],
                "security": [
                    {
                        "apiKey": [],
                        "apiSecret": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Race Response - Response schema for detailed race information including events and registration periods",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Race_raceIdGetResponse"
                                }
                            }
                        }
                    },
                    "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"
                ]
            }
        }
    }
}