Trendsic Platform Service

<back to all web services

DispatchSettlementDeductionRequest

Requires Authentication
The following routes are available for this service:
PUT,OPTIONS/v1/dispatch/settlements/{SettlementId}/deduction

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 DispatchSettlementDeductionRequest
{
    public SettlementId: number;
    public Deduction: DispatchSettlementDeductionView;
    public Delete: boolean;

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

TypeScript DispatchSettlementDeductionRequest DTOs

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

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

PUT /v1/dispatch/settlements/{SettlementId}/deduction HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"SettlementId":0,"Deduction":{"DeductionId":0,"Kind":"String","Label":"String","Amount":0,"Note":"String"},"Delete":false}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"Settlements":[{"SettlementId":0,"Code":"String","VendorID":0,"VendorName":"String","PeriodStart":"0001-01-01T00:00:00.0000000","PeriodEnd":"0001-01-01T00:00:00.0000000","LoadCount":0,"GrossRevenue":0,"SplitPct":0,"CarrierShare":0,"DeductionsTotal":0,"Net":0,"Status":"String","Notes":"String","GeneratedUtc":"0001-01-01T00:00:00.0000000","SentUtc":"0001-01-01T00:00:00.0000000","ApprovedUtc":"0001-01-01T00:00:00.0000000","ApprovedBy":"String","PaidUtc":"0001-01-01T00:00:00.0000000","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-01T00:00:00.0000000","ClosedUtc":"0001-01-01T00:00:00.0000000","Photos":0,"Stages":[{"Stage":"String","AtUtc":"0001-01-01T00:00:00.0000000","Note":"String"}]}]}],"Settlement":{"SettlementId":0,"Code":"String","VendorID":0,"VendorName":"String","PeriodStart":"0001-01-01T00:00:00.0000000","PeriodEnd":"0001-01-01T00:00:00.0000000","LoadCount":0,"GrossRevenue":0,"SplitPct":0,"CarrierShare":0,"DeductionsTotal":0,"Net":0,"Status":"String","Notes":"String","GeneratedUtc":"0001-01-01T00:00:00.0000000","SentUtc":"0001-01-01T00:00:00.0000000","ApprovedUtc":"0001-01-01T00:00:00.0000000","ApprovedBy":"String","PaidUtc":"0001-01-01T00:00:00.0000000","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-01T00:00:00.0000000","ClosedUtc":"0001-01-01T00:00:00.0000000","Photos":0,"Stages":[{"Stage":"String","AtUtc":"0001-01-01T00:00:00.0000000","Note":"String"}]}]},"Suggestions":[{"VendorID":0,"VendorName":"String","SplitPct":0,"Terms":"String","W9OnFile":false,"CoiExpires":"0001-01-01T00:00:00.0000000","PeriodStart":"0001-01-01T00:00:00.0000000","PeriodEnd":"0001-01-01T00:00:00.0000000","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"}}}