Medipim BE - API V4

Developer documentation

Using the API

(Last updated: 25/10/2021)

The Medipim API allows you to programmatically interact with the Medipim database.

The API can be accessed by sending HTTP requests to https://api.medipim.be. Information is exchanged in JSON format.

Tip

If you are using PHP, we recommend using our PHP client.

Authenticating

To access the API you will need an API key and secret.

The simplest way to provide authentication is using HTTP Basic authentication. Use your API key and secret as username and password.

HTTP

POST https://api.medipim.be/v4/brands/query HTTP/1.1
Authorization: Basic QXBpS2V5SWQ6QXBpa2V5U2VjcmV0 // base64 encoded "ApiKeyId:ApikeySecret"

PHP

<?php
$h = curl_init("https://api.medipim.be/v4/brands/query");
curl_setopt($h, CURLOPT_USERPWD, "ApiKeyId:ApikeySecret");
curl_setopt($h, CURLOPT_RETURNTRANSFER, true);
curl_setopt($handle, CURLOPT_HTTPHEADER, ["Content-type: application/json"]);
curl_setopt($handle, CURLOPT_POSTFIELDS, json_encode([]));
curl_exec($h);

PHP client

<?php
$client = new \Medipim\Api\Client($apiKeyId, $apiKeySecrets, "https://api.medipim.be");
$response = $client->post("/v4/brands/query");

curl

$ curl --user 42:YvmgknrTzFp8667mXpFfEDD73Uz4VfqG --location --request POST https://api.medipim.be/v4/brands/query

Most http clients and libraries support basic authentication. If not, you can also create the Authorization header yourself.

Throttling & product quotas

V4 of our API allows 100 requests per minute. The PHP client will automatically throttle your requests to respect this rate.

If you exceed this rate, an error will be return (http status code 429, error code too_many_requests).

...

Handling errors

...