Trendsic Platform Service

<back to all web services

DispatchRequestDeclineRequest

Requires Authentication
The following routes are available for this service:
POST,OPTIONS/v1/dispatch/requests/{RequestId}/decline
"use strict";
export class DispatchRequestEventView {
    /** @param {{EventId?:number,Kind?:string,Detail?:string,AtUtc?:string,ByWho?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    EventId;
    /** @type {string} */
    Kind;
    /** @type {string} */
    Detail;
    /** @type {string} */
    AtUtc;
    /** @type {string} */
    ByWho;
}
export class DispatchRequestView {
    /** @param {{RequestId?:number,Code?:string,CustomerName?:string,CustomerPhone?:string,CustomerEmail?:string,Cargo?:string,Units?:number,FromLoc?:string,ToLoc?:string,Miles?:number,WindowText?:string,IsUrgent?:boolean,Notes?:string,Source?:string,Status?:string,RequiredRig?:string,UnitsPerTruck?:number,RatePerLoad?:number,UrgencyPct?:number,CostPerLoad?:number,LoadsNeeded?:number,QuoteTotal?:number,QuoteVersion?:number,QuotedUtc?:string,QuotedBy?:string,AcceptTokenExpiresUtc?:string,AcceptedUtc?:string,AcceptedVia?:string,DeclinedUtc?:string,DeclinedBy?:string,DeclineReason?:string,JobsCreated?:number,JobsDone?:number,JobsNeedDriver?:number,CreatedUtc?:string,CreatedBy?:string,Events?:DispatchRequestEventView[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    RequestId;
    /** @type {string} */
    Code;
    /** @type {string} */
    CustomerName;
    /** @type {string} */
    CustomerPhone;
    /** @type {string} */
    CustomerEmail;
    /** @type {string} */
    Cargo;
    /** @type {number} */
    Units;
    /** @type {string} */
    FromLoc;
    /** @type {string} */
    ToLoc;
    /** @type {?number} */
    Miles;
    /** @type {string} */
    WindowText;
    /** @type {boolean} */
    IsUrgent;
    /** @type {string} */
    Notes;
    /** @type {string} */
    Source;
    /** @type {string} */
    Status;
    /** @type {string} */
    RequiredRig;
    /** @type {?number} */
    UnitsPerTruck;
    /** @type {?number} */
    RatePerLoad;
    /** @type {number} */
    UrgencyPct;
    /** @type {?number} */
    CostPerLoad;
    /** @type {?number} */
    LoadsNeeded;
    /** @type {?number} */
    QuoteTotal;
    /** @type {number} */
    QuoteVersion;
    /** @type {?string} */
    QuotedUtc;
    /** @type {string} */
    QuotedBy;
    /** @type {?string} */
    AcceptTokenExpiresUtc;
    /** @type {?string} */
    AcceptedUtc;
    /** @type {string} */
    AcceptedVia;
    /** @type {?string} */
    DeclinedUtc;
    /** @type {string} */
    DeclinedBy;
    /** @type {string} */
    DeclineReason;
    /** @type {number} */
    JobsCreated;
    /** @type {number} */
    JobsDone;
    /** @type {number} */
    JobsNeedDriver;
    /** @type {string} */
    CreatedUtc;
    /** @type {string} */
    CreatedBy;
    /** @type {DispatchRequestEventView[]} */
    Events = [];
}
export class DispatchRigCountView {
    /** @param {{RigType?:string,Rigs?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    RigType;
    /** @type {number} */
    Rigs;
}
export class DispatchCarrierPickView {
    /** @param {{VendorID?:number,VendorName?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    VendorID;
    /** @type {string} */
    VendorName;
}
export class DispatchRequestsResponse {
    /** @param {{Requests?:DispatchRequestView[],Request?:DispatchRequestView,RigCounts?:DispatchRigCountView[],Carriers?:DispatchCarrierPickView[],QuoteLink?:string,Delivery?:string,ResponseStatus?:ResponseStatus}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {DispatchRequestView[]} */
    Requests = [];
    /** @type {DispatchRequestView} */
    Request;
    /** @type {DispatchRigCountView[]} */
    RigCounts = [];
    /** @type {DispatchCarrierPickView[]} */
    Carriers = [];
    /** @type {string} */
    QuoteLink;
    /** @type {string} */
    Delivery;
    /** @type {ResponseStatus} */
    ResponseStatus;
}
export class DispatchRequestDeclineRequest {
    /** @param {{RequestId?:number,Reason?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    RequestId;
    /** @type {string} */
    Reason;
}

JavaScript DispatchRequestDeclineRequest 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}/decline HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<DispatchRequestDeclineRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Reason>String</Reason>
  <RequestId>0</RequestId>
</DispatchRequestDeclineRequest>
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>