Api Documentation v2.01

Version 2.01 of the Desco API is active since 29 april 2021.
Version 1 remains active untill July 2022 but has less features.

Changes in Version 2.01

  • New api endpoint url.
  • Item > Status, in response of GetBasket in now in CamelCase
  • OrderId, in the response of PlaceOrder is now in CamelCase

Changes in Version 2.00

  • New api endpoint url.
  • It is no longer needed to encrypt logon information. The TLS of https should suffice. However, encryption is still supported (see version 1).
  • Xml now has only CamelCase tags
  • New call to retrieve the complete ProductList.
  • New call to retrieve the Desco Pickup Locations
  • New call to post an Order.

Introduction

You can interact with Desco with a small set op REST calls over https. This allows the partner to choose any platform/technology to implement an integration.

The calls are specific for each partner. Wherever you encounter the word “yourpartnerid”, just replace it with the partner-alias that Desco gives you (after simple request).

Response Status

Every Response will return a Status. 

  • Responses regarding Products will return a global status as well as a product-specific status. eg <Status code="1">onbekende gebruiker</Status>
  • globale return statussen 
    • 0: the call was succesful
    • 1: onbekende gebruiker = login failed
    • 2: geen artikelen in de winkelwagen = when shoppingcart is empty and hence no products can be returned
    • 5: onbekende artikelnummers = when a PVCheck finds unknown products (so when there is at least 1 product with product-specific-status = 3)
  • product-specific status 
    • 0: no errors
    • 3: artikelnummer onbekend = when a PVCheck finds an unknown products

Disclaimer

We welcome any feedback as we want to make your integration as smooth as possible. 

 

Returns a url that can be used in a browser. This url is intended for immediate use and hence is only valid for 90sec.

This url will bring the visitor to the Partner shoppingcart and will logon that user.

This Shoppingcart is part of a stripped-down version of the Desco website. The user can search products and add them to the shoppingcart. 

With the "GetBasket" call you can import the products of that cart.

 

Endpoint Url - TEST environment

  • https://test.desco.be/desktopmodules/desco/api/v201/yourpartnerid/GetAutoLogonUrl

Endpoint Url - PRODUCTION environment

  • https://www.desco.be/desktopmodules/desco/api/v201/yourpartnerid/GetAutoLogonUrl
  • username
    • should be the email address of the user
  • password
  • customerid
  • language
    • is optional; possible values: [FR, NL]. Defines the preferred language of user.

Example with credentials in plain text (but over HTTPS)

https://www.desco.be/desktopmodules/desco/api/v201/yourpartnerid/GetAutoLogonUrl?username=yourlogin@yourdomain.be&password=123fake!&customerid=77777

 

Example with encryption

https://www.desco.be/desktopmodules/desco/api/v201/yourpartnerid/GetAutoLogonUrl?username=oaftwghSl1VyH8Ztk9c26LLxIInlqth9UgV0OCOW73%2FlJmRWhB%2FHnOJKWWgjiZm7&Password=4q7uJ6ND%2BnKW54mfWLQkGA%3D%3D&customerid=ZIrxEBB6o82ur5OZjp5XhQ%3D%3D

Each value was Encrypted, then Base64 encoded and then URL escaped

https://www.desco.be/nl-be/desco-login?qpl=836b51d27d0743c480f032e0b0f04ab2ef03d0494082ec0bd8a0e9e3b5909be4e6d8a549bfd23059f666245ffa9e3fd6ab740d11585e5b295186145d395dff9cf5803c604ad51a13ad520ba5d0b67cfac995eaae15cd0cfe5954fd245e6db18af95a21778d57239a43d0322b8f460415b8cd868baacac9ecde5146ed83b40f99e2e06db2bf8e98a9831e36b16f7e97e73f2e68a0c25481dccd5683b8611544c96fc41a05abefc776833f24a52c38cf75

Returns the content of the Partner shoppingcart in xml format.

Endpoint Url - TEST environment

  • https://test.desco.be/desktopmodules/desco/api/v201/yourpartnerid/GetBasket

Endpoint Url - PRODUCTION environment

  • https://www.desco.be/desktopmodules/desco/api/v201/yourpartnerid/GetBasket

none

POST Body example

<?xml version="1.0" encoding="UTF-8" ?>

<DescoXml version="1.0">

  <Request>   

    <Customer>     

      <CustomerNumber>77777</CustomerNumber>     

      <UserId>yourlogin@yourdomain.be</UserId>     

      <Password>123fake!</Password>   

    </Customer>

  </Request>

</DescoXml>

Example empty basket:

<?xml version="1.0" encoding="UTF-8" ?>

<DescoXml version="1.0">

    <Response>

        <Status code="2">

            geen artikelen in de winkelwagen

        </Status>

    </Response>

</DescoXml>

 

Example filled basket with 2 product

<?xml version="1.0" encoding="UTF-8" ?>

<DescoXml version="1.0">

    <Response>

        <Status code="0">

        </Status>

            <Item>

                <Status code="0"></Status>

                <ProductId>66100</ProductId>

                <DescriptionNl>OPHANGSYSTEEM WC SANBLOC GEBERIT</DescriptionNl>

                <DescriptionFr>SYST.DE SUSP.WC SANBL.GEBERIT</DescriptionFr>

                <Quantity>1,000</Quantity>

                <Unit>ST</Unit>

                <Price>294,00</Price>

                <NettPrice>279,30</NettPrice>

                <LineTotal>279,3000</LineTotal>

                <MinimalOrderQuantity>1</MinimalOrderQuantity>

                <SupplierProductId>440303005</SupplierProductId>

                <EanCode></EanCode>

                <Recupel></Recupel>

                <ProductDetailPageNl>https://test.desco.be/nl-be/producten/info?qpid=66100</ProductDetailPageNl>

                <ProductDetailPageFr>https://test.desco.be/fr-be/produits/info?qpid=66100</ProductDetailPageFr>

                <ProductImage>https://test.desco.be/portals/0/files/OCA/160/OCA16092_M.jpg</ProductImage>

                <TechnicalDatasheetNl></TechnicalDatasheetNl>

                <TechnicalDatasheetFr></TechnicalDatasheetFr>

                <DeeplinkNl></DeeplinkNl>

                <DeeplinkFr></DeeplinkFr>

                <ProductType>STO</ProductType>

            </Item>

            <Item>

                <Status code="0"></Status>

                <ProductId>134376</ProductId>

                <DescriptionNl>TUB ACRYL NEWFORM 80-80-4 WIT</DescriptionNl>

                <DescriptionFr>TUB ACRYL NEWFORM 80-80-4 BLANC</DescriptionFr>

                <Quantity>1,000</Quantity>

                <Unit>ST</Unit>

                <Price>175,00</Price>

                <NettPrice>166,25</NettPrice>

                <LineTotal>166,25000</LineTotal>

                <MinimalOrderQuantity>1</MinimalOrderQuantity>

                <SupplierProductId>K515101</SupplierProductId>

                <EanCode></EanCode>

                <Recupel></Recupel>

                <ProductDetailPageNl>https://test.desco.be/nl-be/producten/info?qpid=134376</ProductDetailPageNl>

                <ProductDetailPageFr>https://test.desco.be/fr-be/produits/info?qpid=134376</ProductDetailPageFr>

                <ProductImage>https://test.desco.be/portals/0/files/OCA/195/OCA19548_M.jpg</ProductImage>

                <ProductType>STO</ProductType>

            </Item>

    </Response>

</DescoXml>

Returns an XML with pricing information about the products listed in the original Request.

Endpoint Url - TEST environment

  • https://test.desco.be/desktopmodules/desco/api/v201/yourpartnerid/ClearBasket

Endpoint Url - PRODUCTION environment

  • https://www.desco.be/desktopmodules/desco/api/v201/yourpartnerid/ClearBasket

none

POST Body example

<?xml version="1.0" encoding="UTF-8" ?>

<DescoXml version="1.0">

  <Request>   

    <Customer>     

      <CustomerNumber>77777</CustomerNumber>     

      <UserId>yourlogin@yourdomain.be</UserId>     

      <Password>123fake!</Password>   

    </Customer>   

  </Request>

</DescoXml>

<?xml version="1.0" encoding="UTF-8" ?>

<DescoXml version="1.0">

    <Response>

        <Status code="0">

        </Status>

    </Response>

</DescoXml>

Returns an XML with pricing information about the products listed in the original Request.

Endpoint Url - TEST environment

  • https://test.desco.be/desktopmodules/desco/api/v201/yourpartnerid/PVcheck

Endpoint Url - PRODUCTION environment

  • https://www.desco.be/desktopmodules/desco/api/v201/yourpartnerid/PVcheck

none

POST Body example

<?xml version="1.0" encoding="UTF-8" ?>

<DescoXml version="1.0">

  <Request>   

    <Customer>     

      <CustomerNumber>77777</CustomerNumber>     

      <UserId>yourlogin@yourdomain.be</UserId>     

      <Password>123fake!</Password>   

    </Customer>  

    <Item>

        <ProductId>10001</ProductId>

        <ProductId>10002</ProductId>

        <ProductId>10101</ProductId>

        <ProductId>10102</ProductId>

        <ProductId>11086</ProductId>

    </Item>   

  </Request>

</DescoXml>

<?xml version="1.0" encoding="UTF-8" ?>

<DescoXml version="1.0">

    <Response>

        <Status code="0">

        </Status>

        <Item>

            <Status code="0">

            </Status>

            <ProductId>10102</ProductId>

            <DescriptionNl>RK ELLEBOOG 90&#176; MF 22MM</DescriptionNl>

            <DescriptionFr>CUIVRE A SOUDER COUDE 90&#176; MF 22MM</DescriptionFr>

            <Quantity>0</Quantity>

            <Unit>ST</Unit>

            <Price>2,10</Price>

            <NettPrice>1,60</NettPrice>

            <LineTotal>0</LineTotal>

            <MinimalOrderQuantity>1</MinimalOrderQuantity>

            <SupplierProductId>092022</SupplierProductId>

            <EanCode></EanCode>

            <Recupel></Recupel>

            <ProductDetailPageNl>http://desco.iis.holoncom.eu/nl-be/producten/info?qpid=10102</ProductDetailPageNl>

            <ProductDetailPageFr>http://desco.iis.holoncom.eu/fr-be/produits/info?qpid=10102</ProductDetailPageFr>

            <ProductImage>http://desco.iis.holoncom.eu/portals/0/files/OCA/000/OCA00015_M.jpg</ProductImage>

            <TechnicalDatasheetNl></TechnicalDatasheetNl>

            <TechnicalDatasheetFr></TechnicalDatasheetFr>

            <DeeplinkNl></DeeplinkNl>

            <DeeplinkFr></DeeplinkFr>

            <ProductType>STO</ProductType>

        </Item>

        <Item>

            <Status code="0">

            </Status>

            <ProductId>11086</ProductId>

            <DescriptionNl>GORDIJNHOUDER RECHT 200CM +BEVESTIGING</DescriptionNl>

            <DescriptionFr>PORTE-RIDEAU DROIT 200CM AVEC FIXATION</DescriptionFr>

            <Quantity>0</Quantity>

            <Unit>ST</Unit>

            <Price>31,30</Price>

            <NettPrice>23,79</NettPrice>

            <LineTotal>0</LineTotal>

            <MinimalOrderQuantity>1</MinimalOrderQuantity>

            <SupplierProductId>11086</SupplierProductId>

            <EanCode></EanCode>

            <Recupel></Recupel>

            <ProductDetailPageNl>http://desco.iis.holoncom.eu/nl-be/producten/info?qpid=11086</ProductDetailPageNl>

            <ProductDetailPageFr>http://desco.iis.holoncom.eu/fr-be/produits/info?qpid=11086</ProductDetailPageFr>

            <ProductImage>http://desco.iis.holoncom.eu/portals/0/files/OCA/126/OCA12686_M.jpg</ProductImage>

            <TechnicalDatasheetNl>http://www.desco.be/Portal/TF/OTA12686.pdf</TechnicalDatasheetNl>

            <TechnicalDatasheetFr>http://www.desco.be/Portal/TF/OTA12686.pdf</TechnicalDatasheetFr>

            <DeeplinkNl></DeeplinkNl>

            <DeeplinkFr></DeeplinkFr>

            <ProductType>STO</ProductType>

        </Item>

    </Response>

</DescoXml>

Returns an XML with pricing information of all the Desco products.

This call might take a while to respond. So allow a Response time of 180sec.

Endpoint Url - TEST environment

  • https://test.desco.be/desktopmodules/desco/api/v201/yourpartnerid/GetAllProducts

Endpoint Url - PRODUCTION environment

  • https://www.desco.be/desktopmodules/desco/api/v201/yourpartnerid/GetAllProducts

none

POST Body example

<?xml version="1.0" encoding="UTF-8" ?>

<DescoXml version="1.0">

  <Request>   

    <Customer>     

      <CustomerNumber>77777</CustomerNumber>     

      <UserId>yourlogin@yourdomain.be</UserId>     

      <Password>123fake!</Password>   

    </Customer>  

  </Request>

</DescoXml>

<?xml version="1.0" encoding="UTF-8" ?>

<DescoXml version="1.0">

    <Response>

        <Status code="0">

        </Status>

        <Item>

            <Status code="0">

            </Status>

            <ProductId>10102</ProductId>

            <DescriptionNl>RK ELLEBOOG 90&#176; MF 22MM</DescriptionNl>

            <DescriptionFr>CUIVRE A SOUDER COUDE 90&#176; MF 22MM</DescriptionFr>

            <Quantity>0</Quantity>

            <Unit>ST</Unit>

            <Price>2,10</Price>

            <NettPrice>1,60</NettPrice>

            <LineTotal>0</LineTotal>

            <MinimalOrderQuantity>1</MinimalOrderQuantity>

            <SupplierProductId>092022</SupplierProductId>

            <EanCode></EanCode>

            <Recupel></Recupel>

            <ProductDetailPageNl>http://desco.iis.holoncom.eu/nl-be/producten/info?qpid=10102</ProductDetailPageNl>

            <ProductDetailPageFr>http://desco.iis.holoncom.eu/fr-be/produits/info?qpid=10102</ProductDetailPageFr>

            <ProductImage>http://desco.iis.holoncom.eu/portals/0/files/OCA/000/OCA00015_M.jpg</ProductImage>

            <TechnicalDatasheetNl></TechnicalDatasheetNl>

            <TechnicalDatasheetFr></TechnicalDatasheetFr>

            <DeeplinkNl></DeeplinkNl>

            <DeeplinkFr></DeeplinkFr>

            <ProductType>STO</ProductType>

        </Item>

        <Item>

            <Status code="0">

            </Status>

            <ProductId>11086</ProductId>

            <DescriptionNl>GORDIJNHOUDER RECHT 200CM +BEVESTIGING</DescriptionNl>

            <DescriptionFr>PORTE-RIDEAU DROIT 200CM AVEC FIXATION</DescriptionFr>

            <Quantity>0</Quantity>

            <Unit>ST</Unit>

            <Price>31,30</Price>

            <NettPrice>23,79</NettPrice>

            <LineTotal>0</LineTotal>

            <SupplierProductId>11086</SupplierProductId>

            <EanCode></EanCode>

            <Recupel></Recupel>

            <ProductDetailPageNl>http://desco.iis.holoncom.eu/nl-be/producten/info?qpid=11086</ProductDetailPageNl>

            <ProductDetailPageFr>http://desco.iis.holoncom.eu/fr-be/produits/info?qpid=11086</ProductDetailPageFr>

            <ProductImage>http://desco.iis.holoncom.eu/portals/0/files/OCA/126/OCA12686_M.jpg</ProductImage>

            <TechnicalDatasheetNl>http://www.desco.be/Portal/TF/OTA12686.pdf</TechnicalDatasheetNl>

            <TechnicalDatasheetFr>http://www.desco.be/Portal/TF/OTA12686.pdf</TechnicalDatasheetFr>

            <DeeplinkNl></DeeplinkNl>

            <DeeplinkFr></DeeplinkFr>

            <ProductType>STO</ProductType>

        </Item>

    </Response>

</DescoXml>

Returns the list of Desco Pickup location addresses

Endpoint Url - TEST environment

  • https://test.desco.be/desktopmodules/desco/api/v201/yourpartnerid/GetDescoPickupLocations

Endpoint Url - PRODUCTION environment

  • https://www.desco.be/desktopmodules/desco/api/v201/yourpartnerid/GetDescoPickupLocations

none

POST Body example

<?xml version="1.0" encoding="UTF-8" ?>

<DescoXml version="1.0">

  <Request>   

    <Customer>     

      <CustomerNumber>77777</CustomerNumber>     

      <UserId>yourlogin@yourdomain.be</UserId>     

      <Password>123fake!</Password>   

    </Customer>   

  </Request>

</DescoXml>

<DescoXml version="1.0">
   <Response>
      <Status code="0"></Status>
      <Locations>
         <Location>
            <Name>Desco Aalst</Name>
            <Street>Industrielaan</Street>
            <Number>9</Number>
            <ZipCode>9320</ZipCode>
            <City>Aalst</City>
            <CountryCode>BE</CountryCode>
            <Telephone>+32 53 38 29 38</Telephone>
         </Location>
         <Location>
            <Name>Desco Aartselaar</Name>
            <Street>Kontichsesteenweg</Street>
            <Number>34</Number>
            <ZipCode>2630</ZipCode>
            <City>Aartselaar</City>
            <CountryCode>BE</CountryCode>
            <Telephone>+32 3 334 44 44</Telephone>
         </Location>
...
      </Locations>
   </Response>
</DescoXml>

Places an Order.

Endpoint Url - TEST environment

  • https://test.desco.be/desktopmodules/desco/api/v201/yourpartnerid/PlaceOrder

Endpoint Url - PRODUCTION environment

  • https://www.desco.be/desktopmodules/desco/api/v201/yourpartnerid/PlaceOrder

none

POST Body example

<?xml version="1.0" encoding="UTF-8" ?>

<DescoXml version="1.0">

  <Request>   

    <Customer>     

      <CustomerNumber>77777</CustomerNumber>     

      <UserId>yourlogin@yourdomain.be</UserId>     

      <Password>123fake!</Password>   

    </Customer>   

    <WantedDeliveryDate>2020-10-30</WantedDeliveryDate>

    <ShippingCondition>10</ShippingCondition>

    <OrderReference>my first order</OrderReference>

    <Remark>an optional</Remark>

    <Order>

      <OrderItem>

        <ProductId>66100</ProductId>

        <DescriptionNl>OPHANGSYSTEEM WC SANBLOCGEBERIT</DescriptionNl>

        <DescriptionFr>SYST.DE SUSP.WCSANBL.GEBERIT</DescriptionFr>

        <QuantityAsked>1,000</QuantityAsked>

        <Unit>ST</Unit>

        <UnitPrice>279,30</UnitPrice>

        <LineTotal>279,3000</LineTotal>

        <SupplierProductId>440303005</SupplierProductId>

      </OrderItem>

      <OrderItem>

        <ProductId>1610179</ProductId>

        <DescriptionNl>SCHROEF VOOR HYDROBLOK L REMEHA</DescriptionNl>

        <DescriptionFr>SCHROEF VOOR HYDROBLOK L REMEHA</DescriptionFr>

        <QuantityAsked>10,000</QuantityAsked>

        <Unit>ST</Unit>

        <UnitPrice>3,04</UnitPrice>

        <LineTotal>30,4000</LineTotal>

        <SupplierProductId>440303005</SupplierProductId>

      </OrderItem>     

    </Order>

    <DeliveryAddress>

       <Name>naam adres</Name>

       <Street>straatnaam</Street>

       <Number>nummer</Number>

       <ZipCode>2650</ZipCode>

       <Location>Gemeente</Location>

       <CountryIsoCode>NL</CountryIsoCode>

    </DeliveryAddress>

    <OnSiteContact>Naam Contactpersoon, BE +32 3 456 78 90</OnSiteContact>

  </Request>

</DescoXml>

Example of a valid order placement, with a warning message

<?xml version="1.0" encoding="UTF-8" ?>

<DescoXml version="1.0">

    <Response>

        <Status code="0">

          Warning: The WantedDeliveryDate is unexpected. Please contact your Desco contact.

        </Status>

        <OrderId>54263</OrderId>

    </Response>

</DescoXml>

 

Example of a failed order placement

<?xml version="1.0" encoding="UTF-8" ?>

<DescoXml version="1.0">

    <Response>

        <Status code="9">unexpected error: Unknown Location</Status>

    </Response>

</DescoXml>

  • WantedDeliveryDate is required and must be in form yyyy-mm-dd
  • ShippingCondition is required and must be 10, 20 or 30
    • 10 = direct leveren
    • 20 = order op afroep
    • 30 = leveringsdatum is vermoedelijk
  • OrderReference has a maxlength of 32
  • Remark can be used for additional information or remarks for the Order processor.
  • Order must have at least one OrderItem.
  • QuantityAsked must obey then minimal quantity requirement of a product. The minimal quantity requirement is from now on available in the PVCheck.
  • UNIT is required. 
  • Unit price is required.
  • Totalprice is required.
  • ZipCode is required, Location is not.
    It is allowed to concatenate ZipCode and Location seperated with a “ “ (space) into the ZipCode field.
  • CountryIsoCode must be BE, LU or NL
  • OnSiteContact: name & phone number of a contact on site. Must be in the format <naam> - <tel landcode><telefoonnummer> (eg "werfleider fase 1 - BE +32 3 456 78 90")