# List medical certificates `GET /api/v1/medicals` Lists medical certificate records in the workspace. ## Permissions Send your API key in `X-API-Key`. Required permissions are **Medicals → Read**. ## Headers - `X-Sport-Id` (integer) — Use the sport ID to limit the response to one sport. ## Query parameters - `athlete_id` (integer) — ID of the athlete in the selected sport. - `expand_athlete` (integer) — Use 1 to include the related athlete when available. - `q` (string) — Search document names and any expanded recipient names. - `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, name, belongs_to, belongs_obj_id, released_at, expires_at, got_paper, is_agonistic, filetype, filesize, url, tsc, or tsu. Prefix the field name with a minus sign for descending order. - `order` (string) — Direction for unprefixed sort fields. Use asc or desc. - `validity` (string) — Use valid for certificates that expire today or later. Defaults to all. - `got_paper` (integer) — Use 1 for certificates received on paper, or 0 for the rest. - `is_agonistic` (integer) — Use 1 for competitive certificates, or 0 for non-competitive certificates. - `from_date` (integer) — Inclusive lower bound on expiry, in Unix seconds. - `to_date` (integer) — Inclusive upper bound on expiry, in Unix seconds. - `page` (integer) — One-based page when length and start are omitted. - `pageSize` (integer) — Page size when using page. ## 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/medicals" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "X-Sport-Id: ${SPORT_ID:?Set SPORT_ID}" \ --data-urlencode "athlete_id=42" \ --data-urlencode "validity=valid" ``` ## Response **200 OK** Returns records in `data`, counts before and after text search, and the echoed `draw` marker. The default order is most recent expiration first. Example with fictional data and selected fields. ```json { "status": "success", "data": [ { "id": 32, "sport_id": 3, "belongs_to": "athlete", "belongs_obj_id": 42, "name": "Medical", "doc_number": "CERT-DEMO-001", "released_at": 1788220800, "expires_at": 1819756800, "is_medical": true, "got_paper": true, "url": null, "notes": null, "is_agonistic": 0 } ], "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.