# Update an equipment loan `PATCH /api/v1/athlete-equipment/{id}` Updates an equipment loan by ID. ## Permissions Send your API key in `X-API-Key`. Required permissions are **Athlete equipment → Write**. ## Headers - `X-Sport-Id` (integer, required) — The sport ID from [List sports](/api/sports/list.md). Use the sport the record belongs to. ## Path parameters - `id` (integer, required) — ID of the equipment loan. ## Body parameters - `athlete_id` (integer) — ID of an athlete in the selected sport. - `items` (string) — Description of the equipment handed out, up to 10,000 characters. - `notes` (string or null) — Optional notes, up to 10,000 characters. Send null to clear. - `delivered_at` (integer) — Delivery time as a Unix timestamp in seconds. - `returned_at` (integer or null) — Return time as Unix seconds, at or after delivery. Send null to clear a recorded return. Omitted fields retain their current values. A loan can be marked returned even if its original athlete has since been removed. ## Request Set ASDINCLOUD_API_KEY and any variables named in the example before running it. ```sh curl --request PATCH \ --url "https://api.asdincloud.com/api/v1/athlete-equipment/${ID:?Set ID}" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "X-Sport-Id: ${SPORT_ID:?Set SPORT_ID}" \ --header "Content-Type: application/json" \ --data '{"returned_at":1794650400}' ``` ## Response **200 OK** Returns a successful update response. Example with fictional data and selected fields. ```json { "status": "success", "data": { "id": 8, "athlete_id": 42, "sport_id": 3, "items": "Training bib and equipment bag", "notes": null, "delivered_at": 1794564000, "returned_at": 1794650400, "status": "returned", "athlete_name": "Example Alex", "athlete_deleted": false, "tsc": 1794564000, "tsu": 1794650400 } } ``` ## 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. - `503` — The equipment module is temporarily unavailable.