| Requires any of the permissions: | DISPATCH:HAUL:MANAGE, DISPATCH:JOB:MANAGE, DISPATCH:ONDEMAND:MANAGE |
| 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 .xml suffix or ?format=xml
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: application/xml
Content-Type: application/xml
Content-Length: length
<DispatchIncidentLoadRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Action>String</Action>
<IncidentId>0</IncidentId>
<TransloadTruckCode>String</TransloadTruckCode>
</DispatchIncidentLoadRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<DispatchIncidentsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<EmptyTrucks>
<DispatchIncidentTruckView>
<Code>String</Code>
<DriverName>String</DriverName>
<OpenLoadCode>String</OpenLoadCode>
<Stage>String</Stage>
</DispatchIncidentTruckView>
</EmptyTrucks>
<Incidents>
<DispatchIncidentView>
<Code>String</Code>
<DestinationLabel>String</DestinationLabel>
<DriverPref>String</DriverPref>
<HoldCode>String</HoldCode>
<HoldId>0</HoldId>
<IncidentId>0</IncidentId>
<Kind>String</Kind>
<KindDetail>String</KindDetail>
<Lat>0</Lat>
<Lng>0</Lng>
<LoadCode>String</LoadCode>
<LoadId>0</LoadId>
<LoadRecoveredUtc>0001-01-01T00:00:00</LoadRecoveredUtc>
<LoadRecovery>String</LoadRecovery>
<LoadStatus>String</LoadStatus>
<LocationText>String</LocationText>
<Messages>
<DispatchIncidentMessageView>
<AtUtc>0001-01-01T00:00:00</AtUtc>
<MessageId>0</MessageId>
<Msg>String</Msg>
<Role>String</Role>
<Who>String</Who>
</DispatchIncidentMessageView>
</Messages>
<OpenedBy>String</OpenedBy>
<OpenedUtc>0001-01-01T00:00:00</OpenedUtc>
<OpenedVia>String</OpenedVia>
<PhotoCount>0</PhotoCount>
<QtyText>String</QtyText>
<ReopenedUtc>0001-01-01T00:00:00</ReopenedUtc>
<ResolvedBy>String</ResolvedBy>
<ResolvedUtc>0001-01-01T00:00:00</ResolvedUtc>
<Resolver>String</Resolver>
<SourceLabel>String</SourceLabel>
<Status>String</Status>
<TransloadTruckCode>String</TransloadTruckCode>
<TruckCode>String</TruckCode>
<TruckLabel>String</TruckLabel>
<TruckRecoveredUtc>0001-01-01T00:00:00</TruckRecoveredUtc>
<TruckRecovery>String</TruckRecovery>
</DispatchIncidentView>
</Incidents>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
<TransloadTruckCode>String</TransloadTruckCode>
<Trucks>
<DispatchIncidentTruckView>
<Code>String</Code>
<DriverName>String</DriverName>
<OpenLoadCode>String</OpenLoadCode>
<Stage>String</Stage>
</DispatchIncidentTruckView>
</Trucks>
</DispatchIncidentsResponse>