Frequently asked questions
(Last updated: 25/09/2023)
Is v4 of the Medipim API backwards compatible with previous versions?
The 4th version of our API is not compatible with previous version of the API. We have implemented breaking changes to reflect updates in the logical structure of product information, and to address technical/usability issues in previous api versions.
Documentation for previous versions:
- V1: https://platform.medipim.be/docs/api/v1/
- V2: https://platform.medipim.be/docs/api/v2/
- V3: https://platform.medipim.be/docs/api/v3/
How to handle API requests of 100/min?
if you expect to do more calls per minute, these are the ways of handling that:
1. Use Medipim as CDN, which means you refer to our url and have no limitations.
Disadvantage: when Medipim is in maintenance, you will have no data
2. Store the data locally and synchronize regularly. You can avoid the request limit by
1. spacing you requests in time (one of our POS customers has hundreds of end clients and uses this technique)
2. using serveral API keys so you can switch to a different key when the limit has been reached
For the first import there are 2 endpoints for importing product data: 1. the response will be less then 10000 SKUs -> choose 'query' https://api.medipim.be/v4/products/query 2. the answer will be more then 10000 SKUs -> choose 'streaming' https://api.medipim.be/v4/products/stream 1. Each line is a json 2. You can start processing the data immediately 3. Tip: you need to log which products have been processed, so you don't need to start all over when the connection is lost
How to deal with product status
You can use a filter in the body of the API request to select only the active products, for example. Inactive can be used to phase out products in your online application. Because when a product is inactive in Medipim it won’t be sold any more and there most likely won’t be any stock for that product anymore.
{
"status": "active"
}
In which format do prices come through the API?
Prices are shown on Medipim as such "€8,20". When you see them through a response you will see "820". Because the format is a basedenomation. You can get the correct format by dividing the given number by 100.
How to request a large set of data?
You will have to decide which in what way you are gonna import data.
Via stream, the products are displayed via a newline, which is line by line in the response. So you can already process that data directly instead of waiting for the full stream to then process a full block of data. If you just want to test, it is best to use the query endpoint (here you will have to specify a pagination).
Getting everything through one API call can be done, but be aware that the response you get will be massive. We highly recommend to process the data instantly. To make sure to not buffer and start processing the data. If you don't do this it will pose risks and will fail. This is to make sure your system also runs smoothly without problems so you can import data without worrying.
How to know which fields are available?
We have an endpoint that can be called to request all the fields available get-fields. Those can be used to filter on using the hasContent filter in the body.
Product Identifiers
Not all products have a CNK code.
If you need to have a unique code for a product, you should use the Medipim product ID.
Products can have multiple EAN codes; Europe also intended to use this as a cross country unique product code. In reality this code has duplicates...