# Clubs - Activities

# Types

--- ENDPOINT ---

Domain: equidata 
Url: /activity-types
Method: GET

--- EXAMPLE RESPONSE ---
[
    {
        "id": 1,
        "type_nl": "Jumping",
        "type_fr": "Sauter",
    },
    // ...other activity types
]

# Events

--- CLUB_ACTIVITIES_UPDATED ---
{
    "event": "CLUB_ACTIVITIES_UPDATED",
    "data": {
        "club_id": 12345
    }
}

# Validation

{
    "activities": [
        {
            "activity_type_id": [
                "required",
                "a valid activity type",
                "unique per club"
            ],
            "group_lessons": [
                "required",
                "boolean"
            ],
            "private_lessons": [
                "required",
                "boolean"
            ],
            "internships": [
                "required",
                "boolean"
            ],
        }
        // ...other activities
    ]
}

# List

--- ENDPOINT ---

Domain: equidata 
Url: /clubs/123/activities
Method: GET

--- EXAMPLE RESPONSE ---
[
    {
        "activity_type": {}, // an activity type entity
        "group_lessons": true,
        "private_lessons": false,
        "internships": false
    }
    // ...other activities
]

# Update

Warning

Make sure to add all data to the payload every time you call this endpoint.

  • If your intention is to add a new entry, include the existing entries in the payload.
  • If your intention is to delete an existing entry, add all remaining entries in the payload.

--- ENDPOINT ---

Domain: equidata 
Url: /clubs/123/activities
Method: PUT

--- EXAMPLE PAYLOAD ---
{
    "activities": [
        {
            "activity_type_id": 1,
            "group_lessons": true,
            "private_lessons": true,
            "internships": true
        }
    ] 
}
--- EXAMPLE RESPONSE ---
[
    {
        "activity_type": {}, // an activity type entity
        "group_lessons": true,
        "private_lessons": true,
        "internships": true
    }
    // ...other activities
]