| GET,OPTIONS | /v1/fleet/live |
|---|
import Foundation
import ServiceStack
public class FleetLiveRequest : Codable
{
public var date:String
public var status:String
public var crewID:Int?
public var zip:String
public var branchId:String?
public var search:String
public var page:Int
public var pageSize:Int
required public init(){}
}
public class FleetLiveResponse : Codable
{
public var responseStatus:ResponseStatus
public var rows:[FleetRowDto] = []
public var activeWorkers:Int
public var enRoute:Int
public var onSite:Int
public var waiting:Int
public var done:Int
public var runningLate:Int
public var pageTotal:Int
public var page:Int
public var pageSize:Int
required public init(){}
}
public class FleetRowDto : Codable
{
public var contactID:Int
public var workerName:String
public var crewID:Int?
public var crewName:String
public var branchId:String?
public var liveStatus:String
public var workerScheduleItemID:Int?
public var jobID:Int?
public var curProperty:String
public var curAddress:String
public var curZip:String
public var enRouteAt:String
public var startedAt:String
public var lastLat:Double?
public var lastLng:Double?
public var lastLocAt:String
public var nextProperty:String
public var doneVisits:Int
public var totalVisits:Int
required public init(){}
}
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.
GET /v1/fleet/live HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
},
Rows:
[
{
ContactID: 0,
WorkerName: String,
CrewID: 0,
CrewName: String,
BranchId: 00000000000000000000000000000000,
LiveStatus: String,
WorkerScheduleItemID: 0,
JobID: 0,
CurProperty: String,
CurAddress: String,
CurZip: String,
EnRouteAt: String,
StartedAt: String,
LastLat: 0,
LastLng: 0,
LastLocAt: String,
NextProperty: String,
DoneVisits: 0,
TotalVisits: 0
}
],
ActiveWorkers: 0,
EnRoute: 0,
OnSite: 0,
Waiting: 0,
Done: 0,
RunningLate: 0,
PageTotal: 0,
Page: 0,
PageSize: 0
}