API documentation

Hello for all international customors we have now a english translation have fun and use or API for your fancy webprojects.

Feel free to aske me for details: anna.roth@proclima.com

REST API

Using this REST API you can query data about pro clima products for use in e.g. a web shop. Using the api will ensure that all product data is always up to date.

You can use a browser to explore the api. https://proclima-pdm.moll-group.eu/api/partner/v1/ The most interesting Resource should be the product (for example Intello Plus – https://proclima-pdm.moll-group.eu/api/partner/v1/product/4026639011992/).

Authentication

Authentication works via an API Token. You have to set the “Authorization” header to “Token YOUR_TOKEN_HERE”. You can see your actual token when browsing the API documentation on https://proclima-pdm.moll-group.eu/api/partner/v1/docs/ (which unfortunately is completely in German at the moment). At the end of this document you can see a few examples of how you might be able to use the API from different programming languages.

Language

The output language can be chose by appending e.g. ?language=en-gb to the url. List of available languages: https://proclima-pdm.moll-group.eu/api/partner/v1/language/

Product

A product is identified by its [GTIN-13].

Language

The output language can be chosen by appending e.g. ?language=en-gb to the output. See the [list of available languages][languages].

Product fields

Basic fields

name: The name of the product.
gtin: The GTIN-13 of the product.
language: The record language.
abas_id: pro clima internal product identifier (not unique)
item_number: The pro clima item number for this product.
price: The price of the product in Euro.
availability: The product availability. One of "unknown", "available", "limited", "not_available".

Dimensions & Units

length: Length if applicable.
width: Width if applicable.
height: Height if applicable.
area: Area if applicable.
joint: Joint width if applicable.
weight: Weight if applicable.
folded: A boolean if applicable. (Some Intello Plus with 3m width is folded to 1.6 meters)

trade_unit: Name of the smallest available unit, e.g. Roll

packaging_unit: Name of the packaging unit, e.g. Box
packaging_unit_quantity: Number of trade units per packaging unit

bundle_unit = Name of the bundle unit, e.g. PAL
bundle_unit_quantity = Number of trade units per bundle_unit

Texts

Where markup (HTML) is returned it is clean and will mostly consist of paragraphs and lists.

erp_description: Plain text description of the product for use in e.g. ERP systems.
erp_description_short: Short version of erp_description.

intro: A short plain text description of the product.

application: HTML describing where in construction the product is used.
application_short: Same as application, but shorter and plain text.

advantages: HTML listing the advantages of the product.
substrate: HTML describing the substrate on which the product may be applied (mostly used for adhesives).
limiting_factors: HTML describing things that need to be observed when using the product.

Images & PDFs

datasheet: A link to the product datasheet (pdf).
safety_datasheet: A link to the product safety datasheet (pdf). Empty string if none exists.
declaration_of_performance: A link to the declaration of performance (pdf). Empty string if none exists.

image: A link to an image of the product.
banner: A link to an image of the product containing the product name.

More attributes

attributes: A list of  attributes, mostly containing specifications that are measured
            according to certain norms and regulations, like e.g. the fire class

            [{"name": "Fire class", "norm": "BS EN 13501-1", "value": "E"}, ...]

materials : A list of materials the products is made of

            [{"name": "Inner lining", "value": "Paper"}, ...]

Examples

PHP

<?php
function getProductData($gtin){
    $context = stream_context_create(
        array("http" => array("header" => "Authorization: Token YOUR_TOKEN_HERE")));
    $product_data = file_get_contents("https://proclima-pdm.moll-group.eu/api/partner/v1/product/${gtin}/", false, $context);
    return json_decode($product_data, true);
}
$product = getProductData("4026639011992");

echo "<h2>${product["name"]}</h2>\n";

if ($product["intro"]) {
    echo "<p>${product["intro"]}</p>\n";
}

echo "<a href='${product["datasheet"]}'>Datenblatt</a>";

if ($product["limiting_factors"]) {
    echo "<h3>Rahmenbedingungen</h3>\n";
    echo "<p>${product["limiting_factors"]}</p>\n";
}

echo "<h2>Eigenschaften</h2>";
echo "<table>";
echo "<tr><th>Name</th><th>Norm</th><th>Wert</th></tr>\n";
foreach($product["attributes"] as $attribute) {
    echo "<tr>";
    echo "<td>${attribute["name"]}</td>\n";
    echo "<td>${attribute["norm"]}</td>\n";
    echo "<td>${attribute["value"]}</td>\n";
    echo "</tr>";
}
echo "</table>";

echo "<h2>Materialien</h2>";
echo "<table>";
echo "<tr><th>Name</th><th>Wert</th></tr>\n";
foreach($product["materials"] as $material) {
    echo "<tr>";
    echo "<td>${material["name"]}</td>\n";
    echo "<td>${material["value"]}</td>\n";
    echo "</tr>";
}
echo "</table>";
?>

Python

import json
import urllib2


def get_product_data(gtin):
    request = urllib2.Request("https://proclima-pdm.moll-group.eu/api/partner/v1/product/%s/" % (gtin, ),
                              headers={"Authorization": "Token YOUR_TOKEN_HERE"})
    response = urllib2.urlopen(request)
    return json.loads(response.read())

data = get_product_data("4026639011992")
print u"%s: %s" % (data['name'], data['intro'])

Bash & Curl

curl --header "Authorization: Token YOUR_TOKEN_HERE" "https://proclima-pdm.moll-group.eu/api/partner/v1/product/4026639011992/"