The Lengow API allows you to retrieve orders placed on marketplaces and take action on these orders. At the moment, the API only concerns marketplaces and orders, not products or catalogues.
Everything you need to know about our beloved Lengow API!
On this page we will help you get started with our API use cases and the key concepts explained.
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 API is a REST-based API that allows you to:
- List and retrieve the orders of your account
- Execute actions on orders: acceptance, shipment, cancellation, and refund
- Display the complete list of possible order actions authorized by each marketplace, at which status and with which mandatory or optional parameters
- Retrieve invoice documents
- Communicate with Zalando warehouse
Lengow Tips:
Throughout this guide we recommend you to use Postman to help you integrate and test our API.
Lengow does not provide support on Postman.
The inbound load balancer have a timeout of 350 seconds on the Keep-Alive. If the request is longer than this, a connection error will occur due to the request exceeding this limit.
Key Concepts
Before starting, you should understand a few central concepts in API:
- 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.
- Endpoint
The location where the API sends a request and where the response emanates is what is known as an endpoint.
- Pagination
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.
Example: /orders/?account_id=1&page=5&page_size=50
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.
Example: /orders/?account_id=1&marketplace=menlook
- Products
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.