{
    "openapi": "3.0.3",
    "info": {
        "title": "Get Fundraisers for Charity Group",
        "description": "Get list of charity group fundraisers.",
        "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": "Charity Group",
            "description": "APIs related to Charity Group"
        }
    ],
    "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"
                    }
                ]
            },
            "V2CharityGroupGetCharityGroupRaceFundraisersGetResponse": {
                "type": "object",
                "title": "Charity Group Fundraisers",
                "description": "List of fundraisers associated with a charity group.",
                "properties": {
                    "race_fundraisers": {
                        "type": "array",
                        "description": "List of race fundraisers",
                        "items": {
                            "type": "object",
                            "description": "Individual fundraiser information",
                            "nullable": true,
                            "properties": {
                                "race_fundraiser_id": {
                                    "type": "integer",
                                    "description": "Race fundraiser ID"
                                },
                                "race_fundraiser_name": {
                                    "type": "string",
                                    "description": "Race fundraiser name"
                                },
                                "parent_fundraiser_id": {
                                    "type": "integer",
                                    "description": "Parent fundraiser ID"
                                },
                                "race_id": {
                                    "type": "integer",
                                    "description": "Race ID"
                                },
                                "created_ts": {
                                    "type": "integer",
                                    "description": "Timestamp when the fundraiser was created"
                                },
                                "registration_id": {
                                    "type": "integer",
                                    "description": "Registration ID"
                                },
                                "is_team_fundraiser": {
                                    "type": "string",
                                    "description": "Whether the fundraiser is a team fundraiser",
                                    "enum": [
                                        "T",
                                        "F"
                                    ]
                                },
                                "fundraiser_hidden": {
                                    "type": "string",
                                    "description": "Whether the fundraiser is hidden",
                                    "enum": [
                                        "T",
                                        "F"
                                    ]
                                },
                                "fundraiser_url": {
                                    "type": "string",
                                    "description": "URL of the fundraiser"
                                },
                                "fundraiser_token": {
                                    "type": "string",
                                    "description": "Token for the fundraiser"
                                },
                                "fundraiser_owner": {
                                    "type": "object",
                                    "description": "Information about the fundraiser owner",
                                    "nullable": true,
                                    "properties": {
                                        "user_id": {
                                            "type": "integer",
                                            "description": "User ID of the fundraiser owner"
                                        },
                                        "first_name": {
                                            "type": "string",
                                            "description": "First name of the fundraiser owner"
                                        },
                                        "last_name": {
                                            "type": "string",
                                            "description": "Last name of the fundraiser owner"
                                        },
                                        "email": {
                                            "type": "string",
                                            "description": "Email of the fundraiser owner"
                                        },
                                        "phone_number": {
                                            "type": "string",
                                            "description": "Phone number of the fundraiser owner"
                                        }
                                    },
                                    "required": [
                                        "user_id",
                                        "first_name",
                                        "last_name",
                                        "email",
                                        "phone_number"
                                    ]
                                },
                                "charity_id": {
                                    "type": "string",
                                    "description": "Charity ID"
                                },
                                "charity_name": {
                                    "type": "string",
                                    "description": "Charity name"
                                },
                                "fundraiser_tagline": {
                                    "type": "string",
                                    "description": "Fundraiser tagline"
                                },
                                "personal_message": {
                                    "type": "string",
                                    "description": "Personal message for the fundraiser"
                                },
                                "fundraising_goal": {
                                    "type": "string",
                                    "description": "Fundraising goal amount"
                                },
                                "donation_period_id": {
                                    "type": "integer",
                                    "description": "Donation period ID"
                                },
                                "applied_for_refund": {
                                    "type": "string",
                                    "description": "Whether a refund has been applied for",
                                    "enum": [
                                        "T",
                                        "F"
                                    ]
                                },
                                "last_modified_ts": {
                                    "type": "integer",
                                    "description": "Timestamp when the fundraiser was last modified"
                                }
                            },
                            "required": [
                                "race_fundraiser_id",
                                "race_fundraiser_name",
                                "parent_fundraiser_id",
                                "race_id",
                                "created_ts",
                                "registration_id",
                                "is_team_fundraiser",
                                "fundraiser_hidden",
                                "fundraiser_url",
                                "fundraiser_token",
                                "fundraiser_owner",
                                "charity_id",
                                "charity_name",
                                "fundraiser_tagline",
                                "personal_message",
                                "fundraising_goal",
                                "donation_period_id",
                                "applied_for_refund",
                                "last_modified_ts"
                            ]
                        }
                    }
                },
                "required": [
                    "race_fundraisers"
                ],
                "example": {
                    "race_fundraisers": [
                        {
                            "race_fundraiser_id": 123,
                            "race_fundraiser_name": "Some Fundraiser Name",
                            "parent_fundraiser_id": 567,
                            "race_id": 1234,
                            "created_ts": 1111111111,
                            "registration_id": 1234,
                            "is_team_fundraiser": "F",
                            "fundraiser_hidden": "T",
                            "fundraiser_url": "https://runsignup.com/SomeFundraiserName",
                            "fundraiser_token": "a1b2c3d4e",
                            "fundraiser_owner": {
                                "user_id": 123,
                                "first_name": "John",
                                "last_name": "Doe",
                                "email": "example@example.com",
                                "phone_number": "555-555-5555"
                            },
                            "charity_id": "123",
                            "charity_name": "Charity Name",
                            "fundraiser_tagline": "This is a tagline.",
                            "personal_message": "Some personal message.",
                            "fundraising_goal": "$56.00",
                            "donation_period_id": 1,
                            "applied_for_refund": "F",
                            "last_modified_ts": 1111111123
                        }
                    ]
                }
            }
        },
        "securitySchemes": {
            "apiKey": {
                "type": "apiKey",
                "in": "query",
                "name": "api_key",
                "description": "RunSignup API Key"
            },
            "apiSecret": {
                "type": "apiKey",
                "in": "query",
                "name": "api_secret",
                "description": "RunSignup API Secret"
            }
        }
    },
    "paths": {
        "/v2/charity-group/get-charity-group-race-fundraisers.json": {
            "get": {
                "tags": [
                    "Charity Group"
                ],
                "summary": "Get Fundraisers for Charity Group",
                "description": "Get list of charity group fundraisers.",
                "operationId": "v2_charity_group_get_charity_group_race_fundraisers_json",
                "parameters": [
                    {
                        "name": "charity_group_id",
                        "in": "query",
                        "description": "ID of charity group.",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "rsu_api_key",
                        "in": "query",
                        "description": "API key.",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "X-RSU-API-SECRET",
                        "in": "header",
                        "description": "API secret.",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number to get.",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": "1"
                        }
                    },
                    {
                        "name": "results_per_page",
                        "in": "query",
                        "description": "Number of results per page.",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": "50"
                        }
                    },
                    {
                        "name": "modified_after_ts",
                        "in": "query",
                        "description": "Get fundraisers updated after the provided timestamp.",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "modified_before_ts",
                        "in": "query",
                        "description": "Get fundraisers updated before the provided timestamp.",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "security": [
                    {
                        "apiKey": [],
                        "apiSecret": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Charity Group Fundraisers - List of fundraisers associated with a charity group.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/V2CharityGroupGetCharityGroupRaceFundraisersGetResponse"
                                }
                            }
                        }
                    },
                    "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": []
            }
        }
    }
}