Download OpenAPI specification:Download
Lightspeed Restaurant offers a REST API in order to communicate with the data in the system. These API’s are built using the RESTful standards and adhere to the basic verb interactions as defined by the REST standard.
These services are in continuous development and subject to change.
The Lightspeed Restaurant K Series API allows third-party developers to build custom integrations to Lightspeed. To gain access to the API, the developer must first be approved by Lightspeed's Partnerships team.
The K Series APIs support OAuth2 authentication using the authorization code grant flow. To request an OAuth client and gain access to the API, please contact the Partnerships team.
Below are the URLs that should be used during the authorization process.
Environment | Authorization URL | Token URL |
---|---|---|
Staging | https://api.trial.lsk.lightspeed.app/oauth/authorize | https://api.trial.lsk.lightspeed.app/oauth/token |
Production | https://api.lsk.lightspeed.app/oauth/authorize | https://api.lsk.lightspeed.app/oauth/token |
Obtaining an access token using the OAuth2 authorization code grant flow consists of three steps:
code
for the authorization code granthttps://api.lsk.lightspeed.app/oauth/authorize
?response_type=code
&client_id=Documentation%20Demo
&redirect_uri=https://lightspeedhq.com/oauth-test.php
&scope=financial-api%20orders-api
&state=abcd123-efgh456
https://your-redirect-url
?code=GyIpgM
&state=abcd123-efgh456
/token
endpointclient_id:client_secret
grant_type=authorization_code
code=abc123
(replace with the code returned in redirect URL query parameter)redirect_uri=https://your_redirect_url
(replace with the redirect URL for the client)Sample Request:
curl \
--header 'Authorization: Basic c29tZV9jbGllbnRfaWQ6c29tZV9jbGllbnRfc2VjcmV0MQ==' \
--request POST 'https://api.lsk.lightspeed.app/oauth/token?grant_type=authorization_code&code=Bp68Nr&redirect_uri=https://lsapi.pw/resto/lsk-prod.php'
Sample Response:
{
"access_token": "5f7fe870-fa7c-4b27-a892-2caebabb9bda",
"token_type": "bearer",
"refresh_token": "138fc571-68b0-426d-82d3-b6386421788c",
"expires_in": 3599,
"scope": "financial-api orders-api "
}
/token
endpointclient_id:client_secret
x-www-form-encoded
payload:grant_type=refresh_token
refresh_token=abc123
(replace with refresh token value returned in step 2)Sample Request:
curl \
--header 'Authorization: Basic c29tZV9jbGllbnRfaWQ6c29tZV9jbGllbnRfc2VjcmV0MQ==' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=refresh_token' \
--data-urlencode 'refresh_token=138fc571-68b0-426d-82d3-b6386421788c' \
--request POST 'https://api.lsk.lightspeed.app/oauth/token'
Sample Response:
{
"access_token": "4543e601-144d-484a-8d1f-5110e9c603ca",
"token_type": "bearer",
"refresh_token": "f0e0083a-e08d-4be7-8d66-0d6440cb71c4",
"expires_in": 3599,
"scope": "financial-api orders-api "
}
OAuth clients are limited to the specific access scopes required by the integration. During the authorization process, only scopes that have been added to the OAuth client may be requested. See the below table for the full list of access scopes.
Scope | Description |
---|---|
orders-api |
Read business information, floors, menus, discounts, and production instructions. Read and write orders and payments. |
financial-api |
Read financial data. |
reservations-api |
Read and write webhooks. Update Reservation statuses. Configure reservation integrations. |
items |
Read and write items. Read rich items. |
propertymanagement |
Read and write Property Management System configurations. |
Security Scheme Type | OAuth2 |
---|---|
authorizationCode OAuth Flow | Authorization URL: https://api.lsk.lightspeed.app/oauth/authorize Token URL: https://api.lsk.lightspeed.app/oauth/token Scopes:
|
clientCredentials OAuth Flow | Token URL: https://api.lsk.lightspeed.app/oauth/token Scopes:
|
Returns the details of a specific PMS provider.
Only PMS providers created by the authenticated OAuth client will be returned.
propertymanagement
id required | integer <int64> Example: 3012455645 |
{- "id": 3012455645,
- "businessLocationId": 45454565682155,
- "name": "John Smith",
- "apiKey": "secret-1234",
- "features": [
- "MIRRORING"
]
}
Modifies the values of an existing PMS provider.
Only PMS providers created by the authenticated OAuth client can be updated.
propertymanagement
id required | integer <int64> Example: 3012455645 |
name required | string [ 1 .. 255 ] characters |
endpoint required | string [ 1 .. 255 ] characters |
apiKey required | string [ 1 .. 255 ] characters |
features required | Array of strings unique Items Enum: "SEARCH_BY_NAME" "MIRRORING" "PARTIAL_PAYMENTS" "MULTI_PAYMENTS" |
{- "name": "John Smith",
- "apiKey": "secret-1234",
- "features": [
- "MIRRORING"
]
}
{- "id": 3012455645,
- "businessLocationId": 45454565682155,
- "name": "John Smith",
- "apiKey": "secret-1234",
- "features": [
- "MIRRORING"
]
}
Permanently removes a PMS provider from a businessLocation.
propertymanagement
id required | integer <int64> Example: 3012455645 |
0
Returns a list of PMS providers that have been configured for the business. Only PMS providers created by the authenticated OAuth client will be returned.
propertymanagement
businessLocationId required | integer <int64> Example: businessLocationId=45454565682155 the id of the businessLocation |
[- {
- "id": 3012455645,
- "businessLocationId": 45454565682155,
- "name": "John Smith",
- "apiKey": "secret-1234",
- "features": [
- "MIRRORING"
]
}
]
Creates a new PMS provider for the businessLocation.
propertymanagement
businessLocationId required | integer <int64> the id of the businessLocation |
name required | string [ 1 .. 255 ] characters |
endpoint required | string [ 1 .. 255 ] characters |
apiKey required | string [ 1 .. 255 ] characters |
features required | Array of strings unique Items Enum: "SEARCH_BY_NAME" "MIRRORING" "PARTIAL_PAYMENTS" "MULTI_PAYMENTS" |
{- "businessLocationId": 45454565682155,
- "name": "John Smith",
- "apiKey": "secret-1234",
- "features": [
- "MIRRORING"
]
}
{- "id": 3012455645,
- "businessLocationId": 45454565682155,
- "name": "John Smith",
- "apiKey": "secret-1234",
- "features": [
- "MIRRORING"
]
}
Returns the details of a specific item.
items
id required | integer <int64> Example: 3012455645 |
businessLocationId required | integer <int64> Example: businessLocationId=45454565682155 the id of the businessLocation |
{- "name": "cola",
- "businessLocationId": 45454565682155,
- "docketName": "docketName",
- "sku": "sku123577",
- "active": true,
- "barCode": "10011101100",
- "costPrice": 0,
- "priceMode": "PERCENT",
- "id": 3012455645,
- "prices": [
- {
- "amount": 0,
- "name": "string"
}
], - "accountingGroup": {
- "id": 3012455645,
- "name": "string"
}, - "sharingType": "GLOBAL_NO_BL",
- "inventorySource": "PURCHASED",
- "disabled": true,
- "contentDimension": "VOLUME",
- "contentUom": "l",
- "contentValue": 0
}
Modifies the values of an existing item.
items
id required | integer <int64> Example: 3012455645 |
name required | string <= 255 characters |
businessLocationId required | integer <int64> the id of the businessLocation |
docketName | string <= 255 characters |
sku required | string <= 25 characters |
active | boolean |
barCode | string <= 255 characters |
costPrice | number |
priceMode | string Default: "AMOUNT" Enum: "AMOUNT" "PERCENT" "POSITIVE_OPEN_PRICE" "NEGATIVE_OPEN_PRICE" |
defaultPrice required | number |
accountingGroupId required | number Needs to be an existing accountingId |
{- "name": "cola",
- "businessLocationId": 45454565682155,
- "docketName": "docketName",
- "sku": "sku123577",
- "active": true,
- "barCode": "10011101100",
- "costPrice": 0,
- "priceMode": "PERCENT",
- "defaultPrice": 3,
- "accountingGroupId": 462478248241
}
{- "name": "cola",
- "businessLocationId": 45454565682155,
- "docketName": "docketName",
- "sku": "sku123577",
- "active": true,
- "barCode": "10011101100",
- "costPrice": 0,
- "priceMode": "PERCENT",
- "id": 3012455645,
- "prices": [
- {
- "amount": 0,
- "name": "string"
}
], - "accountingGroup": {
- "id": 3012455645,
- "name": "string"
}, - "sharingType": "GLOBAL_NO_BL",
- "inventorySource": "PURCHASED",
- "disabled": true,
- "contentDimension": "VOLUME",
- "contentUom": "l",
- "contentValue": 0
}
Returns the items for a specific business location. Supports searching by accounting group id, name, or SKU
items
businessLocationId required | integer <int64> Example: businessLocationId=45454565682155 the id of the businessLocation |
sku | string <= 25 characters Example: sku=UGG-BB-PUR-06 A stock-keeping unit |
offset | integer <int64> Default: 0 Example: offset=10 Offset is the position in the dataset of a particular record. By specifying offset, you retrieve a subset of records starting with the offset value. Offset normally works with amount, which determines how many records to retrieve starting from the offset. |
amount | integer <int64> Default: 0 Example: amount=10 |
name | string [ 1 .. 180 ] characters Example: name=cola the name of the object |
accountingGroupId | integer <int64> Example: accountingGroupId=44874545485 the accounting group id |