Trendsic Platform Service

<back to all web services

WorkerMessagesRequest

Requires Authentication
The following routes are available for this service:
GET,POST,OPTIONS/v1/worker/messages
import Foundation
import ServiceStack

public class WorkerMessagesRequest : Codable
{
    public var crewID:Int
    public var body:String
    public var isAlert:Bool

    required public init(){}
}

public class WorkerMessagesResponse : Codable
{
    public var responseStatus:ResponseStatus
    public var crews:[WorkerCrew] = []
    public var messages:[WorkerCrewMessage] = []
    public var sent:Bool

    required public init(){}
}

public class WorkerCrew : Codable
{
    public var crewID:Int
    public var crewName:String
    public var isManager:Bool

    required public init(){}
}

public class WorkerCrewMessage : Codable
{
    public var crewMessageID:Int
    public var crewID:Int
    public var crewName:String
    public var senderContactID:Int
    public var senderName:String
    public var body:String
    public var isAlert:Bool
    public var createdAtLabel:String
    public var mine:Bool

    required public init(){}
}


Swift WorkerMessagesRequest DTOs

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

HTTP + OTHER

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

POST /v1/worker/messages HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"CrewID":0,"Body":"String","IsAlert":false}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Crews":[{"CrewID":0,"CrewName":"String","IsManager":false}],"Messages":[{"CrewMessageID":0,"CrewID":0,"CrewName":"String","SenderContactID":0,"SenderName":"String","Body":"String","IsAlert":false,"CreatedAtLabel":"String","Mine":false}],"Sent":false}