fetchShipmentTrees

abstract suspend fun fetchShipmentTrees(pollScansEvery: Long? = POLLING_INTERVAL_MS, updatedAfter: String? = null, updatedBefore: String? = null): Result<ShipmentWithSharing>

Fetches the latest shipment hierarchy from the server.

Return

A Result containing the raw ShipmentWithSharing data on success.

Parameters

pollScansEvery

If provided, starts background polling for scans in 'processing' status.

updatedAfter

An ISO formatted date string for fetching shipments updated after a certain date (i.e. "2024-12-31T23:59:59").

updatedBefore

An ISO formatted date string for fetching shipments before after a certain date (i.e. "2024-12-31T23:59:59").