Table of Contents

Billig Shipping Script

The Billig shipping script, named 'Export_Billig' in the Airtox File, is for sending shipping orders to Billig (BA) for processing.
It runs as a MW script and uses CURL to send shipping orders over tcp/http. It is triggered by selecting Sales Invoices and pressing the “Export Billig” button.

Technical documentation

Key features:

Missing features:

BILLIG API Information:

API is locked down by IPs. The available IPs are Martin's Office IP, Airtox's Server IP, and possibly TMF and/or Sussol IPs.
API looks like it is maintained by prentow.com (Contacts not added here as public page)

Test Site Enpoints

Live Site Enpoints

Auth info is hard coded in script. Test Auth info is commented out.

The API is what can be deduced as a Microsoft Dynamics 365 API. The API is very basic and not very ideal, but it has been rock solid for 3 years despite its shortcomings. Some of those short commings are:

How API Works

Sales Header Fields (text from script)

Document_No = “AI” + transaction.OurRef
External_Docuement_No = “Inv-” + Transaction.OurRef + “/Ord-” + Transaction.TheirRef
shippingCodeLines = See below how shippingCodeLines are calculated

let pdata = "{\n  "
let pdata = pdata + "\"Document_Type\": \"Ordre\",\n  "
let pdata = pdata + "\"Document_No\": \"" + docNumber + "\",\n  "
let pdata = pdata + "\"Customer_No\": \"" + billigCompanyNoPROP + "\",\n  "
let pdata = pdata + "\"Shipment_Date\": \"" + shipDate + "\",\n  "
let pdata = pdata + "\"Ship_to_Name\": \"" + shipToName + "\",\n  "
let pdata = pdata + "\"Ship_to_Address\": \"" + addr1 + "\",\n  "
let pdata = pdata + "\"Ship_to_Address_2\" : \"" + addr2 + "\",\n  "
let pdata = pdata + "\"Ship_to_City\": \"" + shipToCity + "\",\n  "
let pdata = pdata + "\"Ship_to_Post_Code\": \"" + shipToPostcode + "\",\n  "
let pdata = pdata + "\"Ship_to_Country_Region_Code\": \"" + shipToCountry + "\",\n  "
let pdata = pdata + shippingCodeLines
let pdata = pdata + "\"External_Document_No\": \""+ extDocNumber +"\""
let pdata = pdata + "\n}

Sales Line Fields (text from script)

Document_No = “AI” + transaction.OurRef
Line_No = sequential integer number. 1, 2, 3, etc…

let pdata = "{\n  "
let pdata = pdata + "\"Document_Type\": \"Ordre\",\n  "
let pdata = pdata + "\"Document_No\": \"" + docNumber + "\",\n"
let pdata = pdata + "\"Line_No\": \"" + lineNum  + "\",\n"
let pdata = pdata + "\"Type\": \"Vare\",\n"
let pdata = pdata + "\"Item_No\": \"" + itemCode + "\",\n"
let pdata = pdata + "\"Quantity\" : "  + quantity 
let pdata = pdata + "\n}"

Shipping Code Lines

A few shipping codes are sent in the Sales Header. It consists of 2 fields.

The logic depends (as of today, 17th Feb 2026):

Entry point:

on Before:F_TRANSLIST(windowRef)
  InstallToolBarIcon(windowRef, "Export_Billig")
end

Script Logic and Steps