This is an old revision of the document!
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:
- MW Sales Invoice Sending: Sends selected sales invoices to the Billig API.
- Checks Sales Invoices not already processed: Uses Transaction field user_4. Puts a timestamp if already sent. err:err text if error.
- Validates Delivery Addresses: Checks the delivery address meets criteria. More info below
- Validates Country 2 Char representation: Billig API uses 2 Char country digits for addresses. Uses JSON file to verify.
- TODO: Add more feature text
BILLIG API Information:
- Sales Header endpoint: “http://bc.billig-arbejdstoj.dk:18648/BC18_WS/ODataV4/Company('Airtox')/WS_3PL_Sales_Header”
- Sales Line endpoint: “http://bc.billig-arbejdstoj.dk:18648/BC18_WS/ODataV4/Company('Airtox')/WS_3PL_Sales_Line”
- Sales Header Duplicated endpoint: “http://bc.billig-arbejdstoj.dk:18648/BC18_WS/ODataV4/Company('Airtox')/WS_3PL_Sales_Shipment_Lines?%24filter=Order_No%20eq%20”
The API is what can be deduced as a Microsoft Dynamics 365 API. The API is very basic and not very ideal. It has been rock solid for 3 years despite its shortcomings.
Entry point:
main.rs calls `start_server` which runs the main service loop.
