Trendsic Platform Service

<back to all web services

DispatchReportRequest

Requires Authentication
The following routes are available for this service:
POST,OPTIONS/v1/dashboard/dispatch
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using CRM.AgencyPlatform.API.Internal;

namespace CRM.AgencyPlatform.API.Internal
{
    public partial class DashboardStatTile
    {
        public virtual string Key { get; set; }
        public virtual string Label { get; set; }
        public virtual double Value { get; set; }
        public virtual double? PreviousValue { get; set; }
        public virtual string Unit { get; set; }
        public virtual double? DeltaPct { get; set; }
    }

    public partial class DispatchReportDayRow
    {
        public virtual string Label { get; set; }
        public virtual int Loads { get; set; }
        public virtual double Revenue { get; set; }
        public virtual double Pay { get; set; }
        public virtual double Qty { get; set; }
        public virtual double? AvgCycleMins { get; set; }
    }

    public partial class DispatchReportDriverRow
    {
        public virtual string Driver { get; set; }
        public virtual int? DriverContactId { get; set; }
        public virtual int Loads { get; set; }
        public virtual double Qty { get; set; }
        public virtual double Pay { get; set; }
        public virtual int DaysActive { get; set; }
        public virtual int Unpriced { get; set; }
    }

    public partial class DispatchReportHoldRow
    {
        public virtual string ScopeKind { get; set; }
        public virtual int Holds { get; set; }
        public virtual int PausedMins { get; set; }
        public virtual int Weather { get; set; }
        public virtual int FromIncidents { get; set; }
    }

    public partial class DispatchReportIncidentRow
    {
        public virtual string Kind { get; set; }
        public virtual int Opened { get; set; }
        public virtual int Resolved { get; set; }
        public virtual double? AvgResolveMins { get; set; }
    }

    public partial class DispatchReportJobRow
    {
        public virtual string JobCode { get; set; }
        public virtual string Customer { get; set; }
        public virtual string Cargo { get; set; }
        public virtual string Route { get; set; }
        public virtual int Miles { get; set; }
        public virtual double? Revenue { get; set; }
        public virtual double? Pay { get; set; }
        public virtual double? MarginPct { get; set; }
        public virtual DateTime? ClosedUtc { get; set; }
    }

    public partial class DispatchReportLaneRow
    {
        public virtual string SupplierName { get; set; }
        public virtual string SourceLabel { get; set; }
        public virtual int Loads { get; set; }
        public virtual double Qty { get; set; }
        public virtual double Revenue { get; set; }
        public virtual double? AvgCycleMins { get; set; }
    }

    public partial class DispatchReportModuleRow
    {
        public virtual string Module { get; set; }
        public virtual int Loads { get; set; }
        public virtual double Qty { get; set; }
        public virtual double Revenue { get; set; }
        public virtual double Pay { get; set; }
    }

    public partial class DispatchReportRequest
    {
        public virtual DateTime FromDate { get; set; }
        public virtual DateTime ToDate { get; set; }
        public virtual List<Guid> LocationIds { get; set; } = [];
    }

    public partial class DispatchReportResponse
    {
        public virtual List<DashboardStatTile> Stats { get; set; } = [];
        public virtual string Unit { get; set; }
        public virtual List<DispatchReportDayRow> Trend { get; set; } = [];
        public virtual List<DispatchReportModuleRow> ByModule { get; set; } = [];
        public virtual List<DispatchReportLaneRow> ByLane { get; set; } = [];
        public virtual List<DispatchReportTruckRow> ByTruck { get; set; } = [];
        public virtual List<DispatchReportDriverRow> ByDriver { get; set; } = [];
        public virtual List<DispatchReportJobRow> Jobs { get; set; } = [];
        public virtual List<DispatchReportIncidentRow> Incidents { get; set; } = [];
        public virtual List<DispatchReportHoldRow> Holds { get; set; } = [];
        public virtual ResponseStatus ResponseStatus { get; set; }
    }

    public partial class DispatchReportTruckRow
    {
        public virtual string TruckLabel { get; set; }
        public virtual string DriverLabel { get; set; }
        public virtual int Loads { get; set; }
        public virtual double Qty { get; set; }
        public virtual double Revenue { get; set; }
        public virtual double Pay { get; set; }
        public virtual double? AvgCycleMins { get; set; }
        public virtual int DaysActive { get; set; }
    }

}

C# DispatchReportRequest DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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/json
Content-Type: application/json
Content-Length: length

{"FromDate":"0001-01-01T00:00:00.0000000","ToDate":"0001-01-01T00:00:00.0000000","LocationIds":["00000000000000000000000000000000"]}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Stats":[{"Key":"String","Label":"String","Value":0,"PreviousValue":0,"Unit":"String","DeltaPct":null}],"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-01T00:00:00.0000000"}],"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"}}}