Medipim API V2 Documentation

need help?

API V1 Reference

GET /v1/product/{cnk}

Get information on a single product.

Request

url
https://api.medipim.be/v1/product/{cnk}
method
GET

parameters:

parameter description
user_id Your API User ID.
validation Validation hash (see Using a validation hash).

Response

HTTP status code:

code reason
200 Successful request.
400 Request cannot be fulfilled due to bad input.
403 Authentication failure (see Why am I getting error code 403?).

Content-type
application/json

Content:

property type description
products list of objects
products[].id integer Unique identifier for the product+language
products[].cnk string CNK code
products[].language string Language code ("nl", "fr" or "en")
products[].last_updated_at string (ISO 8601) Timestamp indicating the last time the product was updated.
products[].name string
products[].public_name string
products[].description string (plaintext, multiline)
products[].full_description string (html)
products[].indication string (html)
products[].composition string (html)
products[].usage string (html)
products[].properties string (html)
products[].prescription boolean
products[].writtenRequestByPatient boolean
products[].tax float (%)
products[].public_price_apb float (€)
products[].public_price_febelco float (€)
products[].public_price_manufacturer float (€)
products[].weight integer (g)
products[].width integer (mm)
products[].height integer (mm)
products[].depth integer (mm)
products[].diameter integer (mm)
products[].ean string
products[].atc string
products[].udi string
products[].nut string
products[].fagg_publ_notice string (url)
products[].fagg_spc_notice string (url)
products[].pharma_publ_notice string (url)
products[].pharma_spc_notice string (url)
products[].labo_publ_notice string (url)
products[].labo_spc_notice string (url)
products[].appstores list of objects
products[].appstores[].name string
products[].appstores[].link string (url)
products[].appstores[].from string (ISO 8601)
products[].appstores[].to string (ISO 8601)
products[].appstores[].description string (plaintext, multiline)
products[].appstores[].target_groups list of objects
products[].appstores[].target_groups[].target_group string
products[].appstores[].thumbnail_path string (relative media url)
products[].leaflets list of objects same structure as products[].appstores
products[].videos list of objects same structure as products[].appstores
products[].websites list of objects same structure as products[].appstores
products[].thumbs.450x450 list of strings (relative media urls)
products[].thumbs.900x900 list of strings (relative media urls)

When a product is not found, we return an empty result with response code 200.

Example code

<?php

$id = 92;
$key = "5TlnzOBlPRa9udfbVpXP...";

$cnk = "0011234";
$url = "https://api.medipim.be/v1/product/$cnk?user_id=$id";
$hash = hash_hmac("sha256", "user_id=$id", $key);
$url .= "&validation=$hash";
$request = curl_init($url);
curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
$response = json_decode(curl_exec($request));
$responseCode = curl_getinfo($request, CURLINFO_HTTP_CODE);

GET /v1/product/images/{cnk}

Get media for a single product.

Request

url
https://api.medipim.be/v1/product/images/{cnk}
method
GET

parameters:

parameter description
user_id Your API User ID.
validation Validation hash (see Using a validation hash).

Response

HTTP status code:

code reason
200 Successful request.
400 Request cannot be fulfilled due to bad input.
403 Authentication failure (see Why am I getting error code 403?).

Content-type
application/json

Content:

property type description
products list of objects
products[].id integer Unique identifier for the product+language
products[].cnk string CNK code
products[].language string Language code ("nl", "fr" or "en")
products[].last_updated_at string (ISO 8601) Timestamp indicating the last time the product was updated.
products[].thumbs.450x450 list of strings ([relative media urls](faq.html#media))
products[].thumbs.900x900 list of strings ([relative media urls](faq.html#media))

Example code

<?php

$id = 92;
$key = "5TlnzOBlPRa9udfbVpXP...";

$cnk = "0011234";
$url = "https://api.medipim.be/v1/product/images/$cnk?user_id=$id";
$hash = hash_hmac("sha256", "user_id=$id", $key);
$url .= "&validation=$hash";
$request = curl_init($url);
curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
$response = json_decode(curl_exec($request));
$responseCode = curl_getinfo($request, CURLINFO_HTTP_CODE);

GET /v1/products/{cnks}

Get information on multiple products.

Request

url

https://api.medipim.be/v1/products/{cnks}

Information for multiple products can be requested at the same time; concatenate the CNKs (without separator).

method
GET

parameters:

parameter description
user_id Your API User ID.
validation Validation hash (see Using a validation hash).

Response

HTTP status code:

code reason
200 Successful request.
400 Request cannot be fulfilled due to bad input.
403 Authentication failure (see Why am I getting error code 403?).

Content-type
application/json

Content:

property type description
products object
products.version string deprecated
products.products list of objects
products.products[].... same fields as products[] in GET /v1/product/{cnk}

Example code

<?php

$id = 92;
$key = "5TlnzOBlPRa9udfbVpXP...";

$cnks = ["0011234", "0123123", /*...*/];
$url = "https://api.medipim.be" . implode($cnks) . "?user_id=$id";
$hash = hash_hmac("sha256", "user_id=$id", $key);
$url .= "&validation=$hash";
$request = curl_init($url);
curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
$response = json_decode(curl_exec($request));
$responseCode = curl_getinfo($request, CURLINFO_HTTP_CODE);

GET /v1/product/show

Request

url
https://api.medipim.be/v1/web/product/show
method
GET

parameters:

parameter description
user_id
cnk
language
validation

Response

HTTP status code:

code reason
200 Successful request.
403 Authentication failure (see Why am I getting error code 403?).
404 Product not found.

Content-type
text/html
Content

An info page (html) for the product with the given CNK and language.

The page contains a human-friendly, localized representation of all known information on the product.

GET /v1/my_products

Response

HTTP status code:

code reason
410 This resource is no longer supported.

GET /v1/my_settings

Response

HTTP status code:

code reason
410 This resource is no longer supported.