# Export athletes `GET /api/v1/athletes/export` Exports matching athletes to CSV. ## Permissions Send your API key in `X-API-Key`. Required permissions are **Athletes → Read**. ## Headers - `X-Sport-Id` (integer, required) — The sport ID from [List sports](/api/sports/list.md). Use the sport the record belongs to. ## 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 all, active, inactive, pending, or pending_activation. Defaults to all. - `subscription_from` (date string) — Start of the subscription period in YYYY-MM-DD format. Use with subscription_to. - `subscription_to` (date string) — End of the subscription period in YYYY-MM-DD format. Use with subscription_from. - `include_group` (integer) — Use 1 to include the team. - `include_birth` (integer) — Use 1 to include birth details. - `include_contacts` (integer) — Use 1 to include contact details. - `include_residence` (integer) — Use 1 to include residence and contact details. - `include_consents` (integer) — Use 1 to include consent and notification details. - `include_parents` (integer) — Use 1 to include parent details. - `include_parents_extended` (integer) — Use 1 to include extended parent details. - `include_medical` (integer) — Use 1 to include medical certificate dates. - `include_identity_doc` (integer) — Use 1 to include identity document validity. - `include_payments` (integer) — Use 1 to include balances. Requires Subscriptions → Read and Payments → Read. - `include_presubscription` (integer) — Use 1 to include registration request details. - `include_memberships` (integer) — Use 1 to include membership details. - `include_membership_history` (integer) — Use 1 to include prior records when including memberships. - `include_metadata` (integer) — Use 1 to include custom fields. ## 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/export" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "X-Sport-Id: ${SPORT_ID:?Set SPORT_ID}" \ --data-urlencode "subscription_status=active" \ --data-urlencode "include_contacts=1" \ --output "athletes.csv" ``` ## Response **200 OK** Returns a CSV attachment containing all matching athletes. ```http HTTP/1.1 200 OK Content-Type: text/csv; charset=UTF-8 Content-Disposition: attachment; filename="export_atleti_2026-11-14_120000.csv" ``` ## Errors - `401` — The API key is missing or invalid. - `403` — The API key lacks the required permission. - `404` — The requested record was not found. - `422` — One or more fields failed validation.