Skip to main content

Tank Wagon Order Movement All Ep

POST 

/v1/tank_wagon/order_movement/all

Tank Wagon Order Movements

Returns tank wagon orders with their deliveries. Each record has the delivery lines, the BOLs those lines came from, and the driver, equipment, and turn that ran them. There is one record per order. Orders that share a turn_id were loaded and delivered on the same trip. An order appears once it is placed on a turn. It stays as the delivery is recorded.

Required Scopes (io.r)

Request​

Every filter you add narrows the results.

start_date: datetime | None = None
end_date: datetime | None = None
Limit results by delivery time, in UTC. If you send no dates and no order_numbers, po_numbers, or turn_ids, then start_date is set to 7 days ago. end_date stays open. Planned stops with a future ETA are included.


equipment_ids: list[str] | None = None
equipment_numbers: list[str] | None = None
The tractors or trailers that made the delivery. Use ids or unit numbers.


order_numbers: list[int] | None = None
po_numbers: list[str] | None = None
turn_ids: list[str] | None = None


page: int = 1
page_size: int = 100
The most you can request per page is 500. A larger page_size returns 422.


Response​

rows: list[OrderMovement]
One page of records, sorted by delivery time and then order id.

total: int
The number of orders that match your filters across all pages.

page: int, page_size: int
The values from your request.

OrderMovement​

order_number: str, order_id: str, po_number: str | None

created_date: datetime
When the order was created.

order_updated_date: datetime | None
When the order was last edited.

hauled_by_updated_date: datetime | None
When the order was last assigned to a turn, moved to another turn, or removed from one. It is null until the order is assigned.

movement_updated_date: datetime | None
When this order's movement data last changed. Any change to the shift updates it.

last_change_date: datetime | None
The latest of the four dates above.


destination_id: str | None, destination_name: str | None
The site that received the delivery.

market_id, market_name, sector_id, sector_name: str | None
The site's market and sector.

site_counterparty_id, site_counterparty_name: str | None
The site's customer.

freight_customer_id, freight_counterparty_name: str | None
The party billed for freight at the site.


driver_id, driver_name: str | None
turn_id: str | None, driver_schedule_id: str | None
The driver, the turn, and the shift that delivered the order.

equipment: list[{equipment_id, equipment_name, equipment_type}]
The tractor and trailer on the turn. equipment_type is tractor or trailer.


drops: list[{id, product_id, product_name, asset_id, asset_name, requested_volume, volume, date}]
One line per site tank the order fills. asset_id is the tank. asset_name is the product the tank holds. requested_volume is the planned amount. volume and date are the recorded delivery. Both are null until the delivery is recorded.

allocated_bols: list[{bol_id, bol_number, bol_date, net_volume, gross_volume, product_id, product_name, terminal_id, terminal_name, counterparty_id, counterparty_name, delivery_date, asset_id, asset_name}]
The terminal BOLs that supplied each delivery line. A line can draw from more than one BOL. A BOL can be from an earlier turn if fuel was left on the truck. net_volume is the net gallons charged to that BOL. gross_volume is the same amount at the BOL's gross-to-net ratio. counterparty_* is the BOL's supplier. This list is empty until the delivery is recorded. Fuel that no BOL explains is not listed.

freight_items: list
Reserved for future use. Always empty today.

Responses​

Successful Response

{
"rows": [
{
"order_number": "string",
"order_id": "string",
"po_number": "string",
"created_date": "2026-09-25T19:33:18.436Z",
"order_updated_date": "2026-09-25T19:33:18.436Z",
"hauled_by_updated_date": "2026-09-25T19:33:18.436Z",
"movement_updated_date": "2026-09-25T19:33:18.436Z",
"last_change_date": "2026-09-25T19:33:18.436Z",
"destination_id": "string",
"destination_name": "string",
"market_id": "string",
"market_name": "string",
"sector_id": "string",
"sector_name": "string",
"site_counterparty_name": "string",
"site_counterparty_id": "string",
"freight_customer_id": "string",
"freight_counterparty_name": "string",
"driver_name": "string",
"driver_id": "string",
"turn_id": "string",
"driver_schedule_id": "string",
"equipment": [
{
"equipment_id": "string",
"equipment_name": "string",
"equipment_type": "tractor"
}
],
"drops": [
{
"id": "string",
"product_id": "string",
"product_name": "string",
"asset_id": "string",
"asset_name": "string",
"requested_volume": 0,
"volume": 0,
"date": "2026-09-25T19:33:18.436Z"
}
],
"allocated_bols": [
{
"bol_id": "string",
"bol_number": "string",
"bol_date": "2026-09-25T19:33:18.436Z",
"net_volume": 0,
"gross_volume": 0,
"product_id": "string",
"product_name": "string",
"terminal_id": "string",
"terminal_name": "string",
"counterparty_id": "string",
"counterparty_name": "string",
"delivery_date": "2026-09-25T19:33:18.436Z",
"asset_id": "string",
"asset_name": "string"
}
],
"freight_items": [
{
"id": "string",
"rate": 0,
"quantity": 0,
"unit": "string",
"type": "Base Freight",
"sub_type": "string",
"product_group": "string",
"legs": [
{
"origin": "string",
"origin_id": "string",
"destination": "string",
"destination_id": "string",
"distance": 0
}
],
"manual": true,
"use_surcharge": true,
"total": 0
}
]
}
],
"total": 0,
"page": 0,
"page_size": 0
}
Loading...