# Update attendance for a day `PUT /api/v1/team_attendance/day` Sets attendance for one or both slots on a day for a current team athlete. ## Permissions Send your API key in `X-API-Key`. Required permissions are **Team attendance → Write**. ## Headers - `X-Sport-Id` (integer, required) — The sport ID from [List sports](/api/sports/list.md). Use the sport the record belongs to. ## Body parameters - `team_id` (integer, required) — ID of an active team in the selected sport. - `athlete_id` (integer, required) — ID of a current team athlete. - `date` (string, required) — Calendar date in YYYY-MM-DD format. - `slots` (map, required) — Send am, pm, or both, each with a boolean value. Omitted slots retain their values. ## Request Set ASDINCLOUD_API_KEY and any variables named in the example before running it. ```sh curl --request PUT \ --url "https://api.asdincloud.com/api/v1/team_attendance/day" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "X-Sport-Id: ${SPORT_ID:?Set SPORT_ID}" \ --header "Content-Type: application/json" \ --data '{"team_id":9,"athlete_id":42,"date":"2026-11-14","slots":{"am":true}}' ``` ## Response **200 OK** Returns the athlete, the date, and the attendance entries updated by the request. Example with fictional data and selected fields. ```json { "status": "success", "data": { "athlete_id": 42, "date": "2026-11-14", "attendances": [ { "id": 18, "athlete_id": 42, "date": "2026-11-14", "slot": "am", "present": true, "set_by_role": "admin", "set_by_name": null, "updated_at": "2026-11-14 08:22:00" } ] } } ``` ## Errors - `401` — The API key is missing or invalid. - `403` — The API key lacks the required permission. - `404` — The requested record was not found. - `409` — The team is archived. - `422` — An input value is invalid or the athlete is outside the current team. - `500` — The attendance entries could not be saved.