# Create an equipment loan `POST /api/v1/athlete-equipment` Creates an equipment loan. ## 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. ## Body parameters - `athlete_id` (integer, required) — ID of an athlete in the selected sport. - `items` (string, required) — 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, required) — 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. ## Request Set ASDINCLOUD_API_KEY and any variables named in the example before running it. ```sh curl --request POST \ --url "https://api.asdincloud.com/api/v1/athlete-equipment" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "X-Sport-Id: ${SPORT_ID:?Set SPORT_ID}" \ --header "Content-Type: application/json" \ --data '{"athlete_id":42,"items":"Training bib and equipment bag","delivered_at":1794564000}' ``` ## Response **201 Created** The created equipment loan is returned in data. 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": null, "status": "outstanding", "athlete_name": "Example Alex", "athlete_deleted": false, "tsc": 1794564000, "tsu": 1794564000 } } ``` ## Errors - `401` — The API key is missing or invalid. - `403` — The API key lacks the required permission. - `404` — The athlete does not exist in the selected sport or has been removed. - `422` — One or more fields failed validation. - `503` — The equipment module is temporarily unavailable.