Remove several athletes from the agent's client list
Backs the Remove Clients modal, where athletes are selected with checkboxes and confirmed together (ENG-1465). *
- All-or-nothing: every selected athlete is verified before anything is removed, so a selection containing an athlete the agent does not represent removes nobody and returns ATHLETE_NOT_LINKED listing the rejected ids. That keeps the modal able to say exactly what happened.
- Each athlete is then removed through the same path as DELETE /agent/athletes/, so notifications, payout-bypass recalculation and the Segment event stay per athlete. Historical payout records are untouched: an agent keeps their pay history for deals they managed.
- Two ways to say what to remove. List the ids in
athlete_ids, or sendis_all_selectedfor Select All and let the server resolve them. Select All means every row the current filter matches, not the current page, so send the samefilterthe roster list was showing — without it, Select All means the whole roster. Rows the agent then unchecked go inexcluded_athlete_id. The convention matches the partner bulk-hire and content-folder endpoints.
Authorizations
JWT Bearer token authentication. Use the /api/login endpoint to obtain a token.
Body
Athlete user ids. Required unless is_all_selected is set. All must be on the authenticated agent's roster.
1Select All. The server resolves the ids from the filtered roster, so the client does not have to page through it first. The boolean, the strings true and 1, and the number 1 are all accepted.
true
Only read with is_all_selected, and then it defines what all means. Same shapes GET /agent/athletes documents.
Only read with is_all_selected. Rows the agent unchecked after selecting all.