| GET,OPTIONS | /v1/dispatch/loads |
|---|
import Foundation
import ServiceStack
public class DispatchLoadsRequest : Codable
{
public var hours:Int
public var module:String
public var search:String
public var status:String
public var pending:Bool
public var offset:Int
public var pageSize:Int
required public init(){}
}
public class DispatchLoadsResponse : Codable
{
public var loads:[DispatchLoadView] = []
public var hours:Int
public var total:Int
public var inFlight:Int
public var priced:Int
public var revenue:Double?
public var paid:Int
public var pay:Double?
public var pendingLoads:Int
public var offset:Int
public var pageSize:Int
public var moduleCounts:[String:Int] = [:]
public var responseStatus:ResponseStatus
required public init(){}
}
public class DispatchLoadView : Codable
{
public var loadId:Int
public var code:String
public var module:String
public var truckLabel:String
public var driverLabel:String
public var carrierLabel:String
public var sourceLabel:String
public var destinationLabel:String
public var qty:Double?
public var unit:String
public var qtyText:String
public var ticketCode:String
public var rateApplied:Double?
public var rateBasis:String
public var revenue:Double?
public var payPlanLabel:String
public var pay:Double?
public var status:String
public var openedUtc:Date
public var closedUtc:Date?
public var photos:Int
public var stages:[DispatchLoadStageView] = []
required public init(){}
}
public class DispatchLoadStageView : Codable
{
public var stage:String
public var atUtc:Date
public var note:String
required public init(){}
}
Swift DispatchLoadsRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/dispatch/loads HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"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"}]}],"Hours":0,"Total":0,"InFlight":0,"Priced":0,"Revenue":0,"Paid":0,"Pay":0,"PendingLoads":0,"Offset":0,"PageSize":0,"ModuleCounts":{"String":0},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}