API - Overview

The Lengow API enables the exchange of data between Lengow and your back office (can be your own back office, or a software like Prestashop, Magento etc...). 

Different "endpoints" populate the API:

  • /orders/

Retrieve all your orders from any marketplace you have set in Lengow

  • /orders/actions/
Manage and update your orders (accept order, confirm shipment, cancel…) according to the marketplaces list of acceptable order status.
  • /marketplaces/
See all marketplaces valid order statuses, and valid actions you can make on an order.
No action possible here.

Find below our conventions. These conventions are written to help you build your API requests and actions.

Executing requests / HTTP Response Codes

The Lengow API provides HTTP response codes for each request that correspond with the body and action the user has attempted.

Here are the most common response codes used by the Lengow API:

  • Code 200: OK = The HTTP 200 OK success status response code indicates that the request has succeeded.
  • Code 201: Created = The request has been fulfilled, a new resource has been created.
  • Code 202: Accepted = The request has been accepted for processing, but the processing has not been completed.
  • Code 400: Bad request = The server cannot or will not process the request due to an apparent client error (validation, wrong resource URL, etc).
  • Code 401: Access not granted = Used when authentication is required and has failed or has not yet been provided.
  • Code 403: Forbidden = The request was valid, but the server is refusing action. No permission to use resource.
  • Code 404: Not Found = The requested resource could not be found but may be available in the future.
  • Code 429: Request limitation reached = Too many requests have been made in a too short amount of time.
  • Code 530: Logical Error = The request has failed probably due to bad input parameters (catalog that does not exist, invalid search rules…). See accompanying message for more information.
  • Code 540: Technical Error = The request has failed due to an internal error. See accompanying message for more information.
For more information, see the List of HTTP code status

Content-Type and Accept Headers

The "Accept" header specifies the format of the request you want to receive.

In contrast, the "Content-Type" header defines the format the caller is sending to the API. Depending on the endpoint, the Lengow API supports a set of different message formats.

If you want to change the returned data format, you can set the Accept header. The server will answer you with the given format and change the Content-Type header.

  • By default, the format is “application/json”.

To get all accepted format, you can use the OPTIONS method such as below:


go to OPTIONS > headers

Key: Accept: application/json"

Change key with the requested format.


image source: Postman

Date and Time fields

The date and time fields are presented in ISO-8601 standard truncated to seconds with an offset from UTC.

The date and time format used for the Lengow API is listed below (our example is in JSON, and may vary in other programming languages. Please refer to your language documentation for more information).

Format: yyyy-MM-dd'T'HH:mm:ssXXX

Example date/time output:

"marketplace_order_date": "2019-03-22T17:54:34.369000Z"

Prices, Currencies and Countries

  • All monetary amounts such as prices are specified as decimal number.

Example: 5.50

  • All currencies are specified with three characters, as per the ISO 4217 convention.

Example : EUR

  • Depending on resource, countries are specified with two or three characters, as per ISO 3166-2 convention.

Example: FR

Executing requests / HTTP Methods

Supported HTTP methods:

  • GET
Retrieve data from the API.
Example: finds the list of orders with Lengow status "waiting shipment"
  • POST
add new data. The POST method sends data to the server.
Example: Creates a new shipment action based on the information in the request body, returns a response body that will point to the created shipment after creation
  • PUT: replace existing data
  • PATCH: update some existing data fields
  • DELETE: delete existing data

image source: Postman

Automatic HTTPS redirection

Shutdown of HTTP services in favor of HTTPS
As part of the continuous improvement of security within our platform and to ensure the safety of your data, the automatic redirection of HTTP flows to the HTTPS protocol will no longer be available as of September 1, 2022.

Without action on your part, service outages will occur without our support teams being able to act on the resolution of the problem.

How to maintain availability of our services?

To ensure availability to our services from your tools, we recommend that you check and update your settings. 
Depending on your organisation and scope of action, it may be necessary for your technical department to apply the changes.

Where do I check this information?

It depends on how you use the Lengow platform.

  • If you have tools to monitor your orders, importing catalogues or any other information to an ERP:

Check the settings of these tools. If the settings of your tool indicate a URL http://api.lengow.io/..., you only need to replace the "http" by "https" (https://api.lengow.io/...) and save the modification.

  • If you have set up Lengow short URLs on one or more channels:

To continue exporting your catalogues to the channels, check the settings saved on each of them. If the indicated setting uses the HTTP protocol (http://feeds.lengow.io/3/...), change the URL to use the HTTPS protocol (https://feeds.lengow.io/3/...)

After validating your changes, you can check that the updated service is working properly. 


Articles in this section

Our Support hours:
9 a.m. to 6:30 p.m. CET Monday through Friday