ASDinCloudDocs

The coach object

View as Markdown

Coaches are staff members associated with a sport. The API also provides work session reports and corrections.

Attributes

idinteger
Identifier assigned by the API.
sport_idinteger
ID of the sport.
typestring
Coach records have type coach.
firstnamestring or null
Given name.
surnamestring or null
Family name.
taxcodestring or null
Tax identification code.
emailstring or null
Contact email.
phonestring or null
Contact phone.
notesstring or null
Profile notes.
addressstring or null
Street address.
citystring or null
City of residence.
provincestring or null
Province or region of residence.
zipstring or null
Postal code.
countrystring or null
Country of residence.
nationalitystring or null
Nationality.
birth_citystring or null
Place of birth.
birth_provincestring or null
Province or region of birth.
birth_countrystring or null
Country of birth.
id_numberstring or null
Identification document number.
car_makestring or null
Vehicle make.
car_modelstring or null
Vehicle model.
car_platestring or null
Vehicle registration number.
bank_namestring or null
Bank name.
ibanstring or null
Bank account IBAN.
birthdayinteger or null
Date of birth as Unix seconds.
to_notifyboolean or null
Whether the coach receives notifications.
privacy_consentboolean or null
Recorded privacy consent.
privacy_accepted_atinteger or null
Consent time in Unix seconds.
metadatamap or null
Additional coach information. Supplying a map replaces the stored metadata.
archived_atinteger or null
Archive time as Unix seconds, or null for active records.
fullnamestring
Display name added when listing coaches.
current_membershipmap or null
Current membership summary when requested.
current_membership_presentboolean
Whether a current membership exists when requested.

List coaches

View as Markdown
GET/api/v1/coaches

Lists coach records in the workspace.

Permissions

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

Headers

X-Sport-Idinteger
Use the sport ID to limit the response to one sport.

Query parameters

team_idinteger
Include coaches assigned to this team.
exclude_team_idinteger
Exclude coaches assigned to this team.
archivedboolean
Use true to list archived records. The default lists active records.
view_membership_statusinteger
Use 1 to include current membership information.
qstring
Search by name, email, or tax code.
lengthinteger
Number of records to return.
startinteger
Zero-based offset.
drawstring
Optional request marker echoed in the response.
pageinteger
One-based page, used when length and start are omitted.
pageSizeinteger
Items per page, up to 100, when using page.
sortstring
Sort by id, firstname, surname, taxcode, email, phone, portal_enabled, tsc, tsu, or current membership fields when expanded. Prefix the field name with a minus sign for descending order.
orderstring
Direction for unprefixed sort fields. Use asc or desc.

Returns

Returns matching coaches in data with counts before and after text search.

Errors

401
The API key is missing or invalid.
403
The API key lacks the required permission.

Retrieve a coach

View as Markdown
GET/api/v1/coaches/{id}

Returns one coach by ID.

Permissions

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

Headers

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

Path parameters

idintegerRequired
ID of the coach.

Returns

The coach 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.

Update a coach

View as Markdown
PATCH / PUT / POST/api/v1/coaches/{id}

Updates a coach by ID.

Permissions

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

Headers

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

Path parameters

idintegerRequired
ID of the coach.

Body parameters

firstnamestring or null
Given name.
surnamestring or null
Family name.
taxcodestring or null
Tax identification code.
emailstring or null
Contact email.
phonestring or null
Contact phone.
notesstring or null
Profile notes.
addressstring or null
Street address.
citystring or null
City of residence.
provincestring or null
Province or region of residence.
zipstring or null
Postal code.
countrystring or null
Country of residence.
nationalitystring or null
Nationality.
birth_citystring or null
Place of birth.
birth_provincestring or null
Province or region of birth.
birth_countrystring or null
Country of birth.
id_numberstring or null
Identification document number.
car_makestring or null
Vehicle make.
car_modelstring or null
Vehicle model.
car_platestring or null
Vehicle registration number.
bank_namestring or null
Bank name.
ibanstring or null
Bank account IBAN.
birthdayinteger or null
Date of birth as Unix seconds.
to_notifyboolean or null
Whether the coach receives notifications.
privacy_consentboolean or null
Recorded privacy consent.
privacy_accepted_atinteger or null
Consent time in Unix seconds.
metadatamap or null
Additional coach information. Supplying a map replaces the stored metadata.
archivedboolean
Use true to archive this coach or false to reactivate the record.

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.
500
The coach could not be saved.

Delete a coach

View as Markdown
DELETE/api/v1/coaches/{id}
POST/api/v1/coaches/{id}/delete

Removes a coach record.

Permissions

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

Headers

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

Path parameters

idintegerRequired
ID of the coach.

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.
400
The coach could not be removed.

Export coaches

View as Markdown
GET/api/v1/coaches/export

Exports matching coach profiles as CSV.

Permissions

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

Headers

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

Query parameters

team_idinteger
Include coaches assigned to this team.
exclude_team_idinteger
Exclude coaches assigned to this team.
statusstring
Use archived to export archived coaches.
archived_atinteger
Legacy archive filter. Use 1 to export archived coaches.
include_birthinteger
Use 1 to include birth details.
include_residenceinteger
Use 1 to include residence details.
include_contactsinteger
Use 1 to include contacts details.
include_qualificationinteger
Use 1 to include qualification details.
include_metadatainteger
Use 1 to include metadata details.

Returns

Returns all matching records as a CSV attachment.

Errors

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

Send a coach portal invitation

View as Markdown
POST/api/v1/coaches/{coach_id}/portal-invite

Sends a portal invitation to the coach’s email address.

Permissions

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

Headers

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

Path parameters

coach_idintegerRequired
ID of the coach in the selected sport.

Returns

Returns the invitation result, destination address, number of enabled sports, and message ID.

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
The coach needs an email address.
500
The invitation could not be prepared.
502
The invitation email could not be sent.

Get the collective work session report

View as Markdown
GET/api/v1/coaches/work-sessions

Reports work sessions for all coaches in the selected sport.

Permissions

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

Headers

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

Query parameters

fromdate string
Inclusive first day in YYYY-MM-DD format. Defaults to the first day of the current month.
todate string
Inclusive last day in YYYY-MM-DD format. Defaults to the last day of the current month.
pageinteger
One-based page number, with up to 50 session rows split by day.

Returns

Returns daily session rows, period totals, open sessions, and pagination. Daily totals cover the entire day even if its sessions span pages.

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
The request or date interval is invalid.
503
Work sessions are temporarily unavailable.

List collective work session changes

View as Markdown
GET/api/v1/coaches/work-sessions/history

Lists work session changes across the selected sport.

Permissions

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

Headers

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

Query parameters

fromdate string
Inclusive first change date. Use with to.
todate string
Inclusive last change date. Use with from.
actionstring
Use start, end, create, update, delete, or office. The office filter selects operator changes.
pageinteger
One-based page number. Each page contains up to 20 events.

Returns

Returns changes with before and after values, the affected coach, and the recorded actor. Includes changes to removed sessions.

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
The request or date interval is invalid.
503
Work sessions are temporarily unavailable.

Export collective work sessions

View as Markdown
GET/api/v1/coaches/work-sessions/export

Exports work sessions for the selected sport.

Permissions

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

Headers

X-Sport-IdintegerRequired
The sport ID from List sports. Use the sport the record belongs to.
X-Localestring
Use en for English CSV labels.

Query parameters

fromdate string
Inclusive first day in YYYY-MM-DD format. Defaults to the first day of the current month.
todate string
Inclusive last day in YYYY-MM-DD format. Defaults to the last day of the current month.

Returns

Returns a semicolon-delimited UTF-8 CSV with one row per session and day. The export includes the full requested period.

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
The request or date interval is invalid.
503
Work sessions are temporarily unavailable.

Get a coach’s work session report

View as Markdown
GET/api/v1/coaches/{coach_id}/work-sessions

Reports a coach’s work sessions for a date range.

Permissions

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

Headers

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

Path parameters

coach_idintegerRequired
ID of the coach in the selected sport.

Query parameters

fromdate string
Inclusive first day in YYYY-MM-DD format. Defaults to the first day of the current month.
todate string
Inclusive last day in YYYY-MM-DD format. Defaults to the last day of the current month.
pageinteger
One-based page number.
pageSizeinteger
Days per page, from 1 to 31. Defaults to 10.

Returns

Returns dates, daily sessions, period totals, and the coach’s current and most recent completed session.

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
The request or date interval is invalid.
503
Work sessions are temporarily unavailable.

List a coach’s work session changes

View as Markdown
GET/api/v1/coaches/{coach_id}/work-sessions/history

Lists one coach’s work session changes.

Permissions

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

Headers

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

Path parameters

coach_idintegerRequired
ID of the coach in the selected sport.

Query parameters

fromdate string
Inclusive first change date. Use with to.
todate string
Inclusive last change date. Use with from.
actionstring
Use start, end, create, update, delete, or office. The office filter selects operator changes.
pageinteger
One-based page number. Each page contains up to 20 events.

Returns

Returns up to 20 audit events per page, including changes to removed sessions.

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
The request or date interval is invalid.
503
Work sessions are temporarily unavailable.

Export a coach’s work sessions

View as Markdown
GET/api/v1/coaches/{coach_id}/work-sessions/export

Exports work sessions for one coach.

Permissions

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

Headers

X-Sport-IdintegerRequired
The sport ID from List sports. Use the sport the record belongs to.
X-Localestring
Use en for English CSV labels.

Path parameters

coach_idintegerRequired
ID of the coach in the selected sport.

Query parameters

fromdate string
Inclusive first day in YYYY-MM-DD format. Defaults to the first day of the current month.
todate string
Inclusive last day in YYYY-MM-DD format. Defaults to the last day of the current month.

Returns

Returns a semicolon-delimited UTF-8 CSV with one row per session and day. The export includes the full requested period.

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
The request or date interval is invalid.
503
Work sessions are temporarily unavailable.

Add a work session

View as Markdown
POST/api/v1/coaches/{coach_id}/work-sessions

Adds a work session for a coach.

Permissions

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

Headers

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

Path parameters

coach_idintegerRequired
ID of the coach in the selected sport.

Body parameters

request_idstringRequired
Unique request ID, 16–64 letters, digits, hyphens, or underscores. Reuse it for an identical retry.
started_atISO 8601 timestampRequired
Session start with seconds and an explicit timezone offset or Z.
ended_atISO 8601 timestamp or null
Session end with seconds and offset or Z. Use null for an open session.
reasonstringRequired
Reason for the change, up to 1,000 characters.

Returns

Returns the new session and its version.

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
The request or date interval is invalid.
503
Work sessions are temporarily unavailable.
409
The session version is stale, the times overlap, or the request ID was previously used with different values.

Correct a work session

View as Markdown
POST/api/v1/coaches/{coach_id}/work-sessions/{session_id}

Corrects a work session using its current version.

Permissions

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

Headers

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

Path parameters

coach_idintegerRequired
ID of the coach in the selected sport.
session_idintegerRequired
ID of the work session.

Body parameters

request_idstringRequired
Unique request ID, 16–64 letters, digits, hyphens, or underscores. Reuse it for an identical retry.
versionintegerRequired
Current session version from the report.
started_atISO 8601 timestampRequired
Session start with seconds and an explicit timezone offset or Z.
ended_atISO 8601 timestamp or null
Session end with seconds and offset or Z. Use null for an open session.
reasonstringRequired
Reason for the change, up to 1,000 characters.

Returns

Returns the corrected session and its new version.

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
The request or date interval is invalid.
503
Work sessions are temporarily unavailable.
409
The session version is stale, the times overlap, or the request ID was previously used with different values.

Remove a work session

View as Markdown
DELETE/api/v1/coaches/{coach_id}/work-sessions/{session_id}

Removes a work session from reports and totals while retaining its history.

Permissions

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

Headers

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

Path parameters

coach_idintegerRequired
ID of the coach in the selected sport.
session_idintegerRequired
ID of the work session.

Body parameters

request_idstringRequired
Unique request ID, 16–64 letters, digits, hyphens, or underscores. Reuse it for an identical retry.
versionintegerRequired
Current session version from the report.
reasonstringRequired
Reason for the change, up to 1,000 characters.

Returns

Returns the removed session with a deletion timestamp and new version.

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
The request or date interval is invalid.
503
Work sessions are temporarily unavailable.
409
The session version is stale, the times overlap, or the request ID was previously used with different values.