ASDinCloudDocs
API ReferencePresubscriptions

Presubscriptions

View as Markdown

The registration request object

View as Markdown

Presubscriptions are registration requests. They hold submitted form values and the status of the workspace’s approval.

Attributes

idinteger
Identifier assigned by the API.
sport_idinteger
ID of the sport associated with this request.
request_typestring
Request category: athlete, coach, or staff.
enrollment_scopestring or null
Use seasonal or occasional. Null indicates a request without a season assignment.
target_season_labelstring or null
Target season in YYYY/YYYY format, when the request is seasonal.
inputmap
Submitted form values. Use the field keys returned by the existing request.
form_idinteger or null
ID of the form used to submit the request.
approved_atinteger or null
Approval time as Unix seconds.
verified_atinteger or null
Verification time as Unix seconds.
athlete_idinteger or null
ID of the linked athlete after approval.
staff_idinteger or null
ID of the linked coach or staff member after approval.
medical_statusmap or null
Status of the associated certificate, if applicable.
onApprovedSetupmap or null
Configuration used for approval.
tscinteger or null
Creation time as Unix seconds.
tsuinteger or null
Last update time as Unix seconds.

List presubscriptions

View as Markdown
GET/api/v1/presubscriptions

Lists registration request records in the workspace.

Permissions

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

Headers

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

Query parameters

audiencestring
Use athlete, coach, staff, or all. Defaults to athlete.
statusstring
Use pending or approved. Defaults to pending.
athlete_idinteger
Filter by linked athlete.
enrollment_scopestring
Use seasonal, occasional, or unassigned.
seasonstring
Use a season label, current, unassigned, or all.
fields[presubscriptions]string
Optional comma-separated field list.
qstring
Search submitted form values.
lengthinteger
Number of records to return.
startinteger
Zero-based offset.
drawstring
Optional request marker echoed in the response.
sortstring
Sort by id, tsc, or tsu. Prefix the field name with a minus sign for descending order.
orderstring
Direction for unprefixed sort fields. Use asc or desc.

Returns

Returns matching requests in data, with form labels and applicant names where available.

Errors

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

Retrieve a registration request

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

Returns one registration request by ID.

Permissions

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

Headers

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

Path parameters

idintegerRequired
ID of the registration request.

Returns

The registration request 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 registration request

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

Updates a registration request by ID.

Permissions

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

Headers

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

Path parameters

idintegerRequired
ID of the registration request.

Body parameters

inputmap
Submitted form values. Use the field keys returned by the existing request.
consent_answersmap of booleans
Optional consent item IDs mapped to true or false. Required consent answers cannot be changed.
template_idinteger
ID of an optional template override.

Sending input replaces the submitted values. Use Apply season assignments to change the season.

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.

Delete a registration request

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

Removes a registration request.

Permissions

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

Headers

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

Path parameters

idintegerRequired
ID of the registration request.

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 request could not be processed.

List form answer columns

View as Markdown
GET/api/v1/presubscriptions/answer-columns

Lists available submitted answer columns for the selected request status and audience.

Permissions

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

Headers

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

Query parameters

statusstring
Use pending or approved. Defaults to pending.
audiencestring
Use athlete, coach, staff, or all. Defaults to athlete.

Returns

Returns form IDs, field labels and key information in data.

Errors

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

Approve a registration request

View as Markdown
POST/api/v1/presubscriptions/{id}/approve

Approves the request and links or creates the applicable athlete or staff record.

Permissions

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

Headers

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

Path parameters

idintegerRequired
ID of the registration request.

Body parameters

onApprovedSetupmap
Optional approval configuration. Athlete requests support plan_ids, team_ids, and send_approval_email.

Athlete requests need a given name, surname, and tax code before approval. Configure the plans, teams, and email behavior before approving.

Approval can create linked records. If the workspace requires a user for those writes, complete the approval in the workspace.

Returns

Returns the approval result and related records in data. An already approved request returns its existing linked result.

Errors

401
The API key is missing or invalid.
403
The API key lacks the required permission.
404
The requested record was not found.
409
An existing identity or document conflicts with the request.
422
One or more fields failed validation.
500
Approval failed.
503
The approval document could not be prepared.

Clear a request approval

View as Markdown
POST/api/v1/presubscriptions/{id}/unapprove

Clears the approval timestamp on a request.

Permissions

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

Headers

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

Path parameters

idintegerRequired
ID of the registration request.

Returns

Returns the request with a null approval timestamp. Previously created records remain linked.

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.

Get approval email options

View as Markdown
GET/api/v1/presubscriptions/{id}/send-approval

Gets the template choices for resending an approved athlete request email.

Permissions

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

Headers

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

Path parameters

idintegerRequired
ID of the registration request.

Returns

Returns the selected template, whether the content was customized, and available templates.

Errors

401
The API key is missing or invalid.
403
The API key lacks the required permission.
404
The requested record was not found.
409
The request has not been approved.
422
The request, recipient, or template is ineligible.

Resend an approval email

View as Markdown
POST/api/v1/presubscriptions/{id}/send-approval

Resends the approval email for a supported approved request.

Permissions

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

Headers

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

Path parameters

idintegerRequired
ID of the registration request.

Body parameters

template_idinteger
Optional email template ID from the approval email options.

Returns

Returns the recipient addresses and whether the template preference was saved.

Errors

401
The API key is missing or invalid.
403
The API key lacks the required permission.
404
The requested record was not found.
409
The request has not been approved.
422
The request, recipient, or template is ineligible.
502
The email could not be delivered.
503
The approval document could not be prepared.

Generate a registration request PDF

View as Markdown
POST/api/v1/presubscriptions/{id}/print

Generates a PDF of the registration request.

Permissions

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

Headers

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

Path parameters

idintegerRequired
ID of the registration request.

Body parameters

template_idinteger
ID of an optional template override.

Returns

Returns the generated PDF URL. The chosen print template is saved on the request.

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 PDF could not be generated.

Preview registration request HTML

View as Markdown
POST/api/v1/presubscriptions/{id}/preview

Renders the registration request as HTML in a JSON response.

Permissions

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

Headers

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

Path parameters

idintegerRequired
ID of the registration request.

Body parameters

template_idinteger
Template override. Send as a URL-encoded form field.

Returns

Returns the rendered document in html.

Errors

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

View registration request HTML

View as Markdown
GET/api/v1/presubscriptions/{id}/preview_html

Returns the HTML version of the request using the configured print template.

Permissions

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

Headers

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

Path parameters

idintegerRequired
ID of the registration request.

Returns

Returns an HTML document. A rendering failure can also return an HTML error page.

Errors

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

Preview season assignments

View as Markdown
POST/api/v1/presubscriptions/season-assignment/preview

Finds approved athlete requests eligible for season assignment in a submission date range.

Permissions

Send your API key in X-API-Key. Required permissions are Presubscriptions → Write and Athletes → Read.

Headers

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

Body parameters

fromdate stringRequired
Inclusive first submission date in YYYY-MM-DD format.
todate stringRequired
Inclusive last submission date in YYYY-MM-DD format.
include_assignedboolean
Use true to include requests that already have an assignment.

Returns

Returns up to 500 requests with version values for applying assignments. The truncated flag indicates additional 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.

Apply season assignments

View as Markdown
POST/api/v1/presubscriptions/season-assignment/apply

Assigns approved athlete requests to a season or marks them as occasional registrations.

Permissions

Send your API key in X-API-Key. Required permissions are Presubscriptions → Write and Athletes → Read.

Headers

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

Body parameters

assignmentsarray of objectsRequired
Supply 1–500 unique request IDs with their preview version and enrollment_scope. Use seasonal with target_season_label, or occasional.
allow_reassignboolean
Set true to correct a previous assignment.

Replace the example request ID and version with the matching id and version from Preview season assignments.

Returns

Returns how many assignments changed and how many already matched.

Errors

401
The API key is missing or invalid.
403
The API key lacks the required permission.
409
A selected request changed or reassignment needs confirmation.
422
One or more fields failed validation.