Postman
Postman is an application that lets you send HTTP requests to Lightspeed API endpoints. It can be a useful tool for getting started with any of the Lightspeed APIs or for debugging your applications.
You can download Postman for free on their official website.
Get your Lightspeed eCom credentials
To make authorized requests to the Lightspeed eCom API in Postman, you need API credentials.
Setting up your Postman environment
To get you started with the eCom API, we have built a Postman collection that includes every endpoint and method currently available. Click here to download.
After you download the collection, you will need to import it into Postman. This process is described below.
-
Open Postman and click on the Import button located at the top left.
-
Click to find the collection on your computer or drag and drop the file into the import window.
After importing the collection, the next step is setting up an environment. An environment is a set of variables that allow you to change the context of your requests. This is where we will host the api_key
, api_secret
and the cluster
that are needed in order to send API requests. More information can be found on our clusters page.
-
To get started click the cogwheel icon at the top right of Postman.
-
In the pop-up window click Add to start creating an environment.
-
When you have received your API keys from support or when you are a partner, you should be able to fill in the variables as shown in the screenshot below.
-
Click Add at the bottom right corner to complete the creation of the environment. You are now ready to start sending API requests to the Lightspeed eCom API.
Sending requests to your Lightspeed eCom shop with Postman
Example response
{
"shop": {
"id": 11988,
"createdAt": "2012-08-28T22:49:09+02:00",
"status": "test",
"isB2b": false,
"isRetail": false,
"subDomain": "storefront",
"mainDomain": "www.domain.com",
"email": "[email protected]",
"currency": {
"shortcode": "EUR",
"symbol": "€",
"title": "Euro",
"isDefault": true,
"currencyRate": "1.000000"
},
"company": {
"resource": {
"id": false,
"url": "shop/company",
"link": "https://api.shoplightspeed.com/nl/shop/company.json"
}
},
"limits": {
"resource": {
"id": false,
"url": "shop/limits",
"link": "https://api.shoplightspeed.com/nl/shop/limits.json"
}
},
"javascript": {
"resource": {
"id": false,
"url": "shop/javascript",
"link": "https://api.shoplightspeed.com/nl/shop/javascript.json"
}
},
"website": {
"resource": {
"id": false,
"url": "shop/website",
"link": "https://api.shoplightspeed.com/nl/shop/website.json"
}
},
"scripts": {
"resource": {
"id": false,
"url": "shop/scripts",
"link": "https://api.shoplightspeed.com/nl/shop/scripts.json"
}
},
"metafields": {
"resource": {
"id": false,
"url": "shop/metafields",
"link": "https://api.shoplightspeed.com/nl/shop/metafields.json"
}
}
}
}
After setting up your environment, you can click on one of the folders in the collection at the left and start making API requests.
To get your shop’s information, navigate to the Shop folder and click on the GET request. The request will open, and you will be able to hit the Send button.
If the request was formatted correctly, then the shop information will be returned and will look similair to the response on the right.
More information
If you are in need of more information regarding Postman and collections, you can find their documentation on the following page.