| POST,OPTIONS | /v1/dispatch/settlements/generate |
|---|
export class DispatchSettlementDeductionView
{
public DeductionId: number;
public Kind: string;
public Label: string;
public Amount: number;
public Note: string;
public constructor(init?: Partial<DispatchSettlementDeductionView>) { (Object as any).assign(this, init); }
}
export class DispatchLoadStageView
{
public Stage: string;
public AtUtc: string;
public Note: string;
public constructor(init?: Partial<DispatchLoadStageView>) { (Object as any).assign(this, init); }
}
export class DispatchLoadView
{
public LoadId: number;
public Code: string;
public Module: string;
public TruckLabel: string;
public DriverLabel: string;
public CarrierLabel: string;
public SourceLabel: string;
public DestinationLabel: string;
public Qty?: number;
public Unit: string;
public QtyText: string;
public TicketCode: string;
public RateApplied?: number;
public RateBasis: string;
public Revenue?: number;
public PayPlanLabel: string;
public Pay?: number;
public Status: string;
public OpenedUtc: string;
public ClosedUtc?: string;
public Photos: number;
public Stages: DispatchLoadStageView[] = [];
public constructor(init?: Partial<DispatchLoadView>) { (Object as any).assign(this, init); }
}
export class DispatchSettlementView
{
public SettlementId: number;
public Code: string;
public VendorID: number;
public VendorName: string;
public PeriodStart: string;
public PeriodEnd: string;
public LoadCount: number;
public GrossRevenue: number;
public SplitPct: number;
public CarrierShare: number;
public DeductionsTotal: number;
public Net: number;
public Status: string;
public Notes: string;
public GeneratedUtc: string;
public SentUtc?: string;
public ApprovedUtc?: string;
public ApprovedBy: string;
public PaidUtc?: string;
public PaidRef: string;
public ContactCount: number;
public Deductions: DispatchSettlementDeductionView[] = [];
public Loads: DispatchLoadView[] = [];
public constructor(init?: Partial<DispatchSettlementView>) { (Object as any).assign(this, init); }
}
export class DispatchSettlementSuggestView
{
public VendorID: number;
public VendorName: string;
public SplitPct: number;
public Terms: string;
public W9OnFile: boolean;
public CoiExpires?: string;
public PeriodStart: string;
public PeriodEnd: string;
public UnsettledLoads: number;
public UnpricedLoads: number;
public UnsettledPay: number;
public constructor(init?: Partial<DispatchSettlementSuggestView>) { (Object as any).assign(this, init); }
}
export class DispatchSettlementsResponse
{
public Settlements: DispatchSettlementView[] = [];
public Settlement: DispatchSettlementView;
public Suggestions: DispatchSettlementSuggestView[] = [];
public ResponseStatus: ResponseStatus;
public constructor(init?: Partial<DispatchSettlementsResponse>) { (Object as any).assign(this, init); }
}
export class DispatchSettlementGenerateRequest
{
public VendorID: number;
public PeriodStart: string;
public PeriodEnd: string;
public constructor(init?: Partial<DispatchSettlementGenerateRequest>) { (Object as any).assign(this, init); }
}
TypeScript DispatchSettlementGenerateRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/dispatch/settlements/generate HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
VendorID: 0,
PeriodStart: 0001-01-01,
PeriodEnd: 0001-01-01
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Settlements:
[
{
SettlementId: 0,
Code: String,
VendorID: 0,
VendorName: String,
PeriodStart: 0001-01-01,
PeriodEnd: 0001-01-01,
LoadCount: 0,
GrossRevenue: 0,
SplitPct: 0,
CarrierShare: 0,
DeductionsTotal: 0,
Net: 0,
Status: String,
Notes: String,
GeneratedUtc: 0001-01-01,
SentUtc: 0001-01-01,
ApprovedUtc: 0001-01-01,
ApprovedBy: String,
PaidUtc: 0001-01-01,
PaidRef: String,
ContactCount: 0,
Deductions:
[
{
DeductionId: 0,
Kind: String,
Label: String,
Amount: 0,
Note: String
}
],
Loads:
[
{
LoadId: 0,
Code: String,
Module: String,
TruckLabel: String,
DriverLabel: String,
CarrierLabel: String,
SourceLabel: String,
DestinationLabel: String,
Qty: 0,
Unit: String,
QtyText: String,
TicketCode: String,
RateApplied: 0,
RateBasis: String,
Revenue: 0,
PayPlanLabel: String,
Pay: 0,
Status: String,
OpenedUtc: 0001-01-01,
ClosedUtc: 0001-01-01,
Photos: 0,
Stages:
[
{
Stage: String,
AtUtc: 0001-01-01,
Note: String
}
]
}
]
}
],
Settlement:
{
SettlementId: 0,
Code: String,
VendorID: 0,
VendorName: String,
PeriodStart: 0001-01-01,
PeriodEnd: 0001-01-01,
LoadCount: 0,
GrossRevenue: 0,
SplitPct: 0,
CarrierShare: 0,
DeductionsTotal: 0,
Net: 0,
Status: String,
Notes: String,
GeneratedUtc: 0001-01-01,
SentUtc: 0001-01-01,
ApprovedUtc: 0001-01-01,
ApprovedBy: String,
PaidUtc: 0001-01-01,
PaidRef: String,
ContactCount: 0,
Deductions:
[
{
DeductionId: 0,
Kind: String,
Label: String,
Amount: 0,
Note: String
}
],
Loads:
[
{
LoadId: 0,
Code: String,
Module: String,
TruckLabel: String,
DriverLabel: String,
CarrierLabel: String,
SourceLabel: String,
DestinationLabel: String,
Qty: 0,
Unit: String,
QtyText: String,
TicketCode: String,
RateApplied: 0,
RateBasis: String,
Revenue: 0,
PayPlanLabel: String,
Pay: 0,
Status: String,
OpenedUtc: 0001-01-01,
ClosedUtc: 0001-01-01,
Photos: 0,
Stages:
[
{
Stage: String,
AtUtc: 0001-01-01,
Note: String
}
]
}
]
},
Suggestions:
[
{
VendorID: 0,
VendorName: String,
SplitPct: 0,
Terms: String,
W9OnFile: False,
CoiExpires: 0001-01-01,
PeriodStart: 0001-01-01,
PeriodEnd: 0001-01-01,
UnsettledLoads: 0,
UnpricedLoads: 0,
UnsettledPay: 0
}
],
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}