Trendsic Platform Service

<back to all web services

DispatchReportRequest

Requires Authentication
The following routes are available for this service:
POST,OPTIONS/v1/dashboard/dispatch

export class DashboardStatTile
{
    public Key: string;
    public Label: string;
    public Value: number;
    public PreviousValue?: number;
    public Unit: string;
    public DeltaPct?: number;

    public constructor(init?: Partial<DashboardStatTile>) { (Object as any).assign(this, init); }
}

export class DispatchReportDayRow
{
    public Label: string;
    public Loads: number;
    public Revenue: number;
    public Pay: number;
    public Qty: number;
    public AvgCycleMins?: number;

    public constructor(init?: Partial<DispatchReportDayRow>) { (Object as any).assign(this, init); }
}

export class DispatchReportModuleRow
{
    public Module: string;
    public Loads: number;
    public Qty: number;
    public Revenue: number;
    public Pay: number;

    public constructor(init?: Partial<DispatchReportModuleRow>) { (Object as any).assign(this, init); }
}

export class DispatchReportLaneRow
{
    public SupplierName: string;
    public SourceLabel: string;
    public Loads: number;
    public Qty: number;
    public Revenue: number;
    public AvgCycleMins?: number;

    public constructor(init?: Partial<DispatchReportLaneRow>) { (Object as any).assign(this, init); }
}

export class DispatchReportTruckRow
{
    public TruckLabel: string;
    public DriverLabel: string;
    public Loads: number;
    public Qty: number;
    public Revenue: number;
    public Pay: number;
    public AvgCycleMins?: number;
    public DaysActive: number;

    public constructor(init?: Partial<DispatchReportTruckRow>) { (Object as any).assign(this, init); }
}

export class DispatchReportDriverRow
{
    public Driver: string;
    public DriverContactId?: number;
    public Loads: number;
    public Qty: number;
    public Pay: number;
    public DaysActive: number;
    public Unpriced: number;

    public constructor(init?: Partial<DispatchReportDriverRow>) { (Object as any).assign(this, init); }
}

export class DispatchReportJobRow
{
    public JobCode: string;
    public Customer: string;
    public Cargo: string;
    public Route: string;
    public Miles: number;
    public Revenue?: number;
    public Pay?: number;
    public MarginPct?: number;
    public ClosedUtc?: string;

    public constructor(init?: Partial<DispatchReportJobRow>) { (Object as any).assign(this, init); }
}

export class DispatchReportIncidentRow
{
    public Kind: string;
    public Opened: number;
    public Resolved: number;
    public AvgResolveMins?: number;

    public constructor(init?: Partial<DispatchReportIncidentRow>) { (Object as any).assign(this, init); }
}

export class DispatchReportHoldRow
{
    public ScopeKind: string;
    public Holds: number;
    public PausedMins: number;
    public Weather: number;
    public FromIncidents: number;

    public constructor(init?: Partial<DispatchReportHoldRow>) { (Object as any).assign(this, init); }
}

export class DispatchReportResponse
{
    public Stats: DashboardStatTile[] = [];
    public Unit: string;
    public Trend: DispatchReportDayRow[] = [];
    public ByModule: DispatchReportModuleRow[] = [];
    public ByLane: DispatchReportLaneRow[] = [];
    public ByTruck: DispatchReportTruckRow[] = [];
    public ByDriver: DispatchReportDriverRow[] = [];
    public Jobs: DispatchReportJobRow[] = [];
    public Incidents: DispatchReportIncidentRow[] = [];
    public Holds: DispatchReportHoldRow[] = [];
    public ResponseStatus: ResponseStatus;

    public constructor(init?: Partial<DispatchReportResponse>) { (Object as any).assign(this, init); }
}

export class DispatchReportRequest
{
    public FromDate: string;
    public ToDate: string;
    public LocationIds: string[] = [];

    public constructor(init?: Partial<DispatchReportRequest>) { (Object as any).assign(this, init); }
}

TypeScript DispatchReportRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + 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
		}
	}
}