Intro

Introduction to the API

The LeagueApps APIs are built to support the ever growing needs of our partners. Our current infrastructure includes a Public API and Private API which provide secure access to information from LeagueApps such as member details, registration, transactions, as well as public facing information like program lists, teams and schedules.

Innovative Ideas

Read the documentation for a comprehensive list of data included in our Private and Public API. Then begin building right away with self-serve API access through the LeagueApps Management Console.

Public v. Private

What's the difference between the Public and Private API?

The Public API includes data about your site and programs, but not about any people associated with those programs. The Private API includes data about your members and transactions.

The APIs contain endpoints, which each display different sets of data. The following diagram lists the endpoints for both the Public and Private APIs.

Frame 1 (10).png

Making requests

How do I make a request to the API?

To make a request to any of the API endpoints, you'll need the following information:

Public or Private API Key

In order to access the Public and Private APIs, you need and API key. There is a Public API Key (previously referred to as an "API Key") and a Private API Key (previously referred to as a "Service Account Key"). If you have a Private API Key, you can access both the Private and Public APIs. To generate a Public API Key, see this page. To generate a Private API Key, see this page.

LeagueApps Site ID

The Site ID is an immutable number that uniquely identifies a LeagueApps site. All API requests require a Site ID in the url path. When accessing the LeagueApps Console, the Site ID is in the url after “sites”. For example, “https://manager.leagueapps.com/console/sites/12345” is site ID 12345.

If your organization has multiple LeagueApps sites, you’ll have multiple site IDs, and will need to make separate API calls to each site. There is currently no organization-level API endpoint.

API endpoint URL

To find the URL for the endpoint you are trying to request, please navigate to the relevant page:

Public API endpoints:

Site info

Programs - current list

Programs - individual program detail

Program schedule

Program teams

Locations - list

Locations - individual location listing

Blog - list of posts

Sports

Announcements

Private API endpoints:

Export registrations

Export members

Member detail

Export transactions

Accounting codes

Parameters

debug-json

By default, JSON responses do not include null fields or whitespace. The debug-json parameter will cause all fields to be returned and pretty print the JSON. By including the parameter debug-json and setting it equal to true, you can see all of the fields with null values.

The debug-json parameter is an optional parameter for all public and private endpoints.

last-updated

The last-updated parameter is the timestamp of the last returned record. Timestamps are formatted in epoch time, which is milliseconds since January 1, 1970. In order to get the earliest records, set last-updated to 0. For subsequent calls, set last-updated equal to the timestamp of the most recently returned record.

The last-updated parameter is a required parameter for the following private endpoints: export registrations, export members, export transactions.

last-id

The last-id parameter is the ID of the last returned record. In order to get the earliest records, set last-id to 0. For subsequent calls, set last-id equal to the id of the most recently returned record.

The last-id parameter is a required parameter for the following private endpoints: export registrations, export members, export transactions.

includeDeleted

The includeDeleted parameter includes shells deleted records with the JSON response. By including the parameter includeDeleted and setting it equal to true, you can see shells of deleted records.

The includeDeleted parameter is an optional parameter for the following endpoints: export registrations.

program-id

The program-id parameter only returns records associated with that particular program. To limit records to one program, set program-id equal to the program's ID.

The program-id parameter is an optional parameter for the following endpoints: export registrations.

What else do I need to know before making a request?

Request quotas

You can make a limited number of requests per minute. When quotas are reached, endpoints will return an HTTP status 429 “Too Many Requests”. You should retry requests using truncated exponential backoff.

Going by client IP address, you can make 15 requests per second to *.leagueapps.io, which includes most of the private API endpoints. If the endpoint is an "export" (as in, it includes the word "export" in the URL), you are restricted to 5 requests per second. You can make 12 requests per second to *.leagueapps.com.

Date format

Dates and Timestamps are formatted as milliseconds since January 1, 1970, which is epoch time. There are many date time-to-epoch converters online which you can use.

Next steps

I'm ready to get started! Where should I go next?

If you want to access endpoints that are on the Public API:

  1. Read the Public API overview
  2. Get a Public API Key
  3. Make a request to the endpoint you need

If you want to access endpoints that are on the Private API:

  1. Read the Private API overview
  2. Get a Private API Key
  3. Optional: Use the sample code to access the Private API
  4. Make a request to the endpoint you need

Support

I have unanswered questions

Please reach out to [email protected].