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.
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.
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 field | API field | Ticket 3 | Note |
|---|---|---|---|
| Volume off-loaded, corrected | NetQuantity_nb | 810.7 L | Corrected to 15 C by the register. Equals Quantity_nb, the billed amount. |
| Volume off-loaded, as metered | GrossQuantity_nb | 790.8 L | What the meter counted at the delivery temperature. |
| Liquid temperature | Product_Temperature_nb | 6 | Almost certainly Celsius. Question 2. |
| Invoice number | Ticket_nb or Sale_nb | 3 or 139 | Neither is labelled invoice. Question 1. |
| Which record | Truck_Code + Ticket_dt | 2015, 11:48 | Truck 2015 is 20-15 in the truck list. |
| Which customer tank | Customer_Code, Asset_Code | DEVIND, DEVIND__1 | Could later match the PRV account. |
| Where | Latitude, Longitude | 43.05709, -79.25533 | Same purpose as the position DG Vault records now. |
| Tank level before and after | PercentFull_Start_nb, PercentFull_End_nb | 40%, 99% | Not captured in DG Vault today. Useful on the record. |
| Nothing missed | TotalizerGross_nb | 160,395.6 | Running meter total. The step from the previous ticket is exactly 790.8, the gross volume. |
| Duplicate guard | Ticket_GUID | 20152c08... | Unique per ticket. Stops a delivery being imported twice. |
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.
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 field | API field | Note |
|---|---|---|
| Starting load | Inventory_nb | Litres on board after loading, corrected. Gross_Inventory_nb is the metered figure. |
| Litres added this fill | Load_Quantity_nb | AddOrSet says whether the entry adds to the previous quantity or sets the total. |
| Starting liquid temperature | TemperatureC_nb | Labelled Celsius here, with the Fahrenheit value beside it. |
| Which record | Truck_Code + Event_dt | Null in the sample, so this needs a real entry to confirm. |
| Load document number | Truck_load_nb | Printed on the bill of lading as Load Document #. |
| Duplicate guard | Truck_Load_GUID | Unique per load. |
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.
What changes for the driver
| Today | With the API |
|---|---|
| Types the litres off the meter | Reads them from the ticket, confirms |
| Types the liquid temperature | Reads it from the ticket, confirms |
| Types the invoice number | Reads it from the ticket, confirms |
| Types the starting load and temperature when the record is created | Could come from the truck load (section 02) |
| Signs, records PRV, allows location | Unchanged |
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.
The other nine endpoints
None carries a delivery figure. Three are useful alongside the two above; the rest are set-up and lookups.
| Endpoint | What it returns | For 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/truckcompartments | Tank 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/truckgps | The 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/fueltypes | One 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/deliveryroutes | Empty in the sample. | Nothing to use. |