Skip to Content
DevelopersGetting Started

Getting started

This page takes you from no key to a first successful call in a few minutes.

1. Get a key

Only a business owner can create a key. The owner does this in Back Office under Owner's Portal → API Keys, following API keys. Ask them to:

  • Name the key after your integration, such as Reporting dashboard.
  • Choose only the locations your software needs.
  • Choose only the scopes your software needs. Business is always included.

The key looks like sl_live_ followed by 43 letters and digits. Back Office shows it once.

2. Store it

Keep the key in a secrets manager or an environment variable on your server. Never put it in source control, a website, or a mobile app.

export SELFLANE_API_KEY="sl_live_…"

Anyone with the key can read everything it covers. If it leaks, ask the owner to revoke it and create a new one.

3. Make your first call

List the locations the key covers:

curl https://developer.selflane.com/v1/locations \ -H "Authorization: Bearer $SELFLANE_API_KEY"
{ "data": [ { "id": "64b0c1e2f3a4b5c6d7e8f901", "location": "64b0c1e2f3a4b5c6d7e8f901", "name": "Main Street", "timezone": "America/Denver" } ], "next_cursor": null }

Then read one location’s profile. Add ?location=<id> if the key covers more than one location:

curl "https://developer.selflane.com/v1/business?location=64b0c1e2f3a4b5c6d7e8f901" \ -H "Authorization: Bearer $SELFLANE_API_KEY"
{ "id": "64b0c1e2f3a4b5c6d7e8f901", "location": "64b0c1e2f3a4b5c6d7e8f901", "name": "Main Street", "timezone": "America/Denver", "currency": "usd", "website": "https://example.com", "address": { "line1": "100 Main St", "line2": null, "city": "Denver", "state": "CO", "postal_code": "80202", "country": "US" } }

What if…

ResponseWhat to do
401 missing_credential or invalid_credentialCheck the header is Authorization: Bearer sl_live_… with the whole key.
401 revoked_credential or expired_credentialAsk the owner for a new key.
400 location_requiredThe key covers several locations. Add ?location=<id>.
403 plan_requiredThe location isn’t live or isn’t on the POS plan or above. The owner can change the plan.

See Errors for every code.

Next

Last updated on