Trendsic Platform Service

<back to all web services

DispatchIncidentOpenRequest

Requires Authentication
Requires any of the permissions:DISPATCH:HAUL:MANAGE, DISPATCH:JOB:MANAGE, DISPATCH:ONDEMAND:MANAGE
The following routes are available for this service:
POST,OPTIONS/v1/dispatch/incidents
import Foundation
import ServiceStack

public class DispatchIncidentOpenRequest : Codable
{
    public var kind:String
    public var kindDetail:String
    public var truckCode:String
    public var loadCode:String
    public var locationText:String
    public var lat:Double?
    public var lng:Double?
    public var driverPref:String
    public var note:String
    public var openedBy:String
    public var openedVia:String

    required public init(){}
}

public class DispatchIncidentsResponse : Codable
{
    public var incidents:[DispatchIncidentView] = []
    public var emptyTrucks:[DispatchIncidentTruckView] = []
    public var trucks:[DispatchIncidentTruckView] = []
    public var transloadTruckCode:String
    public var responseStatus:ResponseStatus

    required public init(){}
}

public class DispatchIncidentView : Codable
{
    public var incidentId:Int
    public var code:String
    public var kind:String
    public var kindDetail:String
    public var loadId:Int?
    public var loadCode:String
    public var loadStatus:String
    public var sourceLabel:String
    public var destinationLabel:String
    public var qtyText:String
    public var truckCode:String
    public var truckLabel:String
    public var locationText:String
    public var lat:Double?
    public var lng:Double?
    public var driverPref:String
    public var openedBy:String
    public var openedVia:String
    public var resolver:String
    public var status:String
    public var truckRecovery:String
    public var truckRecoveredUtc:Date?
    public var loadRecovery:String
    public var loadRecoveredUtc:Date?
    public var transloadTruckCode:String
    public var holdId:Int?
    public var holdCode:String
    public var photoCount:Int
    public var openedUtc:Date
    public var resolvedUtc:Date?
    public var resolvedBy:String
    public var reopenedUtc:Date?
    public var messages:[DispatchIncidentMessageView] = []

    required public init(){}
}

public class DispatchIncidentMessageView : Codable
{
    public var messageId:Int
    public var who:String
    public var role:String
    public var msg:String
    public var atUtc:Date

    required public init(){}
}

public class DispatchIncidentTruckView : Codable
{
    public var code:String
    public var driverName:String
    public var stage:String
    public var openLoadCode:String

    required public init(){}
}


Swift DispatchIncidentOpenRequest 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/dispatch/incidents HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"Kind":"String","KindDetail":"String","TruckCode":"String","LoadCode":"String","LocationText":"String","Lat":0,"Lng":0,"DriverPref":"String","Note":"String","OpenedBy":"String","OpenedVia":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"Incidents":[{"IncidentId":0,"Code":"String","Kind":"String","KindDetail":"String","LoadId":0,"LoadCode":"String","LoadStatus":"String","SourceLabel":"String","DestinationLabel":"String","QtyText":"String","TruckCode":"String","TruckLabel":"String","LocationText":"String","Lat":0,"Lng":0,"DriverPref":"String","OpenedBy":"String","OpenedVia":"String","Resolver":"String","Status":"String","TruckRecovery":"String","TruckRecoveredUtc":"0001-01-01T00:00:00.0000000","LoadRecovery":"String","LoadRecoveredUtc":"0001-01-01T00:00:00.0000000","TransloadTruckCode":"String","HoldId":0,"HoldCode":"String","PhotoCount":0,"OpenedUtc":"0001-01-01T00:00:00.0000000","ResolvedUtc":"0001-01-01T00:00:00.0000000","ResolvedBy":"String","ReopenedUtc":"0001-01-01T00:00:00.0000000","Messages":[{"MessageId":0,"Who":"String","Role":"String","Msg":"String","AtUtc":"0001-01-01T00:00:00.0000000"}]}],"EmptyTrucks":[{"Code":"String","DriverName":"String","Stage":"String","OpenLoadCode":"String"}],"Trucks":[{"Code":"String","DriverName":"String","Stage":"String","OpenLoadCode":"String"}],"TransloadTruckCode":"String","ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}