# List subscriptions `GET /api/v1/subscriptions` Lists subscription records in the workspace. ## Permissions Send your API key in `X-API-Key`. Required permissions are **Subscriptions → 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. - `plan_id` (integer) — ID of the plan. - `expand_athlete` (integer) — Use 1 to include the athlete record. - `expand_plan` (integer) — Use 1 to include the plan record. - `status` (string) — Use active, expired, suspended, custom_amount, or all. Defaults to active. - `unpaid` (boolean) — Use true to include only subscriptions with an outstanding balance. This removes the end-date restriction from the active and expired filters. - `view_totals` (integer) — Use 1 to request calculated totals. - `q` (string) — Search athlete names or subscription notes. - `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, subscription_start, subscription_end, plan_name, athlete_fullname, amount, amount_paid, amount_left, 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. ## 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/subscriptions" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "X-Sport-Id: ${SPORT_ID:?Set SPORT_ID}" \ --data-urlencode "status=active" \ --data-urlencode "length=25" ``` ## Response **200 OK** Returns matching subscriptions, names, and calculated totals in `data`. Example with fictional data and selected fields. ```json { "status": "success", "data": [ { "id": 53, "sport_id": 3, "athlete_id": 42, "plan_id": 13, "notes": null, "custom_amount": null, "subscription_start": 1788220800, "subscription_end": 1819756800, "suspended_at": null, "canceled_at": null, "tsc": 1794564000, "tsu": 1794564000, "athlete_fullname": "EXAMPLE ALEX", "plan_name": "Junior season", "amount": 18000, "amount_paid": 0, "amount_left": 18000, "status": "active" } ], "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.