Medipim API V3

Developer documentation

Using the API

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.

Sandbox Environment

We have a sandbox environment that can be used to test and experiment.

  • Platform: https://platform.sandbox.medipim.be
  • API: https://api.sandbox.medipim.be

WARNING: The data on this environment is removed periodically !

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

GET https://api.medipim.be/v3/brands/all HTTP/1.1
Authorization: Basic QXBpS2V5SWQ6QXBpa2V5U2VjcmV0 // base64 encoded "ApiKeyId:ApikeySecret"

PHP

<?php
$h = curl_init("https://api.medipim.be/v3/brands/all");
curl_setopt($h, CURLOPT_USERPWD, "ApiKeyId:ApikeySecret");
curl_setopt($h, CURLOPT_RETURNTRANSFER, true);
curl_exec($h);

PHP client

<?php
$client = new \Medipim\Api\V3\MedipimApiV3Client($apiKeyId, $apiKeySecrets);
$response = $client->get("/v3/brands/all");

curl

$ curl --user 42:YvmgknrTzFp8667mXpFfEDD73Uz4VfqG https://api.medipim.be/v3/brands/all

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

Throttling & product quotas

V3 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

...