Access Lightspeed POS API

Lightspeed POS is one of the most popular and trending POS system available in the market. It revolutionizes the concept of shopping at Physical Store by eliminating the need of standing in queue for billing. Sales Reps are closely associated with the customers throughout their time at store and can complete the billing process using simply their iPad. Like any other business system, Lightspeed POS also needs to get and post data with other systems like ERPs, eCommerce, Shipping systems, Tax Solutions and many other external systems used in organization. To connect these, Lightspeed POS has APIs with oAuth Authentication for connection. In this blog let’s see how we can have access to Lightspeed POS APIs.

  • Access Lightspeed POS APIs

oAuth is the secure way to connect to any application and Lightspeed POS also uses oAuth authentication. oAuth allows developer to access Lightspeed APIs in a secure and streamlined way. The main steps to use OAuth2 Protocol is:

1.Register Client
2.Getting an Access Token
3.Making API Requests
become-appseconnect-partner

  • Register Client

To register your client for accessing APIs, you need to go to the page https://cloud.merchantos.com/oauth/register.php and register. Below are the fields and their details:

1.Name – It is shown to users when they are redirected to Lightspeed Retail to allow permission to your application. Ensure that it describes your application well enough that users understand which application is asking for permission to their account.

2.Client ID and Client Secret– It is used during the key exchange and authentication. Ensure that your Client Secret is kept secure as it is used to identify your application with Lightspeed Retail. Your client ID and secret can be any combination of letters and numbers less than 256 characters each.

3.Redirect URL– It is location that users will be redirected to after granting permission to your application. This URI will receive the temporary code to receive a permanent token. After submitting these details Lightspeed will review your request and generally will allow you access after 24 hours from placing a proper request.

  • Access Token

An Access Token is the credential that allows you to access a Lightspeed Retail account through the API. When you ask a user to authorize your application, in addition to your Client ID you must specify what permissions you are requesting. This section discusses how to have your client authorized and how to receive your Access Token.

OAuth Endpoints

These are the end points used to gain OAuth access to the Lightspeed Retail API. The Client Registration is used only once to register your client with Lightspeed Retail or to update your client information. The authorization endpoint is where you redirect clients to authorize your application for access to their account. The access token endpoint is used to convert the temporary token you receive from a successful authorization into a semi-permanent Access Token that can be used to access the API.
Client Registration – https://cloud.merchantos.com/oauth/register.php
Authorization – https://cloud.merchantos.com/oauth/authorize.php
Access Token Retrieval – https://cloud.merchantos.com/oauth/access_token.php

integrate-business-applications

  • API Requests

When you have an access token you can use it to make requests to the API.

1.Get parameter using the key oauth_token:
https://api.merchantos.com/API/Account/{accountID}/Item?oauth_token=[token_string]

2.Authorization header:
GET /API/Account/{accountID}/Item HTTP/1.1
Host: api.merchantos.com
User-Agent: Client Name
Accept: application/vnd.merchantos-v2+json
Authorization: OAuth [token_string]

You may also like:
Lightspeed Restaurant and Retail POS – Latest Version Releases
Lightspeed POS Integration with Shopify eCommerce store