Send new DISTRIBUTION order

CALL

This API offers the ability to send a new distribution order to us.

URL https://api.asx.be/DISTRI/
METHOD POST
REQUEST / INPUT

Below is the structure used as input, including an illustrative example and more information for each field.
You may choose whether to send the data to us via JSON or XML

Level/Field Mandatory Example Description
1 verwerking * CREATE A new job will be created once all the checks have been done
1 gebruiker * info@ontime.be Email address on which the API account was defined.
Max 250 characters
1 klantnr * K01234 This is the DISTRI customer number at ON TIMELogistics.
Numeric, preceding with a 'K'
1 apipswd * c40b0c360f3d4959b53b103b25759542 Password of the API account
1 omgeving * TEST TEST = TEST environment
LIVE = LIVE environment
1 verzender
  2 contact * Ann Flecyn Name of the person creating the order
Max 250 characters
  2 email * info@ontime.be Email address of the person creating the order
Max 250 characters
  2 referentie * dit is een test General reference that will be mentioned on the invoice
Max 30 characters
  2 tel * 0123546789 Phone number of the person creating the order WITHOUT characters
1 webhook This option is only needed if you wish to receive tracking automatically as soon as there is a status change.
For more information on this, visit the webhook documentation
  2 functie URL Possible values: FTP or URL
If you choose FTP, the FTP connection must be set up by our administrators
  2 url https://www.urlnaaruwscript only necessary if FUNCTIE = URL
  2 methode POST if FUNCTIE = URL => select POST or GET
if FUNCTIE = XML => select XML or JSON
  2 email your@email.be not mandatory, but if no connection can be made with your webhook function AND this email address is set, we will send you an email with status information
1 opdracht
  2 rembours_bedrag   123.45 Cash on delivery (if necessary)
  2 rembours_munt   EUR Rebours currency.
If you wish to retrieve the currencies specific to your customer number, use the currencies API : Click here.
  2 neutraal * 0

Indien het gaat over een neutrale levering, gebruik '1' EN vul het neutraal adres in. Anders '0'

1 ophalen
  2 datum   2025-02-05 Date that this command should be RETRIEVED
Format YYYY-MM-DD
If you do not enter this date, this order will be executed as soon as possible
  2 bedrijf * Ontime Logistics Company name
Max 250 characters
  2 contact * Jean-Claude Van Den Berghe Name of contact person within this company
Max 250 characters
  2 straat * Kattendijkdok Street name
Max 250 characters
  2 huisnr * 5A House number + bus number
  2 adres2     Possible second address line
Max 250 characters
  2 postcode * 2000 Max 4 characters
  2 gemeente * Antwerpen Max 250 characters
  2 tel * 0471334455 Telephone number WITHOUT characters
  2 land BE If not filled in = BE
If you wish to retrieve the countries specific to your customer number, use the countries API : Click here.
  2 info_chauffeur   Here you can provide additional info for the driver
  2 uren
  3 maandag   09:00-12:00-13:00-17:00 Please fill in the opening hours of this pick-up address on MONDAY:
From morning - to morning - from afternoon - to afternoon
Format : hh:mm-hh:mm-hh:mm-hh:mm
If you do not enter this, the default will be taken :09:00-12:00-13:00-17:00
  3 dinsdag   09:00-12:00-13:00-17:00 Fill in the opening hours of this pick-up address on TUESDAY
  3 woensdag   09:00-12:00-13:00-17:00 Please fill in the opening hours of this pick-up address on WEDNESDAY
  3 donderdag   09:00-12:00-13:00-17:00 Please fill in the opening hours of this pick-up address on THURSDAY
  3 vrijdag   09:00-12:00-13:00-17:00 Please fill in the opening hours of this pick-up address on FRIDAY
  3 zaterdag   09:00-12:00-13:00-17:00 Please fill in the opening hours of this pick-up address on SATURDAY
  2 confirm_load ann@test.be; jan@test.com If you require confirmation for collection before the order is executed,
Enter the e-mail address where the confirmation request should be sent to
The order will be executed only IF confirmed.
Multiple emails possible, separated by ;
1 leveren
  2 datum   2025-02-05 Date that this order must be DELIVERED
Format YYYY-MM-DD
If you do not enter this date, this order will be executed as soon as possible
  2 bedrijf * Ontime Logistics Company name
Max 250 characters
  2 contact * Jean-Claude Van Den Berghe Name of contact person within this company
Max 250 characters
  2 straat * Kattendijkdok Street name
Max 250 characters
  2 huisnr * 5A House number + bus number
  2 adres2     Possible second address line
Max 250 characters
  2 postcode * 2000 Max 4 characters
  2 gemeente * Antwerpen Max 250 characters
  2 tel * 0471334455 Telephone number WITHOUT characters
  2 land BE If not filled in = BE
If you wish to retrieve the countries specific to your customer number, use the countries API : Click here.
  2 info_chauffeur   Here you can provide additional info for the driver
  2 track_email   If you enter a valid email address here, this email address will be used to send the necessary 'updates' to
  2 uren
  3 maandag   09:00-12:00-13:00-17:00 Enter the opening hours of this delivery address on MONDAY:
From morning - to morning - from afternoon - to afternoon
Format : hh:mm-hh:mm-hh:mm-hh:mm
If you do not enter this, the default will be taken :09:00-12:00-13:00-17:00
  3 dinsdag   09:00-12:00-13:00-17:00 Enter the opening hours of this delivery address on TUESDAY
  3 woensdag   09:00-12:00-13:00-17:00 Enter the opening hours of this delivery address on WEDNESDAY
  3 donderdag   09:00-12:00-13:00-17:00 Enter the opening hours of this delivery address on THURSDAY
  3 vrijdag   09:00-12:00-13:00-17:00 Enter the opening hours of this delivery address on FRIDAY
  3 zaterdag   09:00-12:00-13:00-17:00 Enter the opening hours of this delivery address on SATURDAY
1 neutraal Mandatory if command->neutral = 1
  2 bedrijf     Company name
Max 250 characters
  2 contact     Name of contact person within this company
Max 250 characters
  2 straat     Street name
Max 250 characters
  2 huisnr   House number + bus number
  2 adres2     Possible second address line
Max 250 characters
  2 postcode     Max 4 characters
  2 gemeente     Max 250 characters
  2 tel     Telephone number WITHOUT characters
  2 land   If not filled in = BE
If you wish to retrieve the countries specific to your customer number, use the countries API : Click here.
1 goederen
  2 goed
  3 product * COLLI 30-60kg - 0.4 - 0 - 60 Use here the 'description' of the product as known in distribution.
If you wish to retrieve the products specific to your customer number, use the products API : Click here.
  3 aantal * 3 Aantal documenten/colli's die moeten verwerkt worden voor deze opdracht
Numeric field
  3 volume   0.4 If 'volume_adjust' is set to 1 via the products API, you can enter the volume here.
If you do not specify anything, the 'default' values will be used

For packages and length goods: length x width x height in metres.
For pallet goods: fill in per pallet space occupied (1m³ = 1 euro-pallet space with ground area 1.20m x 0.80m).
  3 gewicht   60 If 'weight_adjust' is set to 1 via the products API, you can enter the weight here.
If you do not specify anything, the 'default' values will be used

  3 lengte   5 If 'length_adjust' is set to 1 via the products API, you can enter the length here.
If you do not specify anything, the 'default' values will be used

For goods longer than 1.5 metres: always enter length in metres.
This is how we plan your shipment on the customised vehicle.
  3 barcode   ABCDEF123456001|ABCDEF123456002|ABCDEF123456003 Optionally, you can include your own barcodes.
If you wish, there should be as many barcodes here as the number you enter at product
The barcodes are distinguished by a '|'
With our example here, that should be 3 barcodes.
If you do not provide barcodes, we will create our own barcodes.

JSON example with 1 product

                                    
                                      
JSON example with 2 products

                                    
                                      

XML example with 1 good
<?xml version="1.0" encoding="utf-8"?>
<WebOrder> 
    <verwerking>CREATE</verwerking>
    <gebruiker>info@ontime.be</gebruiker>
    <klantnr>K01234</klantnr>
    <apipswd>c40b0c360f3d4959b53b103b25759542</apipswd>
    <omgeving>TEST</omgeving>
    <verzender>
        <contact>Jean-Claude Van Den Berghe</contact>
        <email>info@ontime.be</email>
        <referentie>dit is een test</referentie>
        <tel>123456798</tel>
    </verzender>
    <opdracht>
        <rembours_bedrag></rembours_bedrag>
        <rembours_munt></rembours_munt>
        <neutraal>0</neutraal>
    </opdracht>
    <ophalen>
        <datum>2020-01-07</datum>
        <bedrijf>Ontime Logistics</bedrijf>
        <contact>Jean-Claude Van Den Berghe</contact>
        <tel>963214785</tel>
        <straat>Kattendijkdok</straat>
        <huisnr>5A</huisnr>
        <adres2></adres2>
        <postcode>2000</postcode>
        <gemeente>Antwerpen</gemeente>
        <land>BE</land>
        <info_chauffeur>opgepast voor de hond</info_chauffeur>
        <uren>
            <maandag>09:00-12:00-13:00-17:00</maandag>
            <dinsdag>09:00-12:00-13:00-17:00</dinsdag>
            <woensdag>09:00-12:00-00:00-00:00</woensdag>
            <donderdag>09:00-12:00-13:00-17:00</donderdag>
            <vrijdag>09:00-12:00-13:00-17:00</vrijdag>
            <zaterdag>00:00-00:00-00:00-00:00</zaterdag>
        </uren>
    </ophalen>
    <leveren>
        <datum>2020-01-07</datum>
        <bedrijf>Ontime Logistics</bedrijf>
        <contact>Jean-Claude Van Den Berghe</contact>
        <tel>963214785</tel>
        <straat>Kattendijkdok</straat>
        <huisnr>5A</huisnr>
        <adres2></adres2>
        <postcode>2000</postcode>
        <gemeente>Antwerpen</gemeente>
        <land>BE</land>
        <info_chauffeur>opgepast voor de hond</info_chauffeur>
        <track_email>naam@bedrijf.com</track_email>
        <uren>
            <maandag>09:00-12:00-13:00-17:00</maandag>
            <dinsdag>09:00-12:00-13:00-17:00</dinsdag>
            <woensdag>09:00-12:00-00:00-00:00</woensdag>
            <donderdag>09:00-12:00-13:00-17:00</donderdag>
            <vrijdag>09:00-12:00-13:00-17:00</vrijdag>
            <zaterdag>00:00-00:00-00:00-00:00</zaterdag>
        </uren>
    </leveren>
    <neutraal>
        <bedrijf>Ontime Logistics</bedrijf>
        <contact>Jean-Claude Van Den Berghe</contact>
        <tel>963214785</tel>
        <straat>Kattendijkdok</straat>
        <huisnr>5A</huisnr>
        <adres2></adres2>
        <postcode>2000</postcode>
        <gemeente>Antwerpen</gemeente>
        <land>BE</land>
    </neutraal>
    <goederen>
        <goed>
            <product>COLLI 30-60kg - 0.4 - 0 - 60</product>
            <aantal>7</aantal>
            <volume>50</volume>
            <gewicht>5</gewicht>
            <lengte>5</lengte>
        </goed>
    </goederen>
</WebOrder>
XML example with 2 goods
<?xml version="1.0" encoding="utf-8"?>
<WebOrder> 
    <verwerking>CREATE</verwerking>
    <gebruiker>info@ontime.be</gebruiker>
    <klantnr>K01234</klantnr>
    <apipswd>c40b0c360f3d4959b53b103b25759542</apipswd>
    <omgeving>TEST</omgeving>
    <verzender>
        <contact>Jean-Claude Van Den Berghe</contact>
        <email>info@ontime.be</email>
        <referentie>dit is een test</referentie>
        <tel>123456798</tel>
    </verzender>
    <opdracht>
        <rembours_bedrag></rembours_bedrag>
        <rembours_munt></rembours_munt>
        <neutraal>0</neutraal>
    </opdracht>
    <ophalen>
        <datum>2020-01-07</datum>
        <bedrijf>Ontime Logistics</bedrijf>
        <contact>Jean-Claude Van Den Berghe</contact>
        <tel>963214785</tel>
        <straat>Kattendijkdok</straat>
        <huisnr>5A</huisnr>
        <adres2></adres2>
        <postcode>2000</postcode>
        <gemeente>Antwerpen</gemeente>
        <land>BE</land>
        <info_chauffeur>opgepast voor de hond</info_chauffeur>
        <uren>
            <maandag>09:00-12:00-13:00-17:00</maandag>
            <dinsdag>09:00-12:00-13:00-17:00</dinsdag>
            <woensdag>09:00-12:00-00:00-00:00</woensdag>
            <donderdag>09:00-12:00-13:00-17:00</donderdag>
            <vrijdag>09:00-12:00-13:00-17:00</vrijdag>
            <zaterdag>00:00-00:00-00:00-00:00</zaterdag>
        </uren>
    </ophalen>
    <leveren>
        <datum>2020-01-07</datum>
        <bedrijf>Ontime Logistics</bedrijf>
        <contact>Jean-Claude Van Den Berghe</contact>
        <tel>963214785</tel>
        <straat>Kattendijkdok</straat>
        <huisnr>5A</huisnr>
        <adres2></adres2>
        <postcode>2000</postcode>
        <gemeente>Antwerpen</gemeente>
        <land>BE</land>
        <info_chauffeur>opgepast voor de hond</info_chauffeur>
        <track_email>naam@bedrijf.com</track_email>
        <uren>
            <maandag>09:00-12:00-13:00-17:00</maandag>
            <dinsdag>09:00-12:00-13:00-17:00</dinsdag>
            <woensdag>09:00-12:00-00:00-00:00</woensdag>
            <donderdag>09:00-12:00-13:00-17:00</donderdag>
            <vrijdag>09:00-12:00-13:00-17:00</vrijdag>
            <zaterdag>00:00-00:00-00:00-00:00</zaterdag>
        </uren>
    </leveren>
    <neutraal>
        <bedrijf>Ontime Logistics</bedrijf>
        <contact>Jean-Claude Van Den Berghe</contact>
        <tel>963214785</tel>
        <straat>Kattendijkdok</straat>
        <huisnr>5A</huisnr>
        <adres2></adres2>
        <postcode>2000</postcode>
        <gemeente>Antwerpen</gemeente>
        <land>BE</land>
    </neutraal>
    <goederen>
        <goed>
            <product>COLLI 30-60kg - 0.4 - 0 - 60</product>
            <aantal>7</aantal>
            <volume>50</volume>
            <gewicht>5</gewicht>
            <lengte>5</lengte>
        </goed>
        <goed>
            <product>TEST</product>
            <aantal>3</aantal>
            <volume></volume>
            <gewicht></gewicht>
            <lengte></lengte>
            <barcode>ABCDEF123456001|ABCDEF123456002|ABCDEF123456003</barcode>
        </goed>
    </goederen>
</WebOrder>
RESPONSE / OUTPUT

Below is the structure used as output, including an illustrative example and more information for each field.
If you sent with JSON, you will receive JSON, idem with XML

Level/Field Example Description
1 status SUCCESS  
1 remarks
2 remark Er werd 1 opdracht aangemaakt Informative comments
1 opdrachten
2 opdracht
3 nummer xxxxxxx The order number
3 track https://track.asx.be/xxxxx Link to the online tracking page
3 tracknr DSTRAPIxxxxx The unique tracking number.
You can use this number in our online feature https://track.asx.be or in the tracking API
3 pdf https://portal.asx.be/pdf/bestelling/?bestel=DSTRAPIxxxxx Link to order form
3 label https://portal.asx.be/pdf/bestelling/?etiket=DSTRAPIxxxxx Link to the labels
Level/Field Example Description
1 status ERROR  
1 remarks
2 remark foutieve credentials List of errors found

JSON response at SUCCESS

                                    
                                      
JSON response to ERROR

                                    
                                      

XML response at SUCCESS
<?xml version="1.0" encoding="utf-8"?>
<WebAnswer> 
    <status>SUCCESS</status>
    <remarks>
        <remark>Er werd 1 opdracht aangemaakt</remark>
    </remarks>
    <opdrachten>
        <opdracht>
            <nummer>xxxxx</nummer>
            <track>https://track.asx.be/xxxxx</track>
            <tracknr>DSTRAPIxxxxx</tracknr>
            <pdf>https://portal.asx.be/pdf/bestelling/?bestel=DSTRAPIxxxxx</pdf>
            <label>https://portal.asx.be/pdf/bestelling/?etiket=DSTRAPIxxxxx</label>
        </instructie>
    </instructies>
</WebAnswer>
XML response to ERROR
<?xml version="1.0" encoding="utf-8"?>
<WebAnswer> 
    <status>ERROR</status>
    <remarks>
        <remark>datum kan niet in het verleden liggen</remark>
        <remark>bedrijf verplicht in te vullen</remark>
        <remark>aantal verplicht in te vullen</remark>
    </remarks>
</WebAnswer>
CONTROL/TEST

Through this function, you can try out any JSON or XML input.
ATTENTION : This function is ALWAYS performed in the TEST environment

Your INPUT string
The result/response: