About the Lightspeed Retail category

Add topics about this connector package here.
Always check the ‘How to use the Alumio connector packages’ topic.

Extra information

System documentation: Getting Started

Connector package documentation

​​Table of Contents

  • 1. Setting up the Lightspeed HTTP Client
    • 1.1 Interactive Authentication
    • 1.2 Bearer Token Authentication
  • 2. Subscribing to entities from Lightspeed
    • 2.1 Steps
    • 2.2 General concept
  • 3. Publishing entities to Lightspeed
    • 3.1 Steps
    • 3.2 General concept

1. Setting up the Lightspeed HTTP Client

1.1 Interactive Authentication

  1. In the Alumio Dashboard, go to Clients → HTTP Clients. Create a new HTTP Client and select Lightspeed Retail Client as the prototype of the HTTP Client.

  2. Fill in the Base URL, App Token, and Staff Token according to your Lightspeed Retail account, you can enable logging with the following options: Long, Full, Simple, and Custom.

  1. After all fields are filled, the last step of the Interactive Authentication type is “Grant Access to Lightspeed”. It will redirect you to the Lightspeed page and authorize the application by signing in using your credentials.

  2. Save the HTTP Client.
    Notes:

1.2 Bearer Token Authentication

  1. We can also select another method of authentication using Bearer Token.

  2. Fill in the Base URL, App Token, and Staff Token according to your Lightspeed Retail account, you can also enable logging with the following options: Long, Full, Simple and Custom.

  1. Save the HTTP Client.
    Note: Please ignore the “Grant Access to Lightspeed” button for this authentication.

2. Subscribing to Entities from Lightspeed

2.1 Steps

  1. Go to Connections → Incoming, create a new incoming configuration, and select the LightSpeed Retail Subscriber as the subscriber.
  2. Select the entity you want to subscribe to from LightSpeed Retail.
  3. Add any request parameters needed to subscribe to the entity. Please refer to an example in the General Concept section.
  4. You can optionally add a transformer to manipulate the request parameters into something of your choice.
  5. Select the Lightspeed Retail HTTP Client to use.
  6. You can also optionally enable pagination to allow the fetching of paginated entities. In the case of LightSpeed Retail, you should use the “Increase query parameter” as the pagination type (only available for some entities).

2.2 General Concept

We follow the Lightspeed Retail documentation for building this connector, so you can easily use the connector based on the Lightspeed Retail API Reference.

Account ID

You can easily retrieve the needed entity from the base URL of the Lightspeed Retail API reference by providing the parameters listed. Once logged in to Lightspeed, obtaining an Account ID is a simple process.


Entity

This is the entity you want to subscribe to from Lightspeed Retail. Please refer to the entities in Management APIs from the Lightspeed Retail API Reference page.

Request Parameters

These are the parameters you can provide to get the needed entity based on the Lightspeed Retail API reference.

Please look at the example below on how to fill the Request Parameters field when subscribing to the “Get All Categories” entity. We can see in the documentation that setting entity by ID requires ID as a path parameter to define which order we want to fetch the details from.

image

Besides ID in path parameters, the documentation also has endpoints that use query parameters. For example, “Limit” Query parameters describe that query parameters: limit is required and should be defined in the query parameters. So, we need to define it inside the query property in the Request Parameters field. In this example, the limit will be parsed as query parameters. Here is how we should fill the Request Parameters field.

Example Request Parameter:

image

  • “Path” is the path parameter of the URL. For example the {id}.
  • “Query” is a defined set of parameters attached to the end of a URL.
    Example: www.url.com?type=true&start=0

Input Transformer

Any transformers set here will be executed after the Request Parameters are loaded. So, you basically can add any transformer to provide and manipulate the request parameters into anything you need, either as path parameters and/or as query parameters of an entity.

HTTP Client

This is the HTTP Client configuration or prototype you will use to access Lightspeed Retail.

3. Publishing Entities to Lightspeed

3.1 Steps

  1. Go to Connections → Outgoing, create a new outgoing configuration and select Lightspeed Retail Publisher as the publisher.
  2. Select the method that you want the publisher to use with the data.
  3. Select the Lightspeed Retail endpoint where you want the data to be published.
  4. Select the HTTP Client to use.

3.2 General Concept

Like the subscriber, the publisher has similar methods on how to use it. The difference is the payload that will be submitted by the publisher originates from the data (from routes, from transformers in outgoing configurations), though you can also add or modify payload using the Request Transformer.

Action

Currently, we support POST methods for submitting data to Lightspeed Retail.

Entity

We support publishing to most Lightspeed Retail endpoints. Please refer to the Lightspeed Retail API Reference page. Based on the documentation, some endpoints may need one or more path parameters.

For example, we want to Post - Create a category.

image

The documentation says that we need “acountID” as path parameters. In that case, you need to provide the “accountID” property into the “path” property in the data, either as an output from Routes or output from Transformers in Outgoing Configuration. You can also add the payload that you want to send to Lightspeed Retail into the payload key in the data. Here is an example of the required data.

image

  • “Path” is the path parameter of the URL. For example the {id}.
  • “Query” is a defined set of parameters attached to the end of a URL.
    Example: www.url.com?type=true&start=0
  • “Payload” is the data contained within a request.

Alumio will send an API request to Lightspeed Retail with URL /API/v3/Account/12345/Category.json

HTTP Client

This is the HTTP Client configuration or prototype you will use to access Lightspeed Retail.