The API is currently at version 1.0. It includes endpoints which provide read-only access to public-facing content, which is content that you make available on your public-facing website. This currently includes site details, site announcements, programs, and schedules. The API will continue to be expanded to offer access to additional content/data and functionality. We’re eager to hear feedback regarding the types of things people intend to build with the API, and we’ll be planning additional API endpoints based on this feedback.

Example Use-Cases

There are many things you can build with this API. Here are a few examples:

  • Customized display of schedules added to your (remote) website.
  • Scoreboard ticker showing latest game results/scores.
  • Customized display of open registrations added to your (remote) website.
  • Customized “blog roll” of site announcements added to your (remote) website.
  • Integration of schedules and scores into your own mobile app.

Feedback and Support

Please send all feedback and questions to api@leagueapps.com.

Getting Started

You can start using the API right away. To get started, follow these steps:

  1. Request your API Key. You will need this to authenticate your API calls. Send an email to api@leagueapps.com or fill out the form below to request your key. Include the name of your LeagueApps account when doing so.
  2. Read the documentation. Familiarize yourself with the available endpoints and how they are used.
  3. Start building! If you have questions or feedback, send them into api@leagueapps.com.
Fill out my online form.

API Documentation

Overview of Operation

The API is structured as REST endpoints which return results in JSON format. Every request must include a valid API Key in order to be granted access. Calls to endpoints are made as HTTP GET requests, and the API key is included in the header.

The following illustrates the operation of the API via an example of a request to fetch a list of programs for a given site:

Endpoint URL: https://api.leagueapps.com/v1/sites/{SITE_ID}/programs/current
Replace {SITE_ID} with your Site’s unique ID. This can be found in the URL of your site when you are logged into the console (https://manager.leagueapps.com/console/sites/{SITE_ID}).

The API Key is added into the header of the GET request as: x-api-key: {API_KEY}
{API_KEY} is replaced with your provided API Key.

In this example, we’ll use {SITE_ID} = 1482 and {API_KEY} = 55d3f319f06bd37cb11efa28e272e30a.

A GET request to https://api.leagueapps.com/v1/sites/1482/programs/current, with x-api-key: 55d3f319f06bd37cb11efa28e272e30a in the header, returns the following results (in JSON format):

[
  {
    "programId": 59621,
    "name": "Intermediate Lacrosse Program 1",
    "state": "UPCOMING",
    "type": "LEAGUE",
    "description": "",
    "startTime": 1496289600000,
    "tentativeStartTime": false,
    "publicRegstrationTime": 1433131200000,
    "gender": "MALE",
    "mode": "ADULT",
    "freeAgentLabel": "Free Agent",
    "teamLabel": "Team",
    "captainLabel": "Captain",
    "divisionLabel": "Division",
    "processingFeeLabel": "Processing Fee",
    "additionalTeamFeeLabel": "Additional Team Fee",
    "sportId": 11,
    "sport": "Lacrosse",
    "season": "Summer",
    "experienceLevel": "Intermediate",
    "leagueFormat": "",
    "feeRequired": true,
    "regularRegistrationTime": 1433131200000,
    "teamIndividualFee": 100,
    "freeAgentFee": 100,
    "chargeProcessingFee": false,
    "usingVariableTeamFee": true,
    "chargeMembershipFee": false,
    "hasPaymentPlans": false,
    "ageLimitEffectiveDate": 1496289600000,
    "hasWaitlist": true,
    "programUrlHtml": "//api.leagueapps.com/leagues/lacrosse/59621-intermediate-lacrosse-program-1",
    "registerUrlHtml": "//api.leagueapps.com/registration/init?bid=59621",
    "scheduleUrlHtml": "//api.leagueapps.com/leagues/59621/schedule",
    "standingsUrlHtml": "//api.leagueapps.com/leagues/59621/standings"
  },
  {
    "programId": 59622,
    "name": "Advanced Lacrosse Program 2",
    "state": "UPCOMING",
    "type": "LEAGUE",
    "description": "",
    "startTime": 1496289600000,
    "tentativeStartTime": false,
    "publicRegstrationTime": 1433131200000,
    "gender": "MALE",
    "mode": "ADULT",
    "freeAgentLabel": "Free Agent",
    "teamLabel": "Team",
    "captainLabel": "Captain",
    "divisionLabel": "Division",
    "processingFeeLabel": "Processing Fee",
    "additionalTeamFeeLabel": "Additional Team Fee",
    "sportId": 11,
    "sport": "Lacrosse",
    "season": "Summer",
    "experienceLevel": "Advanced",
    "leagueFormat": "",
    "feeRequired": true,
    "regularRegistrationTime": 1433131200000,
    "teamIndividualFee": 100,
    "freeAgentFee": 100,
    "chargeProcessingFee": false,
    "usingVariableTeamFee": true,
    "chargeMembershipFee": false,
    "hasPaymentPlans": false,
    "ageLimitEffectiveDate": 1496289600000,
    "hasWaitlist": true,
    "programUrlHtml": "//api.leagueapps.com/leagues/lacrosse/59622-advanced-lacrosse-program-2",
    "registerUrlHtml": "//api.leagueapps.com/registration/init?bid=59622",
    "scheduleUrlHtml": "//api.leagueapps.com/leagues/59622/schedule",
    "standingsUrlHtml": "//api.leagueapps.com/leagues/59622/standings"
  }
]

Cross-Domain Scripting Support with JSONP

Many of the API endpoints (as outlined below) support JSONP, which allows them to be accessed by Javascript code running in a remote website. This is useful for building client-side integration of content into external/remote websites (i.e., customized “content widgets”) that are on a different domain.

For example, your website at www.mysportswebsite.com could include Javascript that calls the API to fetch content that is then directly rendered into the page (e.g., a list of programs with open registration).

Here’s an overview of how JSONP works:

  • The API endpoint is called using a Javascript <script> tag from your web page.
  • The API Key is passed over the querystring as a parameter x-api-key, as opposed to being included in the HTTP header.
  • You must provide a querystring parameter named callback which identifies a local Javascript function you must define in your web page.
  • When the page loads, the <script> tag accesses the API endpoint, and returns as a result the JSON data response wrapped inside a Javascript function call, named with the value you provided for callback.

Using the above example, here is how the same endpoint would work when using the JSONP approach:

Step 1. Your web page includes the following <script> tag:

<scrpt type="text/javascript" src="https://api.leagueapps.com/v1/sites/SITEID/programs/current?x-api-key=55d3f319f06bd37cb11efa28e272e30a&callback=myCallbackFunction"></script>

Step 2. When the page loads, this script tag fetches the result from the endpoint and the results returned are shown below. Notice that the same JSON results as the previous example are included here, but are wrapped in the Javascript function call to myCallbackFunction() which was the name you specified in the callback parameter.

myCallbackFunction([{"
    programId":59621,"name":"Intermediate Lacrosse Program 1","state":"UPCOMING","type":"LEAGUE","description":"","startTime":1496289600000,"tentativeStartTime":false,"publicRegstrationTime":1433131200000,"gender":"MALE","mode":"ADULT","freeAgentLabel":"Free Agent","teamLabel":"Team","captainLabel":"Captain","divisionLabel":"Division","processingFeeLabel":"Processing Fee","additionalTeamFeeLabel":"Additional Team Fee","sportId":11,"sport":"Lacrosse","season":"Summer","experienceLevel":"Intermediate","leagueFormat":"","feeRequired":true,"regularRegistrationTime":1433131200000,"teamIndividualFee":100.0,"freeAgentFee":100.0,"chargeProcessingFee":false,"usingVariableTeamFee":true,"chargeMembershipFee":false,"hasPaymentPlans":false,"ageLimitEffectiveDate":1496289600000,"hasWaitlist":true,"programUrlHtml":"//api.leagueapps.com/leagues/lacrosse/59621-intermediate-lacrosse-program-1","registerUrlHtml":"//api.leagueapps.com/registration/init?bid=59621","scheduleUrlHtml":"//api.leagueapps.com/leagues/59621/schedule","standingsUrlHtml":"//api.leagueapps.com/leagues/59621/standings"},{"programId":59622,"name":"Advanced Lacrosse Program 2","state":"UPCOMING","type":"LEAGUE","description":"","startTime":1496289600000,"tentativeStartTime":false,"publicRegstrationTime":1433131200000,"gender":"MALE","mode":"ADULT","freeAgentLabel":"Free Agent","teamLabel":"Team","captainLabel":"Captain","divisionLabel":"Division","processingFeeLabel":"Processing Fee","additionalTeamFeeLabel":"Additional Team Fee","sportId":11,"sport":"Lacrosse","season":"Summer","experienceLevel":"Advanced","leagueFormat":"","feeRequired":true,"regularRegistrationTime":1433131200000,"teamIndividualFee":100.0,"freeAgentFee":100.0,"chargeProcessingFee":false,"usingVariableTeamFee":true,"chargeMembershipFee":false,"hasPaymentPlans":false,"ageLimitEffectiveDate":1496289600000,"hasWaitlist":true,"programUrlHtml":"//api.leagueapps.com/leagues/lacrosse/59622-advanced-lacrosse-program-2","registerUrlHtml":"//api.leagueapps.com/registration/init?bid=59622","scheduleUrlHtml":"//api.leagueapps.com/leagues/59622/schedule","standingsUrlHtml":"//api.leagueapps.com/leagues/59622/standings"}
  ]);

Step 3. Finally, you must have a Javascript function named myCallbackFunction defined in your page, previous to the <script> tag inclusion. Inside this function is where you add logic to manipulate the returned JSON data.

<script type="text/javascript">
  function myCallbackFunction(data) {
      console.log(data);  
      //do something
  }
</script>

API End Point Reference

This section outlines all the available endpoints in the current version of the API.

SITE

End Point api.leagueapps.com/v1/sites/{SITE_ID}/
JSONP supported
Description Returns basic information about the site. It includes the hex code for color selections made in the theme editor for the site. This can be useful if you want to style your client implementation with the same colors as used on your LA powered site.
Results
(JSON)
[
  {
      "id": "1482",
      "name": "API Site",
      "subdomain": "api",
      "domain": null,
      "url": "//api.leagueapps.com/",
      "logoUrl": null,
      "theme": {
          "colors": {
              "alerts": "#ffffdd",
              "alternateText": "#aaaaaa",
              "bodyText": "#484848",
              "buttonBackground": "#2d6cbe",
              "buttonBackgroundHover": "#1d4483",
              "buttonText": "#ffffff",
              "buttonTextHover": "#ffffff",
              "contentBackground": "#ffffff",
              "headerBackground": "#333333",
              "headings": "#484848",
              "links": "#2d6cbe",
              "linksHover": "#1d4483",
              "logo": "#ffffff",
              "mainNavBackground": "#212121",
              "mainNavLinks": "#bbbbbb",
              "mainNavLinksHover": "#ffffff",
              "pageBackground": "#6f727a",
              "sidebarBackground": "#f6f6f6",
              "widgetBackground": ""
          }
      }
  }
]
End Point api.leagueapps.com/v1/sites/{SITE_ID}/sports
JSONP supported
Description Returns the list of sports which have live or upcoming programs.
Results
(JSON)
[
    {
        "sportId": 11,
        "name": "Lacrosse",
        "leagueCount": 2,
        "leaguesUrlHtml": "//api.leagueapps.com/leagues/lacrosse"
    }
]

ANNOUNCEMENTS

End Point api.leagueapps.com/v1/sites/{SITE_ID}/announcements
JSONP supported
Description Returns a reverse chronological list of site announcements that have been posted.
Results
(JSON)
[
    {
        "announcementId": 401049,
        "userId": 2,
        "username": "steve",
        "userFirstName": "Steve",
        "userLastName": "McQueen",
        "admin": true,
        "createdTime": 1435251085000,
        "message": "Just a reminder to everyone that there are just 2 days until tryouts!",
        "userUrlHtml": "//api.leagueapps.com/members/steve",
        "userIconUrl": "https://svite-league-apps-img.s3.amazonaws.com/profile-0-s1.jpg"
    },
    {
        "announcementId": 401048,
        "userId": 2,
        "username": "steve",
        "userFirstName": "Steve",
        "userLastName": "McQueen",
        "admin": true,
        "createdTime": 1435251060000,
        "message": "Lacrosse tryouts are coming up in 2 weeks.  Be sure to register in time before spots fill up!",
        "userUrlHtml": "//api.leagueapps.com/members/steve",
        "userIconUrl": "https://svite-league-apps-img.s3.amazonaws.com/profile-0-s1.jpg"
    }
]

PROGRAMS

End Point api.leagueapps.com/v1/sites/{SITE_ID}/programs/current
JSONP supported
Description Returns a list of all programs which are have a state of either LIVE or UPCOMING. For each program, the several relevant details are included.
Results
(JSON)
[
    {
        "programId": 59621,
        "name": "Intermediate Lacrosse Program 1",
        "state": "UPCOMING",
        "type": "LEAGUE",
        "description": "",
        "startTime": 1496289600000,
        "tentativeStartTime": false,
        "publicRegstrationTime": 1433131200000,
        "gender": "MALE",
        "mode": "ADULT",
        "freeAgentLabel": "Free Agent",
        "teamLabel": "Team",
        "captainLabel": "Captain",
        "divisionLabel": "Division",
        "processingFeeLabel": "Processing Fee",
        "additionalTeamFeeLabel": "Additional Team Fee",
        "sportId": 11,
        "sport": "Lacrosse",
        "season": "Summer",
        "experienceLevel": "Intermediate",
        "leagueFormat": "",
        "feeRequired": true,
        "regularRegistrationTime": 1433131200000,
        "teamIndividualFee": 100,
        "freeAgentFee": 100,
        "chargeProcessingFee": false,
        "usingVariableTeamFee": true,
        "chargeMembershipFee": false,
        "hasPaymentPlans": false,
        "ageLimitEffectiveDate": 1496289600000,
        "hasWaitlist": true,
        "programUrlHtml": "//api.leagueapps.com/leagues/lacrosse/59621-intermediate-lacrosse-program-1",
        "registerUrlHtml": "//api.leagueapps.com/registration/init?bid=59621",
        "scheduleUrlHtml": "//api.leagueapps.com/leagues/59621/schedule",
        "standingsUrlHtml": "//api.leagueapps.com/leagues/59621/standings"
    }
]
End Point api.leagueapps.com/v1/sites/{SITE_ID}/programs/{PROGRAM_ID}
JSONP supported
Description Returns the full details and description for one particular program, based on {PROGRAM_ID}. The {PROGRAM_ID} is included in the results of the previous endpoint /programs/current.
Results
(JSON)
[
  {
      "programId": 59621,
      "name": "Intermediate Lacrosse Program 1",
      "state": "UPCOMING",
      "type": "LEAGUE",
      "description": "",
      "startTime": 1496289600000,
      "tentativeStartTime": false,
      "publicRegstrationTime": 1433131200000,
      "gender": "MALE",
      "mode": "ADULT",
      "freeAgentLabel": "Free Agent",
      "teamLabel": "Team",
      "captainLabel": "Captain",
      "divisionLabel": "Division",
      "processingFeeLabel": "Processing Fee",
      "additionalTeamFeeLabel": "Additional Team Fee",
      "sportId": 11,
      "sport": "Lacrosse",
      "season": "Summer",
      "experienceLevel": "Intermediate",
      "leagueFormat": "",
      "feeRequired": true,
      "regularRegistrationTime": 1433131200000,
      "teamIndividualFee": 100,
      "freeAgentFee": 100,
      "chargeProcessingFee": false,
      "usingVariableTeamFee": true,
      "chargeMembershipFee": false,
      "hasPaymentPlans": false,
      "ageLimitEffectiveDate": 1496289600000,
      "hasWaitlist": true,
      "programUrlHtml": "//api.leagueapps.com/leagues/lacrosse/59621-intermediate-lacrosse-program-1",
      "registerUrlHtml": "//api.leagueapps.com/registration/init?bid=59621",
      "scheduleUrlHtml": "//api.leagueapps.com/leagues/59621/schedule",
      "standingsUrlHtml": "//api.leagueapps.com/leagues/59621/standings"
  }      
]  

SCHEDULES

End Point api.leagueapps.com/v1/sites/{SITEID}/programs/{PROGRAM_ID}/schedule
JSONP supported
Description Returns the full schedule for a given program, as specified by {PROGRAM_ID}. The results include both games (with their corresponding details) as well as “date notes”.
Results
(JSON)
[
  {
      "games": [
          {
              "gameId": 1185483,
              "type": "PLAYED_REGULAR_TIME",
              "typeLabel": "Regular Season",
              "state": "PLAYED_REGULAR_TIME",
              "stateLabel": "Played (regular time)",
              "startTime": 1437228000000,
              "team1Id": 264489,
              "team1": "Team A",
              "team1Seed": null,
              "team1Score": 3,
              "team1Result": "LOSS",
              "team2Id": 264492,
              "team2": "Team D",
              "team2Seed": null,
              "team2Score": 5,
              "team2Result": "WIN",
              "locationId": 16575,
              "locationName": "Field 1",
              "subLocationId": null,
              "subLocationName": null,
              "latitude": null,
              "longitude": null,
              "round": null,
              "notes": "Excellent game with a great comeback at the end"
          },
          {
              "gameId": 1185484,
              "type": "PLAYED_REGULAR_TIME",
              "typeLabel": "Regular Season",
              "state": "PLAYED_REGULAR_TIME",
              "stateLabel": "Played (regular time)",
              "startTime": 1437228000000,
              "team1Id": 264491,
              "team1": "Team B",
              "team1Seed": null,
              "team1Score": 7,
              "team1Result": "WIN",
              "team2Id": 264490,
              "team2": "Team C",
              "team2Seed": null,
              "team2Score": 3,
              "team2Result": "LOSS",
              "locationId": 16576,
              "locationName": "Field 2",
              "subLocationId": null,
              "subLocationName": null,
              "latitude": null,
              "longitude": null,
              "round": null,
              "notes": null
          }    ],
      "notes": [
          {
              "noteId": 22023,
              "startTime": 1437192000000,
              "color": "date-note-type0",
              "message": "This is a \"date note\" on the schedule"
          }
      ]
  }
]  

TEAMS

End Point

api.leagueapps.com/v1/sites/{SITEID}/programs/{PROGRAM_ID}/teams

JSONP

supported

Description

Returns a list of teams for a given program, as specified by {PROGRAM_ID}.

Results
(JSON)

[{
    "teamName": "Wildcats",
    "teamId": 20939,
    "division": "Legends",
    "teamStatus": "COMPLETE",
    "teamProfileURL": "//api.leagueapps.com/leagues/1337/teams/311244",
    "dateCreated": 1447839864000
}, {
    "teamName": "Pumas",
    "teamId": 20938,
    "division": "Leaders",
    "teamStatus": "COMPLETE",
    "teamProfileURL": "//api.leagueapps.com/leagues/1337/teams/311245",
    "dateCreated": 1447839872000
}]

Back to top

Close

Schedule Your Demo

Receive a 1-on-1 Guided Tour of LeagueApps

*

Get Started Now With A Free LeagueApps Account.

Send us your info and let's set up a time

Learn these tips and tools to drive more growth for your sports program

Free eBook: 7 ways to grow your program.

Download Now

Win this tshirt
Close