| 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 .xml suffix or ?format=xml
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: application/xml
Content-Type: application/xml
Content-Length: length
<DispatchReportRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<FromDate>0001-01-01T00:00:00</FromDate>
<LocationIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:guid>00000000-0000-0000-0000-000000000000</d2p1:guid>
</LocationIds>
<ToDate>0001-01-01T00:00:00</ToDate>
</DispatchReportRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<DispatchReportResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<ByDriver>
<DispatchReportDriverRow>
<DaysActive>0</DaysActive>
<Driver>String</Driver>
<DriverContactId>0</DriverContactId>
<Loads>0</Loads>
<Pay>0</Pay>
<Qty>0</Qty>
<Unpriced>0</Unpriced>
</DispatchReportDriverRow>
</ByDriver>
<ByLane>
<DispatchReportLaneRow>
<AvgCycleMins>0</AvgCycleMins>
<Loads>0</Loads>
<Qty>0</Qty>
<Revenue>0</Revenue>
<SourceLabel>String</SourceLabel>
<SupplierName>String</SupplierName>
</DispatchReportLaneRow>
</ByLane>
<ByModule>
<DispatchReportModuleRow>
<Loads>0</Loads>
<Module>String</Module>
<Pay>0</Pay>
<Qty>0</Qty>
<Revenue>0</Revenue>
</DispatchReportModuleRow>
</ByModule>
<ByTruck>
<DispatchReportTruckRow>
<AvgCycleMins>0</AvgCycleMins>
<DaysActive>0</DaysActive>
<DriverLabel>String</DriverLabel>
<Loads>0</Loads>
<Pay>0</Pay>
<Qty>0</Qty>
<Revenue>0</Revenue>
<TruckLabel>String</TruckLabel>
</DispatchReportTruckRow>
</ByTruck>
<Holds>
<DispatchReportHoldRow>
<FromIncidents>0</FromIncidents>
<Holds>0</Holds>
<PausedMins>0</PausedMins>
<ScopeKind>String</ScopeKind>
<Weather>0</Weather>
</DispatchReportHoldRow>
</Holds>
<Incidents>
<DispatchReportIncidentRow>
<AvgResolveMins>0</AvgResolveMins>
<Kind>String</Kind>
<Opened>0</Opened>
<Resolved>0</Resolved>
</DispatchReportIncidentRow>
</Incidents>
<Jobs>
<DispatchReportJobRow>
<Cargo>String</Cargo>
<ClosedUtc>0001-01-01T00:00:00</ClosedUtc>
<Customer>String</Customer>
<JobCode>String</JobCode>
<MarginPct>0</MarginPct>
<Miles>0</Miles>
<Pay>0</Pay>
<Revenue>0</Revenue>
<Route>String</Route>
</DispatchReportJobRow>
</Jobs>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
<Stats>
<DashboardStatTile>
<Key>String</Key>
<Label>String</Label>
<PreviousValue>0</PreviousValue>
<Unit>String</Unit>
<Value>0</Value>
</DashboardStatTile>
</Stats>
<Trend>
<DispatchReportDayRow>
<AvgCycleMins>0</AvgCycleMins>
<Label>String</Label>
<Loads>0</Loads>
<Pay>0</Pay>
<Qty>0</Qty>
<Revenue>0</Revenue>
</DispatchReportDayRow>
</Trend>
<Unit>String</Unit>
</DispatchReportResponse>