Medipim FR - API V4

Developer documentation

Frequently asked questions

(Last updated: 23/07/2024)

How to handle API requests of 100/min?

if you expect to do more calls per minute, these are the ways of handling that:

  • 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
  • Store the data locally and synchronize regularly. You can avoid the request limit by
    • spacing you requests in time (one of our POS customers has hundreds of end clients and uses this technique)
    • using serveral API keys so you can switch to a different key when the limit has been reached

For your first import of product data there are 2 endpoints available:

  • the amount of products you expect to get will be less then 10000 products -> choose 'query'
  • the amount or products you expect is more then 10000 products (or unknown) -> choose 'streaming'
    • Each line in the response is a json and contains information for 1 product
    • You can start processing the data immediately
    • 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 what format are prices returned through the API?

We always return prices in the basedenomation (= lowest amount of the currency) to make sure there are no rounding errors. You can get the correct format by dividing the given number by 100.

ex. API response is returning "820" for a price field; This means that the price is €8.20.

How to request a large set of data?

You will have to decide in what way you are going to import data.

The products are presented through a newline in the response stream, appearing line by line. This allows for immediate data processing instead of waiting for the entire stream to receive and process a complete data block. If you're conducting tests, it's advisable to utilize the query endpoint, specifying pagination for optimal results.

Acquiring all information through a single API call is feasible, but it's crucial to note that the resulting response will be substantial. We strongly advise promptly handling the data to avoid buffering delays and initiate processing immediately. Neglecting this step may introduce risks and lead to failures. This precaution ensures the seamless operation of your system, allowing you to import data worry-free and maintain smooth functionality.

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 product identifier 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...