Trendsic Platform Service

<back to all web services

DriverPingAnswerRequest

Requires Authentication
The following routes are available for this service:
POST,OPTIONS/v1/worker/dispatch/ping/{Code}/answer
"use strict";
export class DriverStampView {
    /** @param {{Stage?:string,AtUtc?:string,Note?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Stage;
    /** @type {string} */
    AtUtc;
    /** @type {string} */
    Note;
}
export class DriverTruckView {
    /** @param {{Code?:string,Stage?:string,StageSinceUtc?:string,LoadsToday?:number,NetToday?:number,EstLoad?:number,Slot?:string,SiteName?:string,SupplierName?:string,NextSiteName?:string,Facility?:string,FacilityShort?:string,Unit?:string,QueuePosition?:number,HoldCode?:string,HoldReason?:string,HoldEndUtc?:string,OpenLoadId?:number,OpenLoadCode?:string,OpenLoadPhotos?:number,Stamps?:DriverStampView[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Code;
    /** @type {string} */
    Stage;
    /** @type {?string} */
    StageSinceUtc;
    /** @type {number} */
    LoadsToday;
    /** @type {number} */
    NetToday;
    /** @type {?number} */
    EstLoad;
    /** @type {string} */
    Slot;
    /** @type {string} */
    SiteName;
    /** @type {string} */
    SupplierName;
    /** @type {string} */
    NextSiteName;
    /** @type {string} */
    Facility;
    /** @type {string} */
    FacilityShort;
    /** @type {string} */
    Unit;
    /** @type {?number} */
    QueuePosition;
    /** @type {string} */
    HoldCode;
    /** @type {string} */
    HoldReason;
    /** @type {?string} */
    HoldEndUtc;
    /** @type {?number} */
    OpenLoadId;
    /** @type {string} */
    OpenLoadCode;
    /** @type {number} */
    OpenLoadPhotos;
    /** @type {DriverStampView[]} */
    Stamps = [];
}
export class DriverRigView {
    /** @param {{Code?:string,Name?:string,RigType?:string,IsFree?:boolean,HoldCode?:string,HoldReason?:string,HoldEndUtc?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Code;
    /** @type {string} */
    Name;
    /** @type {string} */
    RigType;
    /** @type {boolean} */
    IsFree;
    /** @type {string} */
    HoldCode;
    /** @type {string} */
    HoldReason;
    /** @type {?string} */
    HoldEndUtc;
}
export class DriverJobView {
    /** @param {{Kind?:string,Code?:string,Cargo?:string,Customer?:string,CustomerPhone?:string,HoldContact?:string,HoldPhone?:string,FromLoc?:string,ToLoc?:string,Miles?:number,WindowText?:string,Stage?:string,Rate?:number,RequiredRig?:string,EtaText?:string,OfferExpiresUtc?:string,RequestId?:number,LoadId?:number,LoadCode?:string,LoadPay?:number,Photos?:number,Stamps?:DriverStampView[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Kind;
    /** @type {string} */
    Code;
    /** @type {string} */
    Cargo;
    /** @type {string} */
    Customer;
    /** @type {string} */
    CustomerPhone;
    /** @type {string} */
    HoldContact;
    /** @type {string} */
    HoldPhone;
    /** @type {string} */
    FromLoc;
    /** @type {string} */
    ToLoc;
    /** @type {number} */
    Miles;
    /** @type {string} */
    WindowText;
    /** @type {string} */
    Stage;
    /** @type {?number} */
    Rate;
    /** @type {string} */
    RequiredRig;
    /** @type {string} */
    EtaText;
    /** @type {?string} */
    OfferExpiresUtc;
    /** @type {?number} */
    RequestId;
    /** @type {?number} */
    LoadId;
    /** @type {string} */
    LoadCode;
    /** @type {?number} */
    LoadPay;
    /** @type {number} */
    Photos;
    /** @type {DriverStampView[]} */
    Stamps = [];
}
export class DriverOdView {
    /** @param {{Code?:string,Name?:string,Zone?:string,Status?:string,Tier?:string,Capabilities?:string,PingCode?:string,PingAddress?:string,PingZone?:string,PingBags?:number,PingNeeds?:string,PingNote?:string,PingExpiresUtc?:string,RunCode?:string,RunAddress?:string,RunZone?:string,RunBags?:number,RunStage?:string,RunNeeds?:string,RunNote?:string,RunEta?:string,OdBase?:number,OdPerBag?:number,HoldCode?:string,HoldReason?:string,HoldEndUtc?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Code;
    /** @type {string} */
    Name;
    /** @type {string} */
    Zone;
    /** @type {string} */
    Status;
    /** @type {string} */
    Tier;
    /** @type {string} */
    Capabilities;
    /** @type {string} */
    PingCode;
    /** @type {string} */
    PingAddress;
    /** @type {string} */
    PingZone;
    /** @type {?number} */
    PingBags;
    /** @type {string} */
    PingNeeds;
    /** @type {string} */
    PingNote;
    /** @type {?string} */
    PingExpiresUtc;
    /** @type {string} */
    RunCode;
    /** @type {string} */
    RunAddress;
    /** @type {string} */
    RunZone;
    /** @type {?number} */
    RunBags;
    /** @type {string} */
    RunStage;
    /** @type {string} */
    RunNeeds;
    /** @type {string} */
    RunNote;
    /** @type {string} */
    RunEta;
    /** @type {?number} */
    OdBase;
    /** @type {?number} */
    OdPerBag;
    /** @type {string} */
    HoldCode;
    /** @type {string} */
    HoldReason;
    /** @type {?string} */
    HoldEndUtc;
}
export class DispatchIncidentMessageView {
    /** @param {{MessageId?:number,Who?:string,Role?:string,Msg?:string,AtUtc?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    MessageId;
    /** @type {string} */
    Who;
    /** @type {string} */
    Role;
    /** @type {string} */
    Msg;
    /** @type {string} */
    AtUtc;
}
export class DriverIncidentView {
    /** @param {{IncidentId?:number,Code?:string,Kind?:string,KindDetail?:string,Status?:string,LoadCode?:string,TruckCode?:string,LocationText?:string,DriverPref?:string,TruckRecovery?:string,LoadRecovery?:string,TransloadTruckCode?:string,HoldCode?:string,OpenedUtc?:string,ResolvedUtc?:string,Messages?:DispatchIncidentMessageView[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    IncidentId;
    /** @type {string} */
    Code;
    /** @type {string} */
    Kind;
    /** @type {string} */
    KindDetail;
    /** @type {string} */
    Status;
    /** @type {string} */
    LoadCode;
    /** @type {string} */
    TruckCode;
    /** @type {string} */
    LocationText;
    /** @type {string} */
    DriverPref;
    /** @type {string} */
    TruckRecovery;
    /** @type {string} */
    LoadRecovery;
    /** @type {string} */
    TransloadTruckCode;
    /** @type {string} */
    HoldCode;
    /** @type {string} */
    OpenedUtc;
    /** @type {?string} */
    ResolvedUtc;
    /** @type {DispatchIncidentMessageView[]} */
    Messages = [];
}
export class DriverPayLineView {
    /** @param {{Code?:string,Module?:string,SourceLabel?:string,DestinationLabel?:string,QtyText?:string,Pay?:number,PayPlanLabel?:string,Status?:string,ClosedUtc?:string,OpenedUtc?:string,TicketCode?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Code;
    /** @type {string} */
    Module;
    /** @type {string} */
    SourceLabel;
    /** @type {string} */
    DestinationLabel;
    /** @type {string} */
    QtyText;
    /** @type {?number} */
    Pay;
    /** @type {string} */
    PayPlanLabel;
    /** @type {string} */
    Status;
    /** @type {?string} */
    ClosedUtc;
    /** @type {string} */
    OpenedUtc;
    /** @type {string} */
    TicketCode;
}
export class DriverMeResponse {
    /** @param {{ContactId?:number,Name?:string,Phone?:string,PayPlanName?:string,PayPlanBasis?:string,PayPlanRate?:number,Truck?:DriverTruckView,Rig?:DriverRigView,Jobs?:DriverJobView[],Od?:DriverOdView,Incidents?:DriverIncidentView[],Pay?:DriverPayLineView[],ServerUtc?:string,Message?:string,ResponseStatus?:ResponseStatus}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    ContactId;
    /** @type {string} */
    Name;
    /** @type {string} */
    Phone;
    /** @type {string} */
    PayPlanName;
    /** @type {string} */
    PayPlanBasis;
    /** @type {?number} */
    PayPlanRate;
    /** @type {DriverTruckView} */
    Truck;
    /** @type {DriverRigView} */
    Rig;
    /** @type {DriverJobView[]} */
    Jobs = [];
    /** @type {DriverOdView} */
    Od;
    /** @type {DriverIncidentView[]} */
    Incidents = [];
    /** @type {DriverPayLineView[]} */
    Pay = [];
    /** @type {string} */
    ServerUtc;
    /** @type {string} */
    Message;
    /** @type {ResponseStatus} */
    ResponseStatus;
}
export class DriverPingAnswerRequest {
    /** @param {{Code?:string,Accept?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Code;
    /** @type {boolean} */
    Accept;
}

JavaScript DriverPingAnswerRequest 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/worker/dispatch/ping/{Code}/answer HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Code: String,
	Accept: False
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ContactId: 0,
	Name: String,
	Phone: String,
	PayPlanName: String,
	PayPlanBasis: String,
	PayPlanRate: 0,
	Truck: 
	{
		Code: String,
		Stage: String,
		StageSinceUtc: 0001-01-01,
		LoadsToday: 0,
		NetToday: 0,
		EstLoad: 0,
		Slot: String,
		SiteName: String,
		SupplierName: String,
		NextSiteName: String,
		Facility: String,
		FacilityShort: String,
		Unit: String,
		QueuePosition: 0,
		HoldCode: String,
		HoldReason: String,
		HoldEndUtc: 0001-01-01,
		OpenLoadId: 0,
		OpenLoadCode: String,
		OpenLoadPhotos: 0,
		Stamps: 
		[
			{
				Stage: String,
				AtUtc: 0001-01-01,
				Note: String
			}
		]
	},
	Rig: 
	{
		Code: String,
		Name: String,
		RigType: String,
		IsFree: False,
		HoldCode: String,
		HoldReason: String,
		HoldEndUtc: 0001-01-01
	},
	Jobs: 
	[
		{
			Kind: String,
			Code: String,
			Cargo: String,
			Customer: String,
			CustomerPhone: String,
			HoldContact: String,
			HoldPhone: String,
			FromLoc: String,
			ToLoc: String,
			Miles: 0,
			WindowText: String,
			Stage: String,
			Rate: 0,
			RequiredRig: String,
			EtaText: String,
			OfferExpiresUtc: 0001-01-01,
			RequestId: 0,
			LoadId: 0,
			LoadCode: String,
			LoadPay: 0,
			Photos: 0,
			Stamps: 
			[
				{
					Stage: String,
					AtUtc: 0001-01-01,
					Note: String
				}
			]
		}
	],
	Od: 
	{
		Code: String,
		Name: String,
		Zone: String,
		Status: String,
		Tier: String,
		Capabilities: String,
		PingCode: String,
		PingAddress: String,
		PingZone: String,
		PingBags: 0,
		PingNeeds: String,
		PingNote: String,
		PingExpiresUtc: 0001-01-01,
		RunCode: String,
		RunAddress: String,
		RunZone: String,
		RunBags: 0,
		RunStage: String,
		RunNeeds: String,
		RunNote: String,
		RunEta: String,
		OdBase: 0,
		OdPerBag: 0,
		HoldCode: String,
		HoldReason: String,
		HoldEndUtc: 0001-01-01
	},
	Incidents: 
	[
		{
			IncidentId: 0,
			Code: String,
			Kind: String,
			KindDetail: String,
			Status: String,
			LoadCode: String,
			TruckCode: String,
			LocationText: String,
			DriverPref: String,
			TruckRecovery: String,
			LoadRecovery: String,
			TransloadTruckCode: String,
			HoldCode: String,
			OpenedUtc: 0001-01-01,
			ResolvedUtc: 0001-01-01,
			Messages: 
			[
				{
					MessageId: 0,
					Who: String,
					Role: String,
					Msg: String,
					AtUtc: 0001-01-01
				}
			]
		}
	],
	Pay: 
	[
		{
			Code: String,
			Module: String,
			SourceLabel: String,
			DestinationLabel: String,
			QtyText: String,
			Pay: 0,
			PayPlanLabel: String,
			Status: String,
			ClosedUtc: 0001-01-01,
			OpenedUtc: 0001-01-01,
			TicketCode: String
		}
	],
	ServerUtc: 0001-01-01,
	Message: String,
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}