Trendsic Platform Service

<back to all web services

DispatchCommsRequest

Requires Authentication
The following routes are available for this service:
GET,PUT/v1/dispatch/comms
import Foundation
import ServiceStack

public class DispatchCommsRequest : Codable
{
    public var movingMph:Double
    public var movingHoldSecs:Int
    public var relayVoice:Bool

    required public init(){}
}

public class WorkerCommsResponse : Codable
{
    public var comms:WorkerCommsView
    public var number:String
    public var code:String
    public var message:String
    public var responseStatus:ResponseStatus

    required public init(){}
}

public class WorkerCommsView : Codable
{
    public var movingMph:Double
    public var movingHoldSecs:Int
    public var relayVoice:Bool
    public var relayReady:Bool
    public var hasOwnNumber:Bool
    public var relayNumber:String

    required public init(){}
}


Swift DispatchCommsRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

PUT /v1/dispatch/comms HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"MovingMph":0,"MovingHoldSecs":0,"RelayVoice":false}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"Comms":{"MovingMph":0,"MovingHoldSecs":0,"RelayVoice":false,"RelayReady":false,"HasOwnNumber":false,"RelayNumber":"String"},"Number":"String","Code":"String","Message":"String","ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}