| POST,OPTIONS | /v1/dashboard/dispatch |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class DispatchReportRequest
{
public Date FromDate = null;
public Date ToDate = null;
public ArrayList<UUID> LocationIds = new ArrayList<UUID>();
public Date getFromDate() { return FromDate; }
public DispatchReportRequest setFromDate(Date value) { this.FromDate = value; return this; }
public Date getToDate() { return ToDate; }
public DispatchReportRequest setToDate(Date value) { this.ToDate = value; return this; }
public ArrayList<UUID> getLocationIds() { return LocationIds; }
public DispatchReportRequest setLocationIds(ArrayList<UUID> value) { this.LocationIds = value; return this; }
}
public static class DispatchReportResponse
{
public ArrayList<DashboardStatTile> Stats = new ArrayList<DashboardStatTile>();
public String Unit = null;
public ArrayList<DispatchReportDayRow> Trend = new ArrayList<DispatchReportDayRow>();
public ArrayList<DispatchReportModuleRow> ByModule = new ArrayList<DispatchReportModuleRow>();
public ArrayList<DispatchReportLaneRow> ByLane = new ArrayList<DispatchReportLaneRow>();
public ArrayList<DispatchReportTruckRow> ByTruck = new ArrayList<DispatchReportTruckRow>();
public ArrayList<DispatchReportDriverRow> ByDriver = new ArrayList<DispatchReportDriverRow>();
public ArrayList<DispatchReportJobRow> Jobs = new ArrayList<DispatchReportJobRow>();
public ArrayList<DispatchReportIncidentRow> Incidents = new ArrayList<DispatchReportIncidentRow>();
public ArrayList<DispatchReportHoldRow> Holds = new ArrayList<DispatchReportHoldRow>();
public ResponseStatus ResponseStatus = null;
public ArrayList<DashboardStatTile> getStats() { return Stats; }
public DispatchReportResponse setStats(ArrayList<DashboardStatTile> value) { this.Stats = value; return this; }
public String getUnit() { return Unit; }
public DispatchReportResponse setUnit(String value) { this.Unit = value; return this; }
public ArrayList<DispatchReportDayRow> getTrend() { return Trend; }
public DispatchReportResponse setTrend(ArrayList<DispatchReportDayRow> value) { this.Trend = value; return this; }
public ArrayList<DispatchReportModuleRow> getByModule() { return ByModule; }
public DispatchReportResponse setByModule(ArrayList<DispatchReportModuleRow> value) { this.ByModule = value; return this; }
public ArrayList<DispatchReportLaneRow> getByLane() { return ByLane; }
public DispatchReportResponse setByLane(ArrayList<DispatchReportLaneRow> value) { this.ByLane = value; return this; }
public ArrayList<DispatchReportTruckRow> getByTruck() { return ByTruck; }
public DispatchReportResponse setByTruck(ArrayList<DispatchReportTruckRow> value) { this.ByTruck = value; return this; }
public ArrayList<DispatchReportDriverRow> getByDriver() { return ByDriver; }
public DispatchReportResponse setByDriver(ArrayList<DispatchReportDriverRow> value) { this.ByDriver = value; return this; }
public ArrayList<DispatchReportJobRow> getJobs() { return Jobs; }
public DispatchReportResponse setJobs(ArrayList<DispatchReportJobRow> value) { this.Jobs = value; return this; }
public ArrayList<DispatchReportIncidentRow> getIncidents() { return Incidents; }
public DispatchReportResponse setIncidents(ArrayList<DispatchReportIncidentRow> value) { this.Incidents = value; return this; }
public ArrayList<DispatchReportHoldRow> getHolds() { return Holds; }
public DispatchReportResponse setHolds(ArrayList<DispatchReportHoldRow> value) { this.Holds = value; return this; }
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public DispatchReportResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
}
public static class DashboardStatTile
{
public String Key = null;
public String Label = null;
public Double Value = null;
public Double PreviousValue = null;
public String Unit = null;
public Double DeltaPct = null;
public String getKey() { return Key; }
public DashboardStatTile setKey(String value) { this.Key = value; return this; }
public String getLabel() { return Label; }
public DashboardStatTile setLabel(String value) { this.Label = value; return this; }
public Double getValue() { return Value; }
public DashboardStatTile setValue(Double value) { this.Value = value; return this; }
public Double getPreviousValue() { return PreviousValue; }
public DashboardStatTile setPreviousValue(Double value) { this.PreviousValue = value; return this; }
public String getUnit() { return Unit; }
public DashboardStatTile setUnit(String value) { this.Unit = value; return this; }
public Double getDeltaPct() { return DeltaPct; }
public DashboardStatTile setDeltaPct(Double value) { this.DeltaPct = value; return this; }
}
public static class DispatchReportDayRow
{
public String Label = null;
public Integer Loads = null;
public Double Revenue = null;
public Double Pay = null;
public Double Qty = null;
public Double AvgCycleMins = null;
public String getLabel() { return Label; }
public DispatchReportDayRow setLabel(String value) { this.Label = value; return this; }
public Integer getLoads() { return Loads; }
public DispatchReportDayRow setLoads(Integer value) { this.Loads = value; return this; }
public Double getRevenue() { return Revenue; }
public DispatchReportDayRow setRevenue(Double value) { this.Revenue = value; return this; }
public Double getPay() { return Pay; }
public DispatchReportDayRow setPay(Double value) { this.Pay = value; return this; }
public Double getQty() { return Qty; }
public DispatchReportDayRow setQty(Double value) { this.Qty = value; return this; }
public Double getAvgCycleMins() { return AvgCycleMins; }
public DispatchReportDayRow setAvgCycleMins(Double value) { this.AvgCycleMins = value; return this; }
}
public static class DispatchReportModuleRow
{
public String Module = null;
public Integer Loads = null;
public Double Qty = null;
public Double Revenue = null;
public Double Pay = null;
public String getModule() { return Module; }
public DispatchReportModuleRow setModule(String value) { this.Module = value; return this; }
public Integer getLoads() { return Loads; }
public DispatchReportModuleRow setLoads(Integer value) { this.Loads = value; return this; }
public Double getQty() { return Qty; }
public DispatchReportModuleRow setQty(Double value) { this.Qty = value; return this; }
public Double getRevenue() { return Revenue; }
public DispatchReportModuleRow setRevenue(Double value) { this.Revenue = value; return this; }
public Double getPay() { return Pay; }
public DispatchReportModuleRow setPay(Double value) { this.Pay = value; return this; }
}
public static class DispatchReportLaneRow
{
public String SupplierName = null;
public String SourceLabel = null;
public Integer Loads = null;
public Double Qty = null;
public Double Revenue = null;
public Double AvgCycleMins = null;
public String getSupplierName() { return SupplierName; }
public DispatchReportLaneRow setSupplierName(String value) { this.SupplierName = value; return this; }
public String getSourceLabel() { return SourceLabel; }
public DispatchReportLaneRow setSourceLabel(String value) { this.SourceLabel = value; return this; }
public Integer getLoads() { return Loads; }
public DispatchReportLaneRow setLoads(Integer value) { this.Loads = value; return this; }
public Double getQty() { return Qty; }
public DispatchReportLaneRow setQty(Double value) { this.Qty = value; return this; }
public Double getRevenue() { return Revenue; }
public DispatchReportLaneRow setRevenue(Double value) { this.Revenue = value; return this; }
public Double getAvgCycleMins() { return AvgCycleMins; }
public DispatchReportLaneRow setAvgCycleMins(Double value) { this.AvgCycleMins = value; return this; }
}
public static class DispatchReportTruckRow
{
public String TruckLabel = null;
public String DriverLabel = null;
public Integer Loads = null;
public Double Qty = null;
public Double Revenue = null;
public Double Pay = null;
public Double AvgCycleMins = null;
public Integer DaysActive = null;
public String getTruckLabel() { return TruckLabel; }
public DispatchReportTruckRow setTruckLabel(String value) { this.TruckLabel = value; return this; }
public String getDriverLabel() { return DriverLabel; }
public DispatchReportTruckRow setDriverLabel(String value) { this.DriverLabel = value; return this; }
public Integer getLoads() { return Loads; }
public DispatchReportTruckRow setLoads(Integer value) { this.Loads = value; return this; }
public Double getQty() { return Qty; }
public DispatchReportTruckRow setQty(Double value) { this.Qty = value; return this; }
public Double getRevenue() { return Revenue; }
public DispatchReportTruckRow setRevenue(Double value) { this.Revenue = value; return this; }
public Double getPay() { return Pay; }
public DispatchReportTruckRow setPay(Double value) { this.Pay = value; return this; }
public Double getAvgCycleMins() { return AvgCycleMins; }
public DispatchReportTruckRow setAvgCycleMins(Double value) { this.AvgCycleMins = value; return this; }
public Integer getDaysActive() { return DaysActive; }
public DispatchReportTruckRow setDaysActive(Integer value) { this.DaysActive = value; return this; }
}
public static class DispatchReportDriverRow
{
public String Driver = null;
public Integer DriverContactId = null;
public Integer Loads = null;
public Double Qty = null;
public Double Pay = null;
public Integer DaysActive = null;
public Integer Unpriced = null;
public String getDriver() { return Driver; }
public DispatchReportDriverRow setDriver(String value) { this.Driver = value; return this; }
public Integer getDriverContactId() { return DriverContactId; }
public DispatchReportDriverRow setDriverContactId(Integer value) { this.DriverContactId = value; return this; }
public Integer getLoads() { return Loads; }
public DispatchReportDriverRow setLoads(Integer value) { this.Loads = value; return this; }
public Double getQty() { return Qty; }
public DispatchReportDriverRow setQty(Double value) { this.Qty = value; return this; }
public Double getPay() { return Pay; }
public DispatchReportDriverRow setPay(Double value) { this.Pay = value; return this; }
public Integer getDaysActive() { return DaysActive; }
public DispatchReportDriverRow setDaysActive(Integer value) { this.DaysActive = value; return this; }
public Integer getUnpriced() { return Unpriced; }
public DispatchReportDriverRow setUnpriced(Integer value) { this.Unpriced = value; return this; }
}
public static class DispatchReportJobRow
{
public String JobCode = null;
public String Customer = null;
public String Cargo = null;
public String Route = null;
public Integer Miles = null;
public Double Revenue = null;
public Double Pay = null;
public Double MarginPct = null;
public Date ClosedUtc = null;
public String getJobCode() { return JobCode; }
public DispatchReportJobRow setJobCode(String value) { this.JobCode = value; return this; }
public String getCustomer() { return Customer; }
public DispatchReportJobRow setCustomer(String value) { this.Customer = value; return this; }
public String getCargo() { return Cargo; }
public DispatchReportJobRow setCargo(String value) { this.Cargo = value; return this; }
public String getRoute() { return Route; }
public DispatchReportJobRow setRoute(String value) { this.Route = value; return this; }
public Integer getMiles() { return Miles; }
public DispatchReportJobRow setMiles(Integer value) { this.Miles = value; return this; }
public Double getRevenue() { return Revenue; }
public DispatchReportJobRow setRevenue(Double value) { this.Revenue = value; return this; }
public Double getPay() { return Pay; }
public DispatchReportJobRow setPay(Double value) { this.Pay = value; return this; }
public Double getMarginPct() { return MarginPct; }
public DispatchReportJobRow setMarginPct(Double value) { this.MarginPct = value; return this; }
public Date getClosedUtc() { return ClosedUtc; }
public DispatchReportJobRow setClosedUtc(Date value) { this.ClosedUtc = value; return this; }
}
public static class DispatchReportIncidentRow
{
public String Kind = null;
public Integer Opened = null;
public Integer Resolved = null;
public Double AvgResolveMins = null;
public String getKind() { return Kind; }
public DispatchReportIncidentRow setKind(String value) { this.Kind = value; return this; }
public Integer getOpened() { return Opened; }
public DispatchReportIncidentRow setOpened(Integer value) { this.Opened = value; return this; }
public Integer getResolved() { return Resolved; }
public DispatchReportIncidentRow setResolved(Integer value) { this.Resolved = value; return this; }
public Double getAvgResolveMins() { return AvgResolveMins; }
public DispatchReportIncidentRow setAvgResolveMins(Double value) { this.AvgResolveMins = value; return this; }
}
public static class DispatchReportHoldRow
{
public String ScopeKind = null;
public Integer Holds = null;
public Integer PausedMins = null;
public Integer Weather = null;
public Integer FromIncidents = null;
public String getScopeKind() { return ScopeKind; }
public DispatchReportHoldRow setScopeKind(String value) { this.ScopeKind = value; return this; }
public Integer getHolds() { return Holds; }
public DispatchReportHoldRow setHolds(Integer value) { this.Holds = value; return this; }
public Integer getPausedMins() { return PausedMins; }
public DispatchReportHoldRow setPausedMins(Integer value) { this.PausedMins = value; return this; }
public Integer getWeather() { return Weather; }
public DispatchReportHoldRow setWeather(Integer value) { this.Weather = value; return this; }
public Integer getFromIncidents() { return FromIncidents; }
public DispatchReportHoldRow setFromIncidents(Integer value) { this.FromIncidents = value; return this; }
}
}
Java 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
}
}
}