| GET,OPTIONS | /v1/worker/crew |
|---|
import Foundation
import ServiceStack
public class WorkerAppCrewRequest : Codable
{
public var date:String
required public init(){}
}
public class WorkerAppCrewResponse : Codable
{
public var responseStatus:ResponseStatus
public var isCrewLead:Bool
public var dateLabel:String
public var rows:[WorkerCrewRow] = []
required public init(){}
}
public class WorkerCrewRow : Codable
{
public var contactID:Int
public var workerName:String
public var phone:String
public var jobID:Int
public var status:String
public var propertyName:String
public var address:String
required public init(){}
}
Swift WorkerAppCrewRequest 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/worker/crew 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
}
},
IsCrewLead: False,
DateLabel: String,
Rows:
[
{
ContactID: 0,
WorkerName: String,
Phone: String,
JobID: 0,
Status: String,
PropertyName: String,
Address: String
}
]
}