Introduction
Introduction
Welcome to the Lizee RMS API documentation.
You will be able to find different types of documnetation here : technical references (endpoint and model definitions), tutorials, how-to guides and explanations.
This documentation is a work in progress. It is frequentely updated to reflect the latest changes.
API Reference
The Lizee RMS API is organized around REST. Our API is doing its best to have predictable resource-oriented URLs, to return JSON-encoded responses and to use standard HTTP verbs and response codes, both for success and error messages.
Here you can find a small table summarizing the most common REST methods and their explanation :
| HTTP VERB | PATH | QUERY PARAMETERS | BODY | USE FOR | EXAMPLE |
|---|---|---|---|---|---|
| GET | /resources | OPTIONAL | NO | Get a list of resources | GET api/parcelshops?country=FR&city=Villennes&zip=78670... |
| GET | /resources/:id | OPTIONAL | NO | Get a specific resource details | GET api/products/123 |
| POST | /resources | NO | YES | Create a resource | POST /api/products {"name": "Robe droite guipure", "code":"MFPRO01795Bleu"} |
| PATCH | /resources/:id | NO | YES | Update a resource | PATCH /api/products {"name": "Robe droite en guipure"} |
| DELETE | /resources/:id | NO | NO | Delete a resource | DELETE /api/products/123 |
These methods are the base of REST, but it is not complete in any way.
For example, you can
- perform a specific action using a POST (i.e :
POST /api/shipments/returnto create a return label) - get a specific sub-category of the resource using GET (i.e :
GET /api/parcelshops/storesto get only the "stores" of the parcelshops) - get a specific property of the resource using GET (i.e :
GET /api/orders/123/is-deletableto know if you can delete the order 123)
Query Parameters and Body are optional, depending on the endpoint. Delete can be hard deletes or soft deletes. It should be written on every endpoint.
Authentication
This API uses API keys (or tokens) to authenticate its users. You should have two API keys, one that we call public, and one that we call private. These API keys should be given to you by the Lizee team. Even though one key is called public, you should be very careful with both keys and not share them in publicly accessible areas such as your git repository, directly in your code and so forth.
- The public key should be used on your frontend application, it is for non-sensitive information : get the available stock for certain products, check for available parcel shops near the customer's location...
- The private key should be used on your backend application, it is for sensitive information : everything order-related, customer-related...
For both API keys, you must pass a x-api-key header, with the API key as value. You don't have to specify if it's the public one or the private one.
You can try the following request with your token :
{
"method": "get",
"url": "https://api.lizee.io/api/health-check",
"headers": {"x-api-key": "your-api-key"}
}
All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will return a 401 Unauthorized.
Environments
In this documentation you will see 3 different environments : development, staging, and production.
Development
This is the most up-to-date environment. It is therefore unstable and a reset happens very often. It is mainly used by Lizee own developers but it can be useful for you to test your requests on this environment first. Please contact Lizee if you want to try this environment because you will need a specific test token.
Staging
This is the pre-production environment. It should be way more stable that the development environment but bugs can still happen because new features are constantly tested on it. It is on this environment that you will do your integration in the first place.
Production
This is the real deal. Any request executed on the production environment will be accepted and it won't be possible to rollback any of them. Please be careful when you send a request on this environment.