Everything you need to know about our beloved Lengow API!
Please have in mind that we offer a plugin solution to my.lengow.io that you can use instead of our API if you have a back office on Prestashop, Magento, Shopify, Shopware or Woocommerce.
Before you start connecting to our API you need to sign up for a Lengow account. This will enable you to authenticate yourself and connect to the API.
Our API technical documentation is here.
Lengow's API uses the REST standard.
Throughout this guide we recommend you to use Postman to help you integrate and test our API.
Lengow does not provide support on Postman.
Before starting, you should understand a few central concepts in API:
An application programming interface (API) is a computing interface which defines interactions between multiple software intermediaries.
It works on an input and output principle, meaning, that it is used to send actions and retrieve information between two systems.
The API itself defines the types of calls to action and requests that can be made, how to make them, and the expected format that must be used for it to work.
More info here.
- Access token
To authenticate yourself you need to get an access token. It's a block of characters that contains the security credentials for a login session and identifies the user (you).
Example of token: "6b7280eb-e7d4-4b94-a829-7b3853a20126"
- Authorization header
>The Authorization header contains your authentication credentials. Once you have your token, all your API request will need an Authorization header.
The location where the API sends a request and where the response emanates is what is known as an endpoint.
A common example for query parameters is pagination. Resources that return lists of entities are all paginated. To use pagination, the user specifies a query parameter page with a given page number, a non-negative integer. When omitted, the default value for page is 1.
Query Parameters (Filtering)
With the use of query parameters, users can define additional filters that can limit the number of entities returned in the response. Users can optionally specify the query parameters and combine them at will. Query parameters are added to the end of a resource path.
The first query parameter is prefixed by "?", all additional query parameters are separated by the "&" symbol.
A product is any article that can be sent from Lengow to a channel. It is generally defined by its European Article Numbering code (EAN), or by a unique ID you chose and enriched with descriptions, pictures and other content.
- Orders and order items
When a customer purchases one or more items on a channel an order is created. The order contains one or more order items. Each order item contains a unique ID, quantity, price, customer reference, etc...
- Other concepts and flows
A shipment is created when one or more order items are sent to the customer, a return is created when a customer wants to return an order item and a cancellation is used to cancel an order or order item.
The full process of orders with Lengow is described here.