-
Notifications
You must be signed in to change notification settings - Fork 2
Registration example
The below example outlines the procedures during competition registration. These procedures can be used short before the competition starts, at the check-in desk on a registration website.
All URL used in this example are for demonstrative purposes only. Please navigate the API starting from the root URL to to find the corresponding URL for your application.
The competition ID is used in many of the bellow steps an must be obtained as a first step.
If you have trouble locating it with the following methods please contact it-services@worlddancesport.org.
-
By API
- Query the API at /api/1/competition
- Reduce the list by using the "from" and/or "to" filters matching the dates of your competitions.
- Locate your competition by matching location, discipline, etc.
- The Id column contains the competition Id
-
In calendar
- Browse the competition calendar at http://www.worlddancesport.org/Calendar/Competition/Upcoming
- Locate your competition.
- Open the detail page
- Open the competition detail page
- The integer an the end of the competition detail page is the competition Id
By the WDSF competition rule D-2.5 it is not allowed for unregistered athletes to participate in WDSF competitions.
To participate at a WDSF competition a couple must be registered by their national administrator in the RLS. Once a couple is registered in the RLS it will automatically appear in the list of couples at the WDSF API.
Couples are identified by their RLS-ID (rls-xxxx).
To obtain a couple ID browse the API at /api/1/couple and use the min and/or name filter to locate a couple. The Id column is the couple Id.
Register the couple as a participant at the competition:
POST /api/1/participant
<participant kind="couple">
<number>21</number>
<status>Present</status>
<competitionId>42694</competitionId>
<coupleId>rls-4588</coupleId>
</participant>
The API will respond:
<status>
<code>201</code>
<message>Participant created</message>
<id>152341</id>
<link
rel="http://services.worlddancesport.org/rel/competition/particiapnt"
type="application/vnd.worlddancesport.participant.couple+xml"
xlink:href="https://services.worlddancesport.org/api/1/participant/152341"/>
</status>
Store the Id value locally as it is used when you submit results or want to change/delete data of this participant.
Should you try to add a couple that is not consisting of two athletes owning a MIN or not allowed to participate in this age group or division the status message will contain an error message.
If you do not find a couple in the API at /api/1/couple you can add a new couple by providing the two MIN of the athletes.
POST /api/1/couple
<couple>
<country>England</country>
<status>ACTIVE</status>
<man>10012345</man>
<woman>10012346</woman>
</couple>
The Age and Division properties are ignored when creating a couple with two MIN as the are given by the age and membership of the athletes.
Should the athletes of this new couple be incompatible for a new couple the API will provide the reason in the returned status message.
Example:
- Incompatible age groups if one athlete is of age group Junior and the other of age group Adult.
- Incompatible division if one athlete is in the General Division and the other in the Professional Division
The API will respond
<status>
<code>401</code>
<message>Couple created</message>
<id>wdsf-54768</id>
<link
rel="http://services.worlddancesport.org/rel/couple"
type="application/vnd.worlddancesport.couple+xml"
xlink:href="https://services.worlddancesport.org/api/1/couple/wdsf-67234"/>
</status>
The API will always return a generic couple ID. A couple will receive its RLS-ID once the national administrator has confirmed the couple as valid. It is though always possible to address a couple by its generic ID. The API will map it to the RLS-ID if one exists.
Store the Id value locally as it is used when you register a participant.
Continue as described in "Existing Couple".
Single athletes can be registered with their MIN directly.
Register the athlete as a participant at the competition:
POST /api/1/participant
<participant kind="couple">
<number>21</number>
<status>Present</status>
<competitionId>42694</competitionId>
<personId>1000000</personId>
</participant>
The API will respond:
<status>
<code>201</code>
<message>Participant created</message>
<id>152341</id>
<link
rel="http://services.worlddancesport.org/rel/competition/particiapnt"
type="application/vnd.worlddancesport.participant.single+xml"
xlink:href="https://services.worlddancesport.org/api/1/participant/152341"/>
</status>
Store the Id value locally as it is used when you submit results or want to change/delete data of this participant.
To obtain a team ID browse the API at /api/1/team and use the name filter to locate a team. The Id column is the team Id. Teams can not be created via the API but must be managed by the national member body.
Register the team as a participant at the competition:
POST /api/1/participant
<participant kind="couple">
<number>21</number>
<status>Present</status>
<competitionId>42694</competitionId>
<teamId>1234</teamId>
</participant>
The API will respond:
<status>
<code>201</code>
<message>Participant created</message>
<id>152341</id>
<link
rel="http://services.worlddancesport.org/rel/competition/particiapnt"
type="application/vnd.worlddancesport.participant.team+xml"
xlink:href="https://services.worlddancesport.org/api/1/participant/152341"/>
</status>
Store the Id value locally as it is used when you submit results or want to change/delete data of this participant.
Any couple can participate at a non-WDSF competition.
Couples are identified by their RLS-ID (rls-xxxx) or generic ID (wdsf-xxxx).
To obtain a couple ID browse the API at /api/1/couple and use the min and/or name filter to locate a couple. The Id column is the couple Id.
If you have found the couple ID by browsing the API, continue as following:
POST /api/1/participant
<participant kind="couple">
<number>21</number>
<status>Present</status>
<competitionId>42694</competitionId>
<coupleId>rls-4588</coupleId>
</participant>
The API will respond:
<status>
<code>401</code>
<message>Particiapnt created</message>
<id>152341</id>
<link
rel="http://services.worlddancesport.org/rel/competition/particiapnt"
type="application/vnd.worlddancesport.participant.couple+xml"
xlink:href="https://services.worlddancesport.org/api/1/participant/152341"/>
</status>
Store the Id value locally as it is used when you submit results or want to change/delete data of this participant.
Couples registered at the RLS or having participated at a WDSF competition in the past should already appear in the WDSF API couple list. If you can not find a couple in the couple list you can add a new couple by:
POST /api/1/couple
<couple>
<country>England</country>
<age>ADULT</age>
<division>General</division>
<status>ACTIVE</status>
<customManName>Dr. John, Doe</customManName>
<customWomanName>Ms. Jane, Doe</customWomanName>
</couple>
The API will respond
<status>
<code>401</code>
<message>Couple created</message>
<id>wdsf-67234</id>
<link
rel="http://services.worlddancesport.org/rel/couple"
type="application/vnd.worlddancesport.couple+xml"
xlink:href="https://services.worlddancesport.org/api/1/couple/wdsf-67234"/>
</status>
Store the Id value locally as it is used when you register a participant.
Continue as described in "Existing Couple".