Getting Started

Follow these 5 easy steps to get up and running quickly and make your first API call.

1. Ensure you have a Leap user account

With a Leap user account, you can log into the Partner Portal via browser to do the following:

  • Access your account information to view/manage things like API keys, your organization’s Account ID, admin users, etc.
  • Validate meter data, dispatch events, and event analytics

Additionally, with these same credentials you can log into the Login API endpoint to get a bearer auth token for subsequent API calls.

Partner Portal URLs

API Base URLs

Reach out to your Leap account manager or [email protected] if you don’t yet have an account and need one created.

2. Get your organization’s unique account ID

Login to the Partner Portal, click on your name in the top right corner of the screen, and select ‘Partner account’ to get to your organization's account page. Copy the account ID value shown as this is used in the path for the {accountId} variable required in most of the API calls. This is a unique value for your organization and does not change.

443

3. Get a bearer token for authentication

All requests to the Leap API endpoints must include a valid Bearer token in the HTTP Authorization header. There are 2 methods for obtaining this token:


POST /account/<account-id>/meters/search HTTP/2
Accept-Encoding: gzip
Host: example.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiOWIxODc2YzEtMTk5Yy00ZjRjLWJmYjEtNWZkMTEzM2M1MGJjIiwiYWNjb3VudF9pZCI6ImJjZjc1YWQ3LTE5OWMtMTk1NC1iZmIxLTVmZTExMzNhNTBiYyIsInBlcm1pc3Npb25zIjpbIlJlZ2lzdGVyTWV0ZXIiLCJHZXRNZXRlciIsIkRlbGV0ZU1ldGVyIiwiUGxhY2VCaWQiLCJHZXRCaWQiXSwiZXhwaXJhdGlvbl9kYXRlIjoiMjAxOC0wNy0wOVQxMzoxNjo0N1oifQ.6WQXgno7zU9lrn0IeZYMSoYGNTHUi26m6S5grSGHfEI

4. Ensure you have meters on the platform

Meters are the basic units of inventory providing grid services. Meters represent your end customers and the devices sitting behind the utility meter which will enroll in programs, respond to dispatches, unlock revenue, and aid grid reliability.

Meters in Production

Authorized meters will be added to Leap's production platform and could be from either your end customers or from internal test meters that have authorized data sharing. You can confirm whether or not you have any authorized meters by logging into the Partner Portal and clicking on the Meters tab to see the list. If you do, then you're ready to make your first call in production.

Meters in Staging

If you don’t have any meters authorized then you can still test in staging. Reach out to your Leap account manager or [email protected] and we can get some test meters added to your staging environment.

5. Make your first call - Query the Search Meters endpoint

Now that you have your account ID and bearer auth token you are ready to make your first call. You can start off by making calls to the API endpoints directly in the browser in the API Reference documentation.

Using the Search Meters endpoint as the initial example allows you to see all meters in your environment along with statuses and metadata about each meter. Follow these simple steps to test from within your browser:

  1. Under the AUTHENTICATION section on the right, add your auth token from step 3 into the Bearer field
  2. Under the PATH PARAMS section in the middle, add your account ID from step 2 into the accountId field
  3. Click the ‘Try It!’ button to see the output in the RESPONSE window in the right panel

Congratulations!

You've completed the basic steps to get up and running with Leap's API. As a next step, check out these guides for information on setting up the most common automation use cases: