Trendsic Platform Service

<back to all web services

DispatchLaneRateSaveRequest

Requires Authentication
The following routes are available for this service:
PUT,OPTIONS/v1/dispatch/rates/lane
"use strict";
export class DispatchRateConfigView {
    /** @param {{FuelSurchargePct?:number,TransportPerMile?:number,TransportJobMin?:number,TransportEnclosedUpliftPct?:number,OdBase?:number,OdPerBag?:number,OdPremiumUpliftPct?:number,HaulBasis?:string,Facility?:string,Unit?:string,LoadQty?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    FuelSurchargePct;
    /** @type {number} */
    TransportPerMile;
    /** @type {number} */
    TransportJobMin;
    /** @type {number} */
    TransportEnclosedUpliftPct;
    /** @type {number} */
    OdBase;
    /** @type {number} */
    OdPerBag;
    /** @type {number} */
    OdPremiumUpliftPct;
    /** @type {string} */
    HaulBasis;
    /** @type {string} */
    Facility;
    /** @type {string} */
    Unit;
    /** @type {number} */
    LoadQty;
}
export class DispatchLaneRateView {
    /** @param {{DispatchSiteID?:number,DispatchSupplierID?:number,SourceLabel?:string,SupplierName?:string,DispatchLaneRateID?:number,Miles?:number,RatePerTon?:number,RatePerLoad?:number,RatePerTonMile?:number,RatePerHour?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {?number} */
    DispatchSiteID;
    /** @type {?number} */
    DispatchSupplierID;
    /** @type {string} */
    SourceLabel;
    /** @type {string} */
    SupplierName;
    /** @type {?number} */
    DispatchLaneRateID;
    /** @type {?number} */
    Miles;
    /** @type {?number} */
    RatePerTon;
    /** @type {?number} */
    RatePerLoad;
    /** @type {?number} */
    RatePerTonMile;
    /** @type {?number} */
    RatePerHour;
}
export class DispatchZoneRateView {
    /** @param {{Zone?:string,DispatchZoneRateID?:number,Base?:number,PerBag?:number,PremiumUpliftPct?:number,Drivers?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Zone;
    /** @type {?number} */
    DispatchZoneRateID;
    /** @type {?number} */
    Base;
    /** @type {?number} */
    PerBag;
    /** @type {?number} */
    PremiumUpliftPct;
    /** @type {number} */
    Drivers;
}
export class DispatchPayPlanView {
    /** @param {{DispatchPayPlanID?:number,Name?:string,Basis?:string,Rate?:number,Rate2?:number,EffectiveDate?:string,IsActive?:boolean,Drivers?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    DispatchPayPlanID;
    /** @type {string} */
    Name;
    /** @type {string} */
    Basis;
    /** @type {number} */
    Rate;
    /** @type {?number} */
    Rate2;
    /** @type {?string} */
    EffectiveDate;
    /** @type {boolean} */
    IsActive;
    /** @type {number} */
    Drivers;
}
export class DispatchRatesResponse {
    /** @param {{Config?:DispatchRateConfigView,Lanes?:DispatchLaneRateView[],Zones?:DispatchZoneRateView[],Plans?:DispatchPayPlanView[],Repriced?:number,StillNoRevenue?:number,StillNoPay?:number,ResponseStatus?:ResponseStatus}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {DispatchRateConfigView} */
    Config;
    /** @type {DispatchLaneRateView[]} */
    Lanes = [];
    /** @type {DispatchZoneRateView[]} */
    Zones = [];
    /** @type {DispatchPayPlanView[]} */
    Plans = [];
    /** @type {?number} */
    Repriced;
    /** @type {?number} */
    StillNoRevenue;
    /** @type {?number} */
    StillNoPay;
    /** @type {ResponseStatus} */
    ResponseStatus;
}
export class DispatchLaneRateSaveRequest {
    /** @param {{Lane?:DispatchLaneRateView}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {DispatchLaneRateView} */
    Lane;
}

JavaScript DispatchLaneRateSaveRequest 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.

PUT /v1/dispatch/rates/lane HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Lane: 
	{
		DispatchSiteID: 0,
		DispatchSupplierID: 0,
		SourceLabel: String,
		SupplierName: String,
		DispatchLaneRateID: 0,
		Miles: 0,
		RatePerTon: 0,
		RatePerLoad: 0,
		RatePerTonMile: 0,
		RatePerHour: 0
	}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Config: 
	{
		FuelSurchargePct: 0,
		TransportPerMile: 0,
		TransportJobMin: 0,
		TransportEnclosedUpliftPct: 0,
		OdBase: 0,
		OdPerBag: 0,
		OdPremiumUpliftPct: 0,
		HaulBasis: String,
		Facility: String,
		Unit: String,
		LoadQty: 0
	},
	Lanes: 
	[
		{
			DispatchSiteID: 0,
			DispatchSupplierID: 0,
			SourceLabel: String,
			SupplierName: String,
			DispatchLaneRateID: 0,
			Miles: 0,
			RatePerTon: 0,
			RatePerLoad: 0,
			RatePerTonMile: 0,
			RatePerHour: 0
		}
	],
	Zones: 
	[
		{
			Zone: String,
			DispatchZoneRateID: 0,
			Base: 0,
			PerBag: 0,
			PremiumUpliftPct: 0,
			Drivers: 0
		}
	],
	Plans: 
	[
		{
			DispatchPayPlanID: 0,
			Name: String,
			Basis: String,
			Rate: 0,
			Rate2: 0,
			EffectiveDate: 0001-01-01,
			IsActive: False,
			Drivers: 0
		}
	],
	Repriced: 0,
	StillNoRevenue: 0,
	StillNoPay: 0,
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}