# List memberships `GET /api/v1/memberships` Lists membership records in the workspace. ## Permissions Send your API key in `X-API-Key`. Required permissions are **Memberships → Read**. ## Headers - `X-Sport-Id` (integer) — Use the sport ID to limit the response to one sport. ## Query parameters - `subject_type` (string) — Use athlete, coach, or staff. - `subject_id` (integer) — ID of the person holding the membership. - `organization` (string) — Governing organization, up to 100 characters. - `season` (string) — Season label, for example 2026/2027. - `card_type` (string or null) — Membership card category, up to 100 characters. - `status` (string) — Use active, pending, expired, canceled, or all. - `team_id` (integer) — Filter by team assignment. - `q` (string) — Search names, organization, card number, card category, or season. - `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, subject_name, organization, card_number, card_type, season_label, issued_at, valid_from, valid_to, status, 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/memberships" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "X-Sport-Id: ${SPORT_ID:?Set SPORT_ID}" \ --data-urlencode "subject_type=athlete" \ --data-urlencode "status=active" \ --data-urlencode "length=25" ``` ## Response **200 OK** Returns memberships in `data` with counts before and after text search. Example with fictional data and selected fields. ```json { "status": "success", "data": [ { "id": 28, "sport_id": 3, "subject_type": "athlete", "subject_id": 42, "membership_plan_id": 8, "organization": "Example Sports Federation", "card_number": "DEMO-0042", "card_type": "Junior", "issued_at": 1788220800, "valid_from": 1788220800, "valid_to": 1819756800, "season_label": "2026/2027", "subscription_id": null, "payment_id": null, "canceled_at": null, "notes": null, "status": "active", "subject_name": "EXAMPLE ALEX", "membership_plan_name": "Junior annual registration" } ], "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.