ASDinCloudDocs
API ReferenceAthlete equipment

Athlete equipment

View as Markdown

The equipment loan object

View as Markdown

Track the equipment issued to athletes and when it is returned. These endpoints require the Athlete equipment module and a sport ID.

Attributes

idinteger
Identifier assigned by the API.
sport_idinteger
Sport associated with this record.
athlete_idinteger
ID of an athlete in the selected sport.
itemsstring
Description of the equipment handed out, up to 10,000 characters.
notesstring or null
Optional notes, up to 10,000 characters. Send null to clear.
delivered_atinteger
Delivery time as a Unix timestamp in seconds.
returned_atinteger or null
Return time as Unix seconds, at or after delivery. Send null to clear a recorded return.
statusstring
Use outstanding for an open loan. Returned loans have status returned.
athlete_namestring
Display name of the athlete.
athlete_deletedboolean
Whether the athlete has been removed.
tscinteger
Creation time as a Unix timestamp in seconds.
tsuinteger
Last update time as a Unix timestamp in seconds.

List athlete equipment

View as Markdown
GET/api/v1/athlete-equipment

Lists equipment loan records in the workspace.

Permissions

Send your API key in X-API-Key. Required permissions are Athlete equipment → Read.

Headers

X-Sport-IdintegerRequired
The sport ID from List sports. Use the sport the record belongs to.

Query parameters

athlete_idinteger
Limit results to one athlete.
statusstring
Use outstanding, returned, or all. Defaults to outstanding.
qstring
Search by athlete name, equipment, or notes. Maximum 200 characters.
startinteger
Zero-based offset. Defaults to 0.
lengthinteger
Page size from 1 to 100. Defaults to 25.
sortstring
Use delivered_at, returned_at, or athlete_name. Defaults to delivered_at.
orderstring
Use asc or desc. Defaults to desc.

Returns

Returns loans in data. The total is counted before the status and text filters.

Errors

401
The API key is missing or invalid.
403
The API key lacks the required permission.
422
One or more fields failed validation.
503
The equipment module is temporarily unavailable.

List eligible athletes

View as Markdown
GET/api/v1/athlete-equipment/athletes

Lists athletes eligible for an equipment loan in the selected sport.

Permissions

Send your API key in X-API-Key. Required permissions are Athlete equipment → Read.

Headers

X-Sport-IdintegerRequired
The sport ID from List sports. Use the sport the record belongs to.

Query parameters

qstring
Search by given name or surname, up to 200 characters.
pageinteger
One-based page number. Defaults to 1.

Returns

Returns athlete IDs and labels in items, with a page size of 20 and the total number of matches.

Errors

401
The API key is missing or invalid.
403
The API key lacks the required permission.
422
One or more fields failed validation.
503
The equipment module is temporarily unavailable.

Retrieve an equipment loan

View as Markdown
GET/api/v1/athlete-equipment/{id}

Returns one equipment loan by ID.

Permissions

Send your API key in X-API-Key. Required permissions are Athlete equipment → Read.

Headers

X-Sport-IdintegerRequired
The sport ID from List sports. Use the sport the record belongs to.

Path parameters

idintegerRequired
ID of the equipment loan.

Returns

The equipment loan is returned in data.

Errors

401
The API key is missing or invalid.
403
The API key lacks the required permission.
404
The requested record was not found.

Create an equipment loan

View as Markdown
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-IdintegerRequired
The sport ID from List sports. Use the sport the record belongs to.

Body parameters

athlete_idintegerRequired
ID of an athlete in the selected sport.
itemsstringRequired
Description of the equipment handed out, up to 10,000 characters.
notesstring or null
Optional notes, up to 10,000 characters. Send null to clear.
delivered_atintegerRequired
Delivery time as a Unix timestamp in seconds.
returned_atinteger or null
Return time as Unix seconds, at or after delivery. Send null to clear a recorded return.

Returns

The created equipment loan is returned in data.

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.

Update an equipment loan

View as Markdown
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-IdintegerRequired
The sport ID from List sports. Use the sport the record belongs to.

Path parameters

idintegerRequired
ID of the equipment loan.

Body parameters

athlete_idinteger
ID of an athlete in the selected sport.
itemsstring
Description of the equipment handed out, up to 10,000 characters.
notesstring or null
Optional notes, up to 10,000 characters. Send null to clear.
delivered_atinteger
Delivery time as a Unix timestamp in seconds.
returned_atinteger 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.

Returns

Returns a successful update response.

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.

Delete an equipment loan

View as Markdown
DELETE/api/v1/athlete-equipment/{id}

Removes a loan from the equipment register.

Permissions

Send your API key in X-API-Key. Required permissions are Athlete equipment → Write.

Headers

X-Sport-IdintegerRequired
The sport ID from List sports. Use the sport the record belongs to.

Path parameters

idintegerRequired
ID of the equipment loan.

Returns

Returns a successful removal response.

Errors

401
The API key is missing or invalid.
403
The API key lacks the required permission.
404
The requested record was not found.
503
The equipment module is temporarily unavailable.