| GET,OPTIONS | /v1/visits/exceptions |
|---|
import Foundation
import ServiceStack
public class VisitExceptionsRequest : Codable
{
required public init(){}
}
public class VisitExceptionsResponse : Codable
{
public var items:[ExceptionItem] = []
public var missedCount:Int
public var slaCount:Int
public var skippedCount:Int
public var atRiskCount:Int
public var responseStatus:ResponseStatus
required public init(){}
}
public class ExceptionItem : Codable
{
public var kind:String
public var visitKey:String
public var jobID:Int
public var projectID:Int
public var agreementID:Int?
public var agreementJobID:Int?
public var occurrenceDate:String
public var customerName:String
public var locationName:String
public var city:String
public var lat:Double?
public var lng:Double?
public var ageDays:Int
public var reason:String
public var durationMinutes:Int
public var isCommercial:Bool
public var preferredCrewID:Int?
required public init(){}
}
Swift VisitExceptionsRequest 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.
GET /v1/visits/exceptions HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Items:
[
{
Kind: String,
VisitKey: String,
JobID: 0,
ProjectID: 0,
AgreementID: 0,
AgreementJobID: 0,
OccurrenceDate: String,
CustomerName: String,
LocationName: String,
City: String,
Lat: 0,
Lng: 0,
AgeDays: 0,
Reason: String,
DurationMinutes: 0,
IsCommercial: False,
PreferredCrewID: 0
}
],
MissedCount: 0,
SlaCount: 0,
SkippedCount: 0,
AtRiskCount: 0,
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}