| POST,OPTIONS | /v1/dashboard/dispatch |
|---|
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
open class DispatchReportRequest
{
open var FromDate:Date? = null
open var ToDate:Date? = null
open var LocationIds:ArrayList<UUID> = ArrayList<UUID>()
}
open class DispatchReportResponse
{
open var Stats:ArrayList<DashboardStatTile> = ArrayList<DashboardStatTile>()
open var Unit:String? = null
open var Trend:ArrayList<DispatchReportDayRow> = ArrayList<DispatchReportDayRow>()
open var ByModule:ArrayList<DispatchReportModuleRow> = ArrayList<DispatchReportModuleRow>()
open var ByLane:ArrayList<DispatchReportLaneRow> = ArrayList<DispatchReportLaneRow>()
open var ByTruck:ArrayList<DispatchReportTruckRow> = ArrayList<DispatchReportTruckRow>()
open var ByDriver:ArrayList<DispatchReportDriverRow> = ArrayList<DispatchReportDriverRow>()
open var Jobs:ArrayList<DispatchReportJobRow> = ArrayList<DispatchReportJobRow>()
open var Incidents:ArrayList<DispatchReportIncidentRow> = ArrayList<DispatchReportIncidentRow>()
open var Holds:ArrayList<DispatchReportHoldRow> = ArrayList<DispatchReportHoldRow>()
open var ResponseStatus:ResponseStatus? = null
}
open class DashboardStatTile
{
open var Key:String? = null
open var Label:String? = null
open var Value:Double? = null
open var PreviousValue:Double? = null
open var Unit:String? = null
open var DeltaPct:Double? = null
}
open class DispatchReportDayRow
{
open var Label:String? = null
open var Loads:Int? = null
open var Revenue:Double? = null
open var Pay:Double? = null
open var Qty:Double? = null
open var AvgCycleMins:Double? = null
}
open class DispatchReportModuleRow
{
open var Module:String? = null
open var Loads:Int? = null
open var Qty:Double? = null
open var Revenue:Double? = null
open var Pay:Double? = null
}
open class DispatchReportLaneRow
{
open var SupplierName:String? = null
open var SourceLabel:String? = null
open var Loads:Int? = null
open var Qty:Double? = null
open var Revenue:Double? = null
open var AvgCycleMins:Double? = null
}
open class DispatchReportTruckRow
{
open var TruckLabel:String? = null
open var DriverLabel:String? = null
open var Loads:Int? = null
open var Qty:Double? = null
open var Revenue:Double? = null
open var Pay:Double? = null
open var AvgCycleMins:Double? = null
open var DaysActive:Int? = null
}
open class DispatchReportDriverRow
{
open var Driver:String? = null
open var DriverContactId:Int? = null
open var Loads:Int? = null
open var Qty:Double? = null
open var Pay:Double? = null
open var DaysActive:Int? = null
open var Unpriced:Int? = null
}
open class DispatchReportJobRow
{
open var JobCode:String? = null
open var Customer:String? = null
open var Cargo:String? = null
open var Route:String? = null
open var Miles:Int? = null
open var Revenue:Double? = null
open var Pay:Double? = null
open var MarginPct:Double? = null
open var ClosedUtc:Date? = null
}
open class DispatchReportIncidentRow
{
open var Kind:String? = null
open var Opened:Int? = null
open var Resolved:Int? = null
open var AvgResolveMins:Double? = null
}
open class DispatchReportHoldRow
{
open var ScopeKind:String? = null
open var Holds:Int? = null
open var PausedMins:Int? = null
open var Weather:Int? = null
open var FromIncidents:Int? = null
}
Kotlin DispatchReportRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/dashboard/dispatch HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
FromDate: 0001-01-01,
ToDate: 0001-01-01,
LocationIds:
[
00000000000000000000000000000000
]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Stats:
[
{
Key: String,
Label: String,
Value: 0,
PreviousValue: 0,
Unit: String
}
],
Unit: String,
Trend:
[
{
Label: String,
Loads: 0,
Revenue: 0,
Pay: 0,
Qty: 0,
AvgCycleMins: 0
}
],
ByModule:
[
{
Module: String,
Loads: 0,
Qty: 0,
Revenue: 0,
Pay: 0
}
],
ByLane:
[
{
SupplierName: String,
SourceLabel: String,
Loads: 0,
Qty: 0,
Revenue: 0,
AvgCycleMins: 0
}
],
ByTruck:
[
{
TruckLabel: String,
DriverLabel: String,
Loads: 0,
Qty: 0,
Revenue: 0,
Pay: 0,
AvgCycleMins: 0,
DaysActive: 0
}
],
ByDriver:
[
{
Driver: String,
DriverContactId: 0,
Loads: 0,
Qty: 0,
Pay: 0,
DaysActive: 0,
Unpriced: 0
}
],
Jobs:
[
{
JobCode: String,
Customer: String,
Cargo: String,
Route: String,
Miles: 0,
Revenue: 0,
Pay: 0,
MarginPct: 0,
ClosedUtc: 0001-01-01
}
],
Incidents:
[
{
Kind: String,
Opened: 0,
Resolved: 0,
AvgResolveMins: 0
}
],
Holds:
[
{
ScopeKind: String,
Holds: 0,
PausedMins: 0,
Weather: 0,
FromIncidents: 0
}
],
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}