# Clubs - Sports camps

# Events

--- CLUB_SPORTS_CAMPS_UPDATED ---
{
    "event": "CLUB_SPORTS_CAMPS_UPDATED",
    "data": {
        "club_id": 1,
    }
}

# Validation

{
    "monitors": [
        "required",
        "array",

        {
            "type": [
                "required",
                "in: INTERNAL, SEMI_INTERNAL, EXTERNAL",
            ],
            "enabled": [
                "required",
                "boolean",
            ],
        },
    ],
}

# List

--- ENDPOINT ---

Domain: equidata 
Url: /clubs/1/sports-camps
Method: GET

--- EXAMPLE RESPONSE ---
[
    {
        "type": "INTERNAL",
        "enabled": true
    },
    {
        "type": "SEMI_INTERNAL",
        "enabled": true
    },
    {
        "type": "EXTERNAL",
        "enabled": true
    }
]

# Update

--- ENDPOINT ---

Domain: equidata 
Url: /clubs/1/sports-camps
Method: PUT

It is possible to update multiple types at once, though only changed types should be included.

--- EXAMPLE PAYLOAD ---
{
    "sports_camps": [
        {
            "type": "INTERNAL",
            "enabled": true
        },
        {
            "type": "SEMI_INTERNAL",
            "enabled": true
        }
    ]
}
--- EXAMPLE RESPONSE ---
[
    {
        "type": "INTERNAL",
        "enabled": true
    },
    {
        "type": "SEMI_INTERNAL",
        "enabled": true
    },
    {
        "type": "EXTERNAL",
        "enabled": false
    }
]