Skip to main content

API Documentation: Get Level Information

API Documentation: Get Level Information

Endpoint

URL:

https://db.lilacdancecenter.com/api/getlevel

Method:
GET


Query Parameters

Parameter Type Description
firstName String The dancer's first name. Required.
lastName String The dancer's last name. Required.
majority Integer Requested majority of dances for leveling up. Optional.

Example Request:

https://db.lilacdancecenter.com/api/getlevel?firstName=John&lastName=Doe
https://db.lilacdancecenter.com/api/getlevel?firstName=John&lastName=Doe&majority=3

Response

The endpoint returns a JSON object containing the dancer's levels for each dance style and their first competition date.

JSON Response Format

{
  "smoothLevel": "bronze",
  "standardLevel": "silver",
  "rhythmLevel": "silver",
  "latinLevel": "bronze",
  "startDate": "2024-10-19 00:00:00 UTC"
}

Response Parameters

Field Type Description
smoothLevel String The level of the dancer in Smooth style (e.g., bronze, silver, etc.).
standardLevel String The level of the dancer in Standard style (e.g., bronze, silver, etc.).
rhythmLevel String The level of the dancer in Rhythm style (e.g., bronze, silver, etc.).
latinLevel String The level of the dancer in Latin style (e.g., bronze, silver, etc.).
startDate String The UTC timestamp of the dancer's first competition in the format YYYY-MM-DD HH:MM:SS UTC.

Behavior

  • The API retrieves the levels associated with the provided dancer's first and last name.
  • The startDate field corresponds to the date and time of the dancer's first competition, stored in UTC format.

Example Usage

Request:

GET https://db.lilacdancecenter.com/api/getlevel?firstName=Jane&lastName=Doe

Response:

{
  "smoothLevel": "silver",
  "standardLevel": "gold",
  "rhythmLevel": "bronze",
  "latinLevel": "silver",
  "startDate": "2023-06-15 00:00:00 UTC"
}

This response indicates that:

  • The dancer "Jane Doe" has the following dance levels:
    • Smooth: Silver
    • Standard: Gold
    • Rhythm: Bronze
    • Latin: Silver
  • Their first competition took place on June 15, 2023.

Notes

  • Ensure that both firstName and lastName parameters are provided; otherwise, the API will not return a valid response.
  • The first and last name of the dancer must have proper capitalization.
  • Levels are categorized into predefined tiers such as bronze, silver, or gold, as detailed in the MIT Ballroom Dance Team's About YCN Points