| GET,OPTIONS | /v1/routeplan/week |
|---|
import Foundation
import ServiceStack
public class RoutePlanWeekRequest : Codable
{
public var from:String
required public init(){}
}
public class RoutePlanWeekResponse : Codable
{
public var fromIso:String
public var toIso:String
public var crews:[RoutePlanCrew] = []
public var visits:[RoutePlanVisit] = []
public var skipped:[RoutePlanSkippedVisit] = []
public var responseStatus:ResponseStatus
required public init(){}
}
public class RoutePlanCrew : Codable
{
public var crewID:Int
public var crewName:String
public var crewColor:String
public var homeZip:String
public var yardLat:Double?
public var yardLng:Double?
public var dailyCapacityMin:Int
public var weeklyCapacityMin:Int
public var specialist:Bool
required public init(){}
}
public class RoutePlanVisit : Codable
{
public var agreementID:Int
public var agreementJobID:Int?
public var name:String
public var sub:String
public var serviceType:String
public var zip:String
public var area:String
public var lat:Double?
public var lng:Double?
public var durationMin:Int
public var dueIso:String
public var dueLabel:String
public var overdue:Bool
public var defaultCrewID:Int?
public var routeCrewID:Int?
public var routeSeq:Int?
public var routeDateIso:String
public var lateDays:Int
public var autoPay:Bool
public var skipPolicy:String
public var skipCreditAmount:Double
required public init(){}
}
public class RoutePlanSkippedVisit : Codable
{
public var agreementJobID:Int
public var agreementID:Int
public var name:String
public var dateIso:String
public var reason:String
public var creditAmount:Double
required public init(){}
}
Swift RoutePlanWeekRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/routeplan/week HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"FromIso":"String","ToIso":"String","Crews":[{"CrewID":0,"CrewName":"String","CrewColor":"String","HomeZip":"String","YardLat":0,"YardLng":0,"DailyCapacityMin":0,"WeeklyCapacityMin":0,"Specialist":false}],"Visits":[{"AgreementID":0,"AgreementJobID":0,"Name":"String","Sub":"String","ServiceType":"String","Zip":"String","Area":"String","Lat":0,"Lng":0,"DurationMin":0,"DueIso":"String","DueLabel":"String","Overdue":false,"DefaultCrewID":0,"RouteCrewID":0,"RouteSeq":0,"RouteDateIso":"String","LateDays":0,"AutoPay":false,"SkipPolicy":"String","SkipCreditAmount":0}],"Skipped":[{"AgreementJobID":0,"AgreementID":0,"Name":"String","DateIso":"String","Reason":"String","CreditAmount":0}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}