Trendsic Platform Service

<back to all web services

DispatchRequestQuoteRequest

Requires Authentication
The following routes are available for this service:
POST,OPTIONS/v1/dispatch/requests/{RequestId}/quote
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    public static class DispatchRequestQuoteRequest
    {
        public Integer RequestId = null;
        public String RequiredRig = null;
        public Integer UnitsPerTruck = null;
        public BigDecimal RatePerLoad = null;
        public BigDecimal UrgencyPct = null;
        public BigDecimal CostPerLoad = null;
        
        public Integer getRequestId() { return RequestId; }
        public DispatchRequestQuoteRequest setRequestId(Integer value) { this.RequestId = value; return this; }
        public String getRequiredRig() { return RequiredRig; }
        public DispatchRequestQuoteRequest setRequiredRig(String value) { this.RequiredRig = value; return this; }
        public Integer getUnitsPerTruck() { return UnitsPerTruck; }
        public DispatchRequestQuoteRequest setUnitsPerTruck(Integer value) { this.UnitsPerTruck = value; return this; }
        public BigDecimal getRatePerLoad() { return RatePerLoad; }
        public DispatchRequestQuoteRequest setRatePerLoad(BigDecimal value) { this.RatePerLoad = value; return this; }
        public BigDecimal getUrgencyPct() { return UrgencyPct; }
        public DispatchRequestQuoteRequest setUrgencyPct(BigDecimal value) { this.UrgencyPct = value; return this; }
        public BigDecimal getCostPerLoad() { return CostPerLoad; }
        public DispatchRequestQuoteRequest setCostPerLoad(BigDecimal value) { this.CostPerLoad = value; return this; }
    }

    public static class DispatchRequestsResponse
    {
        public ArrayList<DispatchRequestView> Requests = new ArrayList<DispatchRequestView>();
        public DispatchRequestView Request = null;
        public ArrayList<DispatchRigCountView> RigCounts = new ArrayList<DispatchRigCountView>();
        public ArrayList<DispatchCarrierPickView> Carriers = new ArrayList<DispatchCarrierPickView>();
        public String QuoteLink = null;
        public String Delivery = null;
        public ResponseStatus ResponseStatus = null;
        
        public ArrayList<DispatchRequestView> getRequests() { return Requests; }
        public DispatchRequestsResponse setRequests(ArrayList<DispatchRequestView> value) { this.Requests = value; return this; }
        public DispatchRequestView getRequest() { return Request; }
        public DispatchRequestsResponse setRequest(DispatchRequestView value) { this.Request = value; return this; }
        public ArrayList<DispatchRigCountView> getRigCounts() { return RigCounts; }
        public DispatchRequestsResponse setRigCounts(ArrayList<DispatchRigCountView> value) { this.RigCounts = value; return this; }
        public ArrayList<DispatchCarrierPickView> getCarriers() { return Carriers; }
        public DispatchRequestsResponse setCarriers(ArrayList<DispatchCarrierPickView> value) { this.Carriers = value; return this; }
        public String getQuoteLink() { return QuoteLink; }
        public DispatchRequestsResponse setQuoteLink(String value) { this.QuoteLink = value; return this; }
        public String getDelivery() { return Delivery; }
        public DispatchRequestsResponse setDelivery(String value) { this.Delivery = value; return this; }
        public ResponseStatus getResponseStatus() { return ResponseStatus; }
        public DispatchRequestsResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
    }

    public static class DispatchRequestView
    {
        public Integer RequestId = null;
        public String Code = null;
        public String CustomerName = null;
        public String CustomerPhone = null;
        public String CustomerEmail = null;
        public String Cargo = null;
        public Integer Units = null;
        public String FromLoc = null;
        public String ToLoc = null;
        public Integer Miles = null;
        public String WindowText = null;
        public Boolean IsUrgent = null;
        public String Notes = null;
        public String Source = null;
        public String Status = null;
        public String RequiredRig = null;
        public Integer UnitsPerTruck = null;
        public BigDecimal RatePerLoad = null;
        public BigDecimal UrgencyPct = null;
        public BigDecimal CostPerLoad = null;
        public Integer LoadsNeeded = null;
        public BigDecimal QuoteTotal = null;
        public Integer QuoteVersion = null;
        public Date QuotedUtc = null;
        public String QuotedBy = null;
        public Date AcceptTokenExpiresUtc = null;
        public Date AcceptedUtc = null;
        public String AcceptedVia = null;
        public Date DeclinedUtc = null;
        public String DeclinedBy = null;
        public String DeclineReason = null;
        public Integer JobsCreated = null;
        public Integer JobsDone = null;
        public Integer JobsNeedDriver = null;
        public Date CreatedUtc = null;
        public String CreatedBy = null;
        public ArrayList<DispatchRequestEventView> Events = new ArrayList<DispatchRequestEventView>();
        
        public Integer getRequestId() { return RequestId; }
        public DispatchRequestView setRequestId(Integer value) { this.RequestId = value; return this; }
        public String getCode() { return Code; }
        public DispatchRequestView setCode(String value) { this.Code = value; return this; }
        public String getCustomerName() { return CustomerName; }
        public DispatchRequestView setCustomerName(String value) { this.CustomerName = value; return this; }
        public String getCustomerPhone() { return CustomerPhone; }
        public DispatchRequestView setCustomerPhone(String value) { this.CustomerPhone = value; return this; }
        public String getCustomerEmail() { return CustomerEmail; }
        public DispatchRequestView setCustomerEmail(String value) { this.CustomerEmail = value; return this; }
        public String getCargo() { return Cargo; }
        public DispatchRequestView setCargo(String value) { this.Cargo = value; return this; }
        public Integer getUnits() { return Units; }
        public DispatchRequestView setUnits(Integer value) { this.Units = value; return this; }
        public String getFromLoc() { return FromLoc; }
        public DispatchRequestView setFromLoc(String value) { this.FromLoc = value; return this; }
        public String getToLoc() { return ToLoc; }
        public DispatchRequestView setToLoc(String value) { this.ToLoc = value; return this; }
        public Integer getMiles() { return Miles; }
        public DispatchRequestView setMiles(Integer value) { this.Miles = value; return this; }
        public String getWindowText() { return WindowText; }
        public DispatchRequestView setWindowText(String value) { this.WindowText = value; return this; }
        public Boolean getIsUrgent() { return IsUrgent; }
        public DispatchRequestView setIsUrgent(Boolean value) { this.IsUrgent = value; return this; }
        public String getNotes() { return Notes; }
        public DispatchRequestView setNotes(String value) { this.Notes = value; return this; }
        public String getSource() { return Source; }
        public DispatchRequestView setSource(String value) { this.Source = value; return this; }
        public String getStatus() { return Status; }
        public DispatchRequestView setStatus(String value) { this.Status = value; return this; }
        public String getRequiredRig() { return RequiredRig; }
        public DispatchRequestView setRequiredRig(String value) { this.RequiredRig = value; return this; }
        public Integer getUnitsPerTruck() { return UnitsPerTruck; }
        public DispatchRequestView setUnitsPerTruck(Integer value) { this.UnitsPerTruck = value; return this; }
        public BigDecimal getRatePerLoad() { return RatePerLoad; }
        public DispatchRequestView setRatePerLoad(BigDecimal value) { this.RatePerLoad = value; return this; }
        public BigDecimal getUrgencyPct() { return UrgencyPct; }
        public DispatchRequestView setUrgencyPct(BigDecimal value) { this.UrgencyPct = value; return this; }
        public BigDecimal getCostPerLoad() { return CostPerLoad; }
        public DispatchRequestView setCostPerLoad(BigDecimal value) { this.CostPerLoad = value; return this; }
        public Integer getLoadsNeeded() { return LoadsNeeded; }
        public DispatchRequestView setLoadsNeeded(Integer value) { this.LoadsNeeded = value; return this; }
        public BigDecimal getQuoteTotal() { return QuoteTotal; }
        public DispatchRequestView setQuoteTotal(BigDecimal value) { this.QuoteTotal = value; return this; }
        public Integer getQuoteVersion() { return QuoteVersion; }
        public DispatchRequestView setQuoteVersion(Integer value) { this.QuoteVersion = value; return this; }
        public Date getQuotedUtc() { return QuotedUtc; }
        public DispatchRequestView setQuotedUtc(Date value) { this.QuotedUtc = value; return this; }
        public String getQuotedBy() { return QuotedBy; }
        public DispatchRequestView setQuotedBy(String value) { this.QuotedBy = value; return this; }
        public Date getAcceptTokenExpiresUtc() { return AcceptTokenExpiresUtc; }
        public DispatchRequestView setAcceptTokenExpiresUtc(Date value) { this.AcceptTokenExpiresUtc = value; return this; }
        public Date getAcceptedUtc() { return AcceptedUtc; }
        public DispatchRequestView setAcceptedUtc(Date value) { this.AcceptedUtc = value; return this; }
        public String getAcceptedVia() { return AcceptedVia; }
        public DispatchRequestView setAcceptedVia(String value) { this.AcceptedVia = value; return this; }
        public Date getDeclinedUtc() { return DeclinedUtc; }
        public DispatchRequestView setDeclinedUtc(Date value) { this.DeclinedUtc = value; return this; }
        public String getDeclinedBy() { return DeclinedBy; }
        public DispatchRequestView setDeclinedBy(String value) { this.DeclinedBy = value; return this; }
        public String getDeclineReason() { return DeclineReason; }
        public DispatchRequestView setDeclineReason(String value) { this.DeclineReason = value; return this; }
        public Integer getJobsCreated() { return JobsCreated; }
        public DispatchRequestView setJobsCreated(Integer value) { this.JobsCreated = value; return this; }
        public Integer getJobsDone() { return JobsDone; }
        public DispatchRequestView setJobsDone(Integer value) { this.JobsDone = value; return this; }
        public Integer getJobsNeedDriver() { return JobsNeedDriver; }
        public DispatchRequestView setJobsNeedDriver(Integer value) { this.JobsNeedDriver = value; return this; }
        public Date getCreatedUtc() { return CreatedUtc; }
        public DispatchRequestView setCreatedUtc(Date value) { this.CreatedUtc = value; return this; }
        public String getCreatedBy() { return CreatedBy; }
        public DispatchRequestView setCreatedBy(String value) { this.CreatedBy = value; return this; }
        public ArrayList<DispatchRequestEventView> getEvents() { return Events; }
        public DispatchRequestView setEvents(ArrayList<DispatchRequestEventView> value) { this.Events = value; return this; }
    }

    public static class DispatchRequestEventView
    {
        public Integer EventId = null;
        public String Kind = null;
        public String Detail = null;
        public Date AtUtc = null;
        public String ByWho = null;
        
        public Integer getEventId() { return EventId; }
        public DispatchRequestEventView setEventId(Integer value) { this.EventId = value; return this; }
        public String getKind() { return Kind; }
        public DispatchRequestEventView setKind(String value) { this.Kind = value; return this; }
        public String getDetail() { return Detail; }
        public DispatchRequestEventView setDetail(String value) { this.Detail = value; return this; }
        public Date getAtUtc() { return AtUtc; }
        public DispatchRequestEventView setAtUtc(Date value) { this.AtUtc = value; return this; }
        public String getByWho() { return ByWho; }
        public DispatchRequestEventView setByWho(String value) { this.ByWho = value; return this; }
    }

    public static class DispatchRigCountView
    {
        public String RigType = null;
        public Integer Rigs = null;
        
        public String getRigType() { return RigType; }
        public DispatchRigCountView setRigType(String value) { this.RigType = value; return this; }
        public Integer getRigs() { return Rigs; }
        public DispatchRigCountView setRigs(Integer value) { this.Rigs = value; return this; }
    }

    public static class DispatchCarrierPickView
    {
        public Integer VendorID = null;
        public String VendorName = null;
        
        public Integer getVendorID() { return VendorID; }
        public DispatchCarrierPickView setVendorID(Integer value) { this.VendorID = value; return this; }
        public String getVendorName() { return VendorName; }
        public DispatchCarrierPickView setVendorName(String value) { this.VendorName = value; return this; }
    }

}

Java DispatchRequestQuoteRequest DTOs

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

HTTP + XML

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

POST /v1/dispatch/requests/{RequestId}/quote HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<DispatchRequestQuoteRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <CostPerLoad>0</CostPerLoad>
  <RatePerLoad>0</RatePerLoad>
  <RequestId>0</RequestId>
  <RequiredRig>String</RequiredRig>
  <UnitsPerTruck>0</UnitsPerTruck>
  <UrgencyPct>0</UrgencyPct>
</DispatchRequestQuoteRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<DispatchRequestsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Carriers>
    <DispatchCarrierPickView>
      <VendorID>0</VendorID>
      <VendorName>String</VendorName>
    </DispatchCarrierPickView>
  </Carriers>
  <Delivery>String</Delivery>
  <QuoteLink>String</QuoteLink>
  <Request>
    <AcceptTokenExpiresUtc>0001-01-01T00:00:00</AcceptTokenExpiresUtc>
    <AcceptedUtc>0001-01-01T00:00:00</AcceptedUtc>
    <AcceptedVia>String</AcceptedVia>
    <Cargo>String</Cargo>
    <Code>String</Code>
    <CostPerLoad>0</CostPerLoad>
    <CreatedBy>String</CreatedBy>
    <CreatedUtc>0001-01-01T00:00:00</CreatedUtc>
    <CustomerEmail>String</CustomerEmail>
    <CustomerName>String</CustomerName>
    <CustomerPhone>String</CustomerPhone>
    <DeclineReason>String</DeclineReason>
    <DeclinedBy>String</DeclinedBy>
    <DeclinedUtc>0001-01-01T00:00:00</DeclinedUtc>
    <Events>
      <DispatchRequestEventView>
        <AtUtc>0001-01-01T00:00:00</AtUtc>
        <ByWho>String</ByWho>
        <Detail>String</Detail>
        <EventId>0</EventId>
        <Kind>String</Kind>
      </DispatchRequestEventView>
    </Events>
    <FromLoc>String</FromLoc>
    <IsUrgent>false</IsUrgent>
    <JobsCreated>0</JobsCreated>
    <JobsDone>0</JobsDone>
    <JobsNeedDriver>0</JobsNeedDriver>
    <LoadsNeeded>0</LoadsNeeded>
    <Miles>0</Miles>
    <Notes>String</Notes>
    <QuoteTotal>0</QuoteTotal>
    <QuoteVersion>0</QuoteVersion>
    <QuotedBy>String</QuotedBy>
    <QuotedUtc>0001-01-01T00:00:00</QuotedUtc>
    <RatePerLoad>0</RatePerLoad>
    <RequestId>0</RequestId>
    <RequiredRig>String</RequiredRig>
    <Source>String</Source>
    <Status>String</Status>
    <ToLoc>String</ToLoc>
    <Units>0</Units>
    <UnitsPerTruck>0</UnitsPerTruck>
    <UrgencyPct>0</UrgencyPct>
    <WindowText>String</WindowText>
  </Request>
  <Requests>
    <DispatchRequestView>
      <AcceptTokenExpiresUtc>0001-01-01T00:00:00</AcceptTokenExpiresUtc>
      <AcceptedUtc>0001-01-01T00:00:00</AcceptedUtc>
      <AcceptedVia>String</AcceptedVia>
      <Cargo>String</Cargo>
      <Code>String</Code>
      <CostPerLoad>0</CostPerLoad>
      <CreatedBy>String</CreatedBy>
      <CreatedUtc>0001-01-01T00:00:00</CreatedUtc>
      <CustomerEmail>String</CustomerEmail>
      <CustomerName>String</CustomerName>
      <CustomerPhone>String</CustomerPhone>
      <DeclineReason>String</DeclineReason>
      <DeclinedBy>String</DeclinedBy>
      <DeclinedUtc>0001-01-01T00:00:00</DeclinedUtc>
      <Events>
        <DispatchRequestEventView>
          <AtUtc>0001-01-01T00:00:00</AtUtc>
          <ByWho>String</ByWho>
          <Detail>String</Detail>
          <EventId>0</EventId>
          <Kind>String</Kind>
        </DispatchRequestEventView>
      </Events>
      <FromLoc>String</FromLoc>
      <IsUrgent>false</IsUrgent>
      <JobsCreated>0</JobsCreated>
      <JobsDone>0</JobsDone>
      <JobsNeedDriver>0</JobsNeedDriver>
      <LoadsNeeded>0</LoadsNeeded>
      <Miles>0</Miles>
      <Notes>String</Notes>
      <QuoteTotal>0</QuoteTotal>
      <QuoteVersion>0</QuoteVersion>
      <QuotedBy>String</QuotedBy>
      <QuotedUtc>0001-01-01T00:00:00</QuotedUtc>
      <RatePerLoad>0</RatePerLoad>
      <RequestId>0</RequestId>
      <RequiredRig>String</RequiredRig>
      <Source>String</Source>
      <Status>String</Status>
      <ToLoc>String</ToLoc>
      <Units>0</Units>
      <UnitsPerTruck>0</UnitsPerTruck>
      <UrgencyPct>0</UrgencyPct>
      <WindowText>String</WindowText>
    </DispatchRequestView>
  </Requests>
  <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>
  <RigCounts>
    <DispatchRigCountView>
      <RigType>String</RigType>
      <Rigs>0</Rigs>
    </DispatchRigCountView>
  </RigCounts>
</DispatchRequestsResponse>