Trendsic Platform Service

<back to all web services

DispatchIncidentLoadRequest

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/{IncidentId}/load
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    public static class DispatchIncidentLoadRequest
    {
        public Integer IncidentId = null;
        public String Action = null;
        public String TransloadTruckCode = null;
        
        public Integer getIncidentId() { return IncidentId; }
        public DispatchIncidentLoadRequest setIncidentId(Integer value) { this.IncidentId = value; return this; }
        public String getAction() { return Action; }
        public DispatchIncidentLoadRequest setAction(String value) { this.Action = value; return this; }
        public String getTransloadTruckCode() { return TransloadTruckCode; }
        public DispatchIncidentLoadRequest setTransloadTruckCode(String value) { this.TransloadTruckCode = value; return this; }
    }

    public static class DispatchIncidentsResponse
    {
        public ArrayList<DispatchIncidentView> Incidents = new ArrayList<DispatchIncidentView>();
        public ArrayList<DispatchIncidentTruckView> EmptyTrucks = new ArrayList<DispatchIncidentTruckView>();
        public ArrayList<DispatchIncidentTruckView> Trucks = new ArrayList<DispatchIncidentTruckView>();
        public String TransloadTruckCode = null;
        public ResponseStatus ResponseStatus = null;
        
        public ArrayList<DispatchIncidentView> getIncidents() { return Incidents; }
        public DispatchIncidentsResponse setIncidents(ArrayList<DispatchIncidentView> value) { this.Incidents = value; return this; }
        public ArrayList<DispatchIncidentTruckView> getEmptyTrucks() { return EmptyTrucks; }
        public DispatchIncidentsResponse setEmptyTrucks(ArrayList<DispatchIncidentTruckView> value) { this.EmptyTrucks = value; return this; }
        public ArrayList<DispatchIncidentTruckView> getTrucks() { return Trucks; }
        public DispatchIncidentsResponse setTrucks(ArrayList<DispatchIncidentTruckView> value) { this.Trucks = value; return this; }
        public String getTransloadTruckCode() { return TransloadTruckCode; }
        public DispatchIncidentsResponse setTransloadTruckCode(String value) { this.TransloadTruckCode = value; return this; }
        public ResponseStatus getResponseStatus() { return ResponseStatus; }
        public DispatchIncidentsResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
    }

    public static class DispatchIncidentView
    {
        public Integer IncidentId = null;
        public String Code = null;
        public String Kind = null;
        public String KindDetail = null;
        public Integer LoadId = null;
        public String LoadCode = null;
        public String LoadStatus = null;
        public String SourceLabel = null;
        public String DestinationLabel = null;
        public String QtyText = null;
        public String TruckCode = null;
        public String TruckLabel = null;
        public String LocationText = null;
        public BigDecimal Lat = null;
        public BigDecimal Lng = null;
        public String DriverPref = null;
        public String OpenedBy = null;
        public String OpenedVia = null;
        public String Resolver = null;
        public String Status = null;
        public String TruckRecovery = null;
        public Date TruckRecoveredUtc = null;
        public String LoadRecovery = null;
        public Date LoadRecoveredUtc = null;
        public String TransloadTruckCode = null;
        public Integer HoldId = null;
        public String HoldCode = null;
        public Integer PhotoCount = null;
        public Date OpenedUtc = null;
        public Date ResolvedUtc = null;
        public String ResolvedBy = null;
        public Date ReopenedUtc = null;
        public ArrayList<DispatchIncidentMessageView> Messages = new ArrayList<DispatchIncidentMessageView>();
        
        public Integer getIncidentId() { return IncidentId; }
        public DispatchIncidentView setIncidentId(Integer value) { this.IncidentId = value; return this; }
        public String getCode() { return Code; }
        public DispatchIncidentView setCode(String value) { this.Code = value; return this; }
        public String getKind() { return Kind; }
        public DispatchIncidentView setKind(String value) { this.Kind = value; return this; }
        public String getKindDetail() { return KindDetail; }
        public DispatchIncidentView setKindDetail(String value) { this.KindDetail = value; return this; }
        public Integer getLoadId() { return LoadId; }
        public DispatchIncidentView setLoadId(Integer value) { this.LoadId = value; return this; }
        public String getLoadCode() { return LoadCode; }
        public DispatchIncidentView setLoadCode(String value) { this.LoadCode = value; return this; }
        public String getLoadStatus() { return LoadStatus; }
        public DispatchIncidentView setLoadStatus(String value) { this.LoadStatus = value; return this; }
        public String getSourceLabel() { return SourceLabel; }
        public DispatchIncidentView setSourceLabel(String value) { this.SourceLabel = value; return this; }
        public String getDestinationLabel() { return DestinationLabel; }
        public DispatchIncidentView setDestinationLabel(String value) { this.DestinationLabel = value; return this; }
        public String getQtyText() { return QtyText; }
        public DispatchIncidentView setQtyText(String value) { this.QtyText = value; return this; }
        public String getTruckCode() { return TruckCode; }
        public DispatchIncidentView setTruckCode(String value) { this.TruckCode = value; return this; }
        public String getTruckLabel() { return TruckLabel; }
        public DispatchIncidentView setTruckLabel(String value) { this.TruckLabel = value; return this; }
        public String getLocationText() { return LocationText; }
        public DispatchIncidentView setLocationText(String value) { this.LocationText = value; return this; }
        public BigDecimal getLat() { return Lat; }
        public DispatchIncidentView setLat(BigDecimal value) { this.Lat = value; return this; }
        public BigDecimal getLng() { return Lng; }
        public DispatchIncidentView setLng(BigDecimal value) { this.Lng = value; return this; }
        public String getDriverPref() { return DriverPref; }
        public DispatchIncidentView setDriverPref(String value) { this.DriverPref = value; return this; }
        public String getOpenedBy() { return OpenedBy; }
        public DispatchIncidentView setOpenedBy(String value) { this.OpenedBy = value; return this; }
        public String getOpenedVia() { return OpenedVia; }
        public DispatchIncidentView setOpenedVia(String value) { this.OpenedVia = value; return this; }
        public String getResolver() { return Resolver; }
        public DispatchIncidentView setResolver(String value) { this.Resolver = value; return this; }
        public String getStatus() { return Status; }
        public DispatchIncidentView setStatus(String value) { this.Status = value; return this; }
        public String getTruckRecovery() { return TruckRecovery; }
        public DispatchIncidentView setTruckRecovery(String value) { this.TruckRecovery = value; return this; }
        public Date getTruckRecoveredUtc() { return TruckRecoveredUtc; }
        public DispatchIncidentView setTruckRecoveredUtc(Date value) { this.TruckRecoveredUtc = value; return this; }
        public String getLoadRecovery() { return LoadRecovery; }
        public DispatchIncidentView setLoadRecovery(String value) { this.LoadRecovery = value; return this; }
        public Date getLoadRecoveredUtc() { return LoadRecoveredUtc; }
        public DispatchIncidentView setLoadRecoveredUtc(Date value) { this.LoadRecoveredUtc = value; return this; }
        public String getTransloadTruckCode() { return TransloadTruckCode; }
        public DispatchIncidentView setTransloadTruckCode(String value) { this.TransloadTruckCode = value; return this; }
        public Integer getHoldId() { return HoldId; }
        public DispatchIncidentView setHoldId(Integer value) { this.HoldId = value; return this; }
        public String getHoldCode() { return HoldCode; }
        public DispatchIncidentView setHoldCode(String value) { this.HoldCode = value; return this; }
        public Integer getPhotoCount() { return PhotoCount; }
        public DispatchIncidentView setPhotoCount(Integer value) { this.PhotoCount = value; return this; }
        public Date getOpenedUtc() { return OpenedUtc; }
        public DispatchIncidentView setOpenedUtc(Date value) { this.OpenedUtc = value; return this; }
        public Date getResolvedUtc() { return ResolvedUtc; }
        public DispatchIncidentView setResolvedUtc(Date value) { this.ResolvedUtc = value; return this; }
        public String getResolvedBy() { return ResolvedBy; }
        public DispatchIncidentView setResolvedBy(String value) { this.ResolvedBy = value; return this; }
        public Date getReopenedUtc() { return ReopenedUtc; }
        public DispatchIncidentView setReopenedUtc(Date value) { this.ReopenedUtc = value; return this; }
        public ArrayList<DispatchIncidentMessageView> getMessages() { return Messages; }
        public DispatchIncidentView setMessages(ArrayList<DispatchIncidentMessageView> value) { this.Messages = value; return this; }
    }

    public static class DispatchIncidentMessageView
    {
        public Integer MessageId = null;
        public String Who = null;
        public String Role = null;
        public String Msg = null;
        public Date AtUtc = null;
        
        public Integer getMessageId() { return MessageId; }
        public DispatchIncidentMessageView setMessageId(Integer value) { this.MessageId = value; return this; }
        public String getWho() { return Who; }
        public DispatchIncidentMessageView setWho(String value) { this.Who = value; return this; }
        public String getRole() { return Role; }
        public DispatchIncidentMessageView setRole(String value) { this.Role = value; return this; }
        public String getMsg() { return Msg; }
        public DispatchIncidentMessageView setMsg(String value) { this.Msg = value; return this; }
        public Date getAtUtc() { return AtUtc; }
        public DispatchIncidentMessageView setAtUtc(Date value) { this.AtUtc = value; return this; }
    }

    public static class DispatchIncidentTruckView
    {
        public String Code = null;
        public String DriverName = null;
        public String Stage = null;
        public String OpenLoadCode = null;
        
        public String getCode() { return Code; }
        public DispatchIncidentTruckView setCode(String value) { this.Code = value; return this; }
        public String getDriverName() { return DriverName; }
        public DispatchIncidentTruckView setDriverName(String value) { this.DriverName = value; return this; }
        public String getStage() { return Stage; }
        public DispatchIncidentTruckView setStage(String value) { this.Stage = value; return this; }
        public String getOpenLoadCode() { return OpenLoadCode; }
        public DispatchIncidentTruckView setOpenLoadCode(String value) { this.OpenLoadCode = value; return this; }
    }

}

Java DispatchIncidentLoadRequest DTOs

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

HTTP + JSV

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

POST /v1/dispatch/incidents/{IncidentId}/load HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	IncidentId: 0,
	Action: String,
	TransloadTruckCode: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
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-01,
			LoadRecovery: String,
			LoadRecoveredUtc: 0001-01-01,
			TransloadTruckCode: String,
			HoldId: 0,
			HoldCode: String,
			PhotoCount: 0,
			OpenedUtc: 0001-01-01,
			ResolvedUtc: 0001-01-01,
			ResolvedBy: String,
			ReopenedUtc: 0001-01-01,
			Messages: 
			[
				{
					MessageId: 0,
					Who: String,
					Role: String,
					Msg: String,
					AtUtc: 0001-01-01
				}
			]
		}
	],
	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
		}
	}
}