API keys
An API key lets software that you or your developer runs read your business data from the Selflane API. For example, you can pull your data into your own reporting dashboard. One key can cover several of your locations.
Keys are covered by the Selflane API Terms . Read them before you create a key.
Who can use API keys
- Only owners can open
API Keys. Owners create keys, edit their locations, and revoke them. Managers and custom users can’t see the page. - To put a location on a key, you must be an owner of that location.
- Each location on a key needs the POS plan or above. If a location doesn’t qualify, Back Office won’t create the key and names the location.
What a key can read
When you create a key, you choose its scopes: the kinds of data it can read. You can’t change a key’s scopes after you create it. To change them, create a new key and revoke the old one.
Today a key can read Business: business and location details such as name, address, timezone, and currency. The other scopes are marked Coming soon:
| Scope | What it reads |
|---|---|
Menu | Menus, items, modifiers, and prices |
Orders | Orders and their items, without customer contact details |
Customer contact details | Names, phone numbers, and email addresses of customers on orders |
Payments | Card and cash payments, refunds, and tips |
Reports | Sales and other summary reports |
Payouts | Deposits to your bank account |
Staff | Employee names, roles, and contact details |
Staff pay | Employee pay rates |
Time cards | Clock-ins, clock-outs, and breaks |
Cash | Cash drawer activity |
Choose only the scopes your software needs.
Scopes with personal information
Customer contact details, Staff, and Staff pay return personal information. When you choose one, the screen asks you to confirm it separately, under This key returns personal information. Confirm each one:. You can’t create the key until you tick each confirmation.
Create a key
- In the Back Office , open
Owner's Portal→API Keys. - Click
Create key. - Enter a
Namethat says what the key is for, such asReporting dashboard. - Under
Locations, choose the locations the key covers. The location you’re signed in to is always included. If you own more than one location,Select alladds every one of them. - Under
Scopes, choose what the key can read.Businessis chosen for you. - If you chose a scope with personal information, tick its confirmation.
- Optional: set
Expires on (optional). The key stops working at the end of that day. Leave it blank for a key that doesn’t expire. - Tick the checkbox to accept the Selflane API Terms for every location on the key.
- Click
Create key.
If something is missing, the screen lists what to fix below the form.
Copy your key
The next screen shows your new key once. Selflane doesn’t keep a copy, so you can’t see it again.
- Copy the key and store it in a secure place, such as a password manager.
- Click
I've saved my key.
Never put a key in a website or mobile app. Selflane never asks for your API key. If a key is lost or someone else may have seen it, revoke it and create a new one.
The key list
Owner's Portal → API Keys lists every key that names this business:
| Column | What it shows |
|---|---|
Name | The key’s name and the first few characters of the key, so you can tell keys apart |
Scopes | What the key can read |
Locations | How many locations the key covers, and their names |
Created | When the key was created, and by whom |
Last used | The last time software used the key, or Never |
Expires | The expiry date, or Never |
Status | Active, Expired, or Revoked |
No longer has access
No longer has access under Created means the person who created the key no longer owns every location on it. For example, they sold a location or left the business. The key still works until an owner revokes it. Check whether the key is still needed, and revoke it if not.
Change a key’s locations
- Next to the key, click
Edit locations. - Add or remove locations. You can’t remove the location you’re signed in to, or locations you don’t own.
- If you’re adding a location and the key has a scope with personal information, tick its confirmation again.
- Tick the checkbox to accept the API Terms.
- Click
Save.
To take this location off a key, sign in to another location on the key and edit it from there, or revoke the key.
Revoke a key
Revoke a key when you no longer use it, or when it may have been exposed.
- Next to the key, click
Revoke. - Confirm.
Any software using the key stops working right away. You can’t undo this. Revoked keys stay in the list, dimmed, with the Revoked status.
What if…
| Problem | What to do |
|---|---|
You don’t see API Keys | Only owners can open it. Ask an owner of the business. |
A location is missing from Locations | You can only add locations you own. Ask an owner of that location to create the key. |
| The key wasn’t created and a location is named | That location isn’t on the POS plan or above. Remove it, or change its plan. |
| You lost the key | You can’t see it again. Revoke it and create a new one. |
Your software needs data that’s Coming soon | It isn’t available yet. Keep using Business for now. |
| You need different scopes | Create a new key with the scopes you need, update your software, then revoke the old key. |