# List athletes `GET /api/v1/athletes` Lists athlete records in the workspace. ## Permissions Send your API key in `X-API-Key`. Required permissions are **Athletes → Read**. ## Headers - `X-Sport-Id` (integer) — Use the sport ID to limit the response to one sport. ## Query parameters - `team_id` (integer) — Include athletes assigned to this team. - `exclude_team_id` (integer) — Exclude athletes assigned to this team. - `plan_id` (integer) — Filter by a linked subscription plan. - `subscription_status` (string) — Use active, inactive, pending_activation, or any. The default is any. Use all as an alias for any. - `active_only` (integer) — Use 1 to filter to active subscriptions when subscription_status is omitted. - `taxcode_exact` (string) — Exact 16-character alphanumeric tax code. - `is_injured` (integer) — Use 1 for injured athletes or 0 for other athletes. - `q` (string) — Search name, email, or tax code. - `expand_medical` (integer) — Use 1 to include medical certificate information. - `expand_presubscription` (integer) — Use 1 to include the latest registration request. - `view_totals` (integer) — Use 1 to include financial totals. - `view_membership_totals` (integer) — Use 1 to include membership fee totals. - `view_membership_status` (integer) — Use 1 to include current membership status. - `expand_subscription_tax` (integer) — Use 1 to include the membership fee balance. - `expand_monthly_payments` (integer) — Use 1 to include monthly payments. Requires Payments → Read. - `payment_month_from` (string) — First month, in YYYY-MM format, when expanding monthly payments. - `payment_month_to` (string) — Last month, in YYYY-MM format, when expanding monthly payments. - `include_expected_payments` (integer) — Use 1 to include expected payments in the monthly expansion. - `length` (integer) — Number of records to return. - `start` (integer) — Zero-based offset. - `draw` (string) — Optional request marker echoed in the response. - `sort` (string) — Sort by id, firstname, surname, email, taxcode, birthday, phone, city, province, country, tsc, tsu, is_injured, is_retired, or supported expansion fields. Prefix the field name with a minus sign for descending order. - `order` (string) — Direction for unprefixed sort fields. Use asc or desc. ## Request Set ASDINCLOUD_API_KEY and any variables named in the example before running it. ```sh curl --get \ --url "https://api.asdincloud.com/api/v1/athletes" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "X-Sport-Id: ${SPORT_ID:?Set SPORT_ID}" \ --data-urlencode "length=25" \ --data-urlencode "sort=surname" ``` ## Response **200 OK** Returns matching athletes and any requested expansions. Financial totals and their sort fields require Subscriptions → Read and Payments → Read. Example with fictional data and selected fields. ```json { "status": "success", "data": [ { "id": 42, "sport_id": 3, "firstname": "ALEX", "surname": "EXAMPLE", "email": "alex@example.com", "shirt_number": 7, "is_injured": false, "injured_at": null, "is_retired": false, "retired_at": null, "metadata": {} } ], "records_total": 1, "records_filtered": 1, "draw": null } ``` ## Errors - `401` — The API key is missing or invalid. - `403` — The API key lacks the required permission. - `400` — A tax code or monthly payment date range is invalid. - `422` — One or more fields failed validation.