DG Vault Integration note

Base Engineering API

What DG Vault can take from the Free Gas truck registers

Two of the eleven endpoints carry what DG Vault needs. The delivery ticket endpoint gives the volume off-loaded, the liquid temperature and the ticket number for every delivery. The truck load endpoint gives the starting load and its temperature when the truck is filled at the depot.

Prepared for Chris Wells By Kalyan Pavan, CTS 8 October 2026 Source: Base Engineering API document, 11 endpoints, read in full

/api/tickets

One record per delivery, written by the truck's register. Volume off-loaded, gross and corrected to 15 C, liquid temperature, ticket number, customer and tank, time and position.

High confidence Every one of the 10 samples carries these fields

/api/truckloads

One record per fill at the depot. Starting load, inventory after loading, temperature in Celsius and Fahrenheit, load document number.

Medium confidence One sample only, and it is a test entry

What it means for a Free Gas driver. At each stop the litres, the temperature and the invoice number would be read from the register instead of typed. The driver checks them and confirms. Signing, the PRV reading and the location stay as they are.

Four things need an answer before this is built: which field Free Gas treats as the invoice number, whether the temperature is in Celsius, how DG Vault authenticates to the API, and whether current tickets are available. Every sample in the document is from 25 November 2020. Section 4 lists them.

01

Delivery tickets

One ticket per delivery, written when the driver finishes pumping. This is the endpoint that replaces what the driver types at each stop.

GEThttps://dev-api-3.baseng-app.com/api/tickets

What a ticket looks like

Ticket 3 from the document, trimmed to the fields that matter. Truck 20-15 delivered 810.7 litres of propane to customer DEVIND's tank on 25 November 2020. The three highlighted lines are the ones the driver types today.

{
  "Ticket_nb": 3,
  "Ticket_GUID": "20152c0807c4fea34d09837c9ee43f6b4b58",
  "Ticket_dt": "2020-11-25T11:48:05",
  "Truck_Code": 2015,
  "Customer_Code": "DEVIND",
  "Ticket_Status_Code": "Verified",
  "Purchase_Order": null,
  "Latitude": 43.05709,
  "Longitude": -79.25533,
  "Ticket_Items": [
    {
      "Asset_Code": "DEVIND__1",
      "FuelType_Code": "PROPANE",
      "NetQuantity_nb": 810.7,
      "GrossQuantity_nb": 790.8,
      "Product_Temperature_nb": 6,
      "PercentFull_Start_nb": 40,
      "PercentFull_End_nb": 99,
      "Delivery_Start_dt": "2020-11-25T11:48:21",
      "Delivery_End_dt": "2020-11-25T11:55:09",
      "TotalizerGross_nb": 160395.6,
      "TotalizerNet_nb": 162354.4,
      "Sale_nb": 139,
      "Completed_yn": "Y"
    }
  ]
}

Prices, taxes and payment fields are left out. DG Vault would not take them.

The fields DG Vault would use

DG Vault fieldAPI fieldTicket 3Note
Volume off-loaded, correctedNetQuantity_nb810.7 LCorrected to 15 C by the register. Equals Quantity_nb, the billed amount.
Volume off-loaded, as meteredGrossQuantity_nb790.8 LWhat the meter counted at the delivery temperature.
Liquid temperatureProduct_Temperature_nb6Almost certainly Celsius. Question 2.
Invoice numberTicket_nb or Sale_nb3 or 139Neither is labelled invoice. Question 1.
Which recordTruck_Code + Ticket_dt2015, 11:48Truck 2015 is 20-15 in the truck list.
Which customer tankCustomer_Code, Asset_CodeDEVIND, DEVIND__1Could later match the PRV account.
WhereLatitude, Longitude43.05709, -79.25533Same purpose as the position DG Vault records now.
Tank level before and afterPercentFull_Start_nb, PercentFull_End_nb40%, 99%Not captured in DG Vault today. Useful on the record.
Nothing missedTotalizerGross_nb160,395.6Running meter total. The step from the previous ticket is exactly 790.8, the gross volume.
Duplicate guardTicket_GUID20152c08...Unique per ticket. Stops a delivery being imported twice.
What the 10 sample tickets show. All are from truck 20-15 on 25 November 2020, all Verified and Completed. Volumes run from 98.8 L to 810.7 L; temperatures are 4, 6 and 7. Ticket 2 has a volume of 0 (an aborted delivery), so zero-litre tickets must be skipped. Tickets 7 to 11 are to FREEGA, which looks like Free Gas's own yard.
02

Truck loads

One record each time a truck is filled at the depot. It could set the starting load and starting temperature on a DG Vault record, which the driver types today when the record is created.

GEThttps://dev-api-3.baseng-app.com/api/truckloads

The one sample in the document

A test entry: no truck code, a position of 0,0, 1 litre loaded, and a different company (W.O. Stinson and Son, Ottawa) as the consignor on the bill of lading. The fields are right; the values are not real.

{
  "Truck_load_nb": "9100000003",
  "Truck_Load_GUID": "915ff4ce3f-db2c-4258-a880-57b2deaa5cf6",
  "Event_dt": "2025-09-09T09:20:22",
  "Truck_Code": null,
  "FuelType_Code": "PROPANE",
  "AddOrSet": "SET",
  "Load_Quantity_nb": 1,
  "Gross_Load_Quantity_nb": 1,
  "Prev_Quantity_nb": 18,
  "Inventory_nb": 19,
  "Gross_Inventory_nb": 19,
  "PercentFull_nb": 0.27,
  "TemperatureC_nb": 0,
  "TemperatureF_nb": 32,
  "Truck_load_txt": "Bill of Lading ... Load Document #9100000003 ... Compartment 1,
                    Quantity: 19.0 Litre, Capacity: 7000.0 Litre ...
                    4 x Flammable UN1075 Class 2 Placards Required"
}

The fields DG Vault would use

DG Vault fieldAPI fieldNote
Starting loadInventory_nbLitres on board after loading, corrected. Gross_Inventory_nb is the metered figure.
Litres added this fillLoad_Quantity_nbAddOrSet says whether the entry adds to the previous quantity or sets the total.
Starting liquid temperatureTemperatureC_nbLabelled Celsius here, with the Fahrenheit value beside it.
Which recordTruck_Code + Event_dtNull in the sample, so this needs a real entry to confirm.
Load document numberTruck_load_nbPrinted on the bill of lading as Load Document #.
Duplicate guardTruck_Load_GUIDUnique per load.
Worth noting. The bill of lading text already carries the TDG declaration and a placarding line (4 x Flammable UN1075). DG Vault produces both itself, so nothing is taken from the text. The record would use the numbers only.
Why medium confidence. One sample, and not a real one. Before relying on this endpoint we need a real Free Gas load with a truck code and a position, and to confirm Inventory_nb is the figure the driver would otherwise type as the starting load.
03

How it would work in DG Vault

The driver's Record Delivery screen would open with the litres, the temperature and the ticket number already filled in from the register. The driver checks them, adds whatever the company's template rules still require, and confirms.

DG Vault reads each delivery from the register and the driver confirms it Truck registerwrites a ticket DG Vault readsnew tickets Open recordfor that truck? Off-load written:litres, temp, ticket Held for the officeto match Driver confirmson the phone yes no
A ticket is matched to the record by truck and time: the DG Vault record open for that truck when the ticket was written. The Ticket_GUID is kept on the off-load, so a ticket read twice is written once. A ticket with no open record is held for the office rather than guessed at.

What changes for the driver

TodayWith the API
Types the litres off the meterReads them from the ticket, confirms
Types the liquid temperatureReads it from the ticket, confirms
Types the invoice numberReads it from the ticket, confirms
Types the starting load and temperature when the record is createdCould come from the truck load (section 02)
Signs, records PRV, allows locationUnchanged
What DG Vault checks before writing. The ticket is Verified and Completed, the volume is above zero, the truck matches the record's unit, the ticket time falls inside the record's open period, and the GUID has not been seen. Anything that fails is held, not written.
What is not in this proposal. DG Vault does not write anything back to Base Engineering, does not take prices, taxes or amounts, and does not replace the driver's confirmation. The off-load is still the driver's record.
04

To confirm before building

Six questions, in the order they block the work. The first three are for Free Gas, the rest for Base Engineering.

1
Which field is the invoice number: Ticket_nb (2, 3, 4), Sale_nb (138, 139) or something else?Purchase_Order is empty on every sample. Ticket_nb restarts per truck, so it is only unique with the truck. Compare one real delivery ticket against its API record and the answer is clear.
Free Gas
2
Is Product_Temperature_nb in Celsius?Values of 4, 6 and 7 in late November, with the corrected volume above the metered volume, say yes. The load record labels C and F separately, so the ticket should be confirmed.
Free Gas
3
Which volume should the DG Vault balance use: corrected (NetQuantity_nb) or metered (GrossQuantity_nb)?Today the balance is whatever the driver reads off the meter. The off-load can carry both; the balance needs one.
Free Gas, Chris
4
How does DG Vault authenticate, and which server?The document shows dev-api-3, but the company record points at the database bs2_freegas_live. Nothing in the document says how requests are authenticated. Reading live data through a development host needs their approval.
Base Engineering
5
Are current tickets available?All 10 samples are from 25 November 2020, all truck 20-15, and the GPS query for September 2026 returned nothing. The fields must be checked on tickets from the trucks running today.
Base Engineering
6
Does /api/tickets accept the same filter as /api/truckgps (by Event_dt)?DG Vault would check for new tickets on a schedule. Without a filter it reads every ticket every time.
Base Engineering
Two things to be ready for. There is no push from Base Engineering, so DG Vault checks on a schedule and a ticket appears on the phone a few minutes after the delivery, not instantly. And the register knows the customer by its own code (DEVIND, ARTER1), which DG Vault does not hold today; linking it to the PRV account is a later step, not part of this one.
05

The other nine endpoints

None carries a delivery figure. Three are useful alongside the two above; the rest are set-up and lookups.

EndpointWhat it returnsFor DG Vault
/api/trucks
/api/trucklist
The fleet: Truck_Code and Truck_Name (2015 is 20-15), 8 trucks. The two return the same list.Maps the ticket's truck code to the unit number on a DG Vault record.
/api/truckcompartmentsTank capacity per truck (9,500 to 13,245 L) and an inventory figure.Capacity is useful for the truck picture. The inventory is minus several million litres on most trucks and cannot be used.
/api/truckgpsThe truck's position every minute, with a filter by time.Not needed: DG Vault records the position at each delivery itself. It does show that the API filters by date, which the ticket feed needs.
/api/fueltypesOne fuel type: Propane, in litres.Confirms the unit.
/api/companies
/api/defaultdb
/api/databases
The company and database the API serves: freeGas_dgvault_test on bs2_freegas_live.Set-up only. Note the live database behind a test name (question 4).
/api/deliveryroutesEmpty in the sample.Nothing to use.