Trendsic Platform Service

<back to all web services

CourierTrackUnitsRequest

The following routes are available for this service:
POST,OPTIONS/v1/dispatch/track/{Token}/units
"use strict";
export class CourierTrackActRequest {
    /** @param {{Token?:string,ActToken?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Token;
    /** @type {string} */
    ActToken;
}
export class DispatchTrackStepView {
    /** @param {{Name?:string,At?:string,Done?:boolean,Current?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Name;
    /** @type {?string} */
    At;
    /** @type {boolean} */
    Done;
    /** @type {boolean} */
    Current;
}
export class CourierTrackBusiness {
    /** @param {{Name?:string,Phone?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Name;
    /** @type {string} */
    Phone;
}
export class CourierTrackDriver {
    /** @param {{FirstName?:string,Initial?:string,Vehicle?:string,Plate?:string,EtaMin?:number,EtaPct?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    FirstName;
    /** @type {string} */
    Initial;
    /** @type {string} */
    Vehicle;
    /** @type {string} */
    Plate;
    /** @type {?number} */
    EtaMin;
    /** @type {?number} */
    EtaPct;
}
export class CourierTrackProof {
    /** @param {{Kind?:string,PhotoUrl?:string,AtText?:string,GpsOk?:boolean,Units?:number,DamageNote?:string,DeliveredTo?:string,WaitedMin?:number,Attempts?:number,ContactedText?:string,EachTagged?:boolean,EachScanned?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Kind;
    /** @type {string} */
    PhotoUrl;
    /** @type {string} */
    AtText;
    /** @type {boolean} */
    GpsOk;
    /** @type {number} */
    Units;
    /** @type {string} */
    DamageNote;
    /** @type {string} */
    DeliveredTo;
    /** @type {number} */
    WaitedMin;
    /** @type {number} */
    Attempts;
    /** @type {string} */
    ContactedText;
    /** @type {boolean} */
    EachTagged;
    /** @type {boolean} */
    EachScanned;
}
export class CourierTrackRating {
    /** @param {{Stars?:number,Tags?:string,Tip?:number,TipStatus?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    Stars;
    /** @type {string} */
    Tags;
    /** @type {number} */
    Tip;
    /** @type {string} */
    TipStatus;
}
export class CourierTrackSlot {
    /** @param {{Id?:string,Day?:string,DayEs?:string,Win?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Id;
    /** @type {string} */
    Day;
    /** @type {string} */
    DayEs;
    /** @type {string} */
    Win;
}
export class CourierTrackMissed {
    /** @param {{Code?:string,Fee?:number,WaitedMin?:number,AutoRebook?:boolean,RebookWindowText?:string,Slots?:CourierTrackSlot[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Code;
    /** @type {number} */
    Fee;
    /** @type {number} */
    WaitedMin;
    /** @type {boolean} */
    AutoRebook;
    /** @type {string} */
    RebookWindowText;
    /** @type {CourierTrackSlot[]} */
    Slots = [];
}
export class CourierTrackCan {
    /** @param {{EditInstructions?:boolean,ChangeUnits?:boolean,Cancel?:boolean,RescheduleDelivery?:boolean,Rebook?:boolean,Rate?:boolean,Message?:boolean,Report?:boolean,MaxUnits?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {boolean} */
    EditInstructions;
    /** @type {boolean} */
    ChangeUnits;
    /** @type {boolean} */
    Cancel;
    /** @type {boolean} */
    RescheduleDelivery;
    /** @type {boolean} */
    Rebook;
    /** @type {boolean} */
    Rate;
    /** @type {boolean} */
    Message;
    /** @type {boolean} */
    Report;
    /** @type {number} */
    MaxUnits;
}
export class CourierTrackMessage {
    /** @param {{Who?:string,Mine?:boolean,Office?:boolean,AtText?:string,Body?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Who;
    /** @type {boolean} */
    Mine;
    /** @type {boolean} */
    Office;
    /** @type {string} */
    AtText;
    /** @type {string} */
    Body;
}
export class CourierTrackView {
    /** @param {{State?:string,Code?:string,RunCode?:string,Shape?:string,Template?:string,CourierStep?:string,UnitOne?:string,UnitMany?:string,UnitOneEs?:string,UnitManyEs?:string,FacilityNoun?:string,FacilityNounEs?:string,Units?:number,UnitsCounted?:boolean,Address?:string,DropoffAddress?:string,DropoffName?:string,Instructions?:string,GateCode?:string,Handoff?:string,LevelName?:string,ReadyPromise?:string,WindowText?:string,IsAsap?:boolean,Times?:{ [index:string]: string; },StopPosition?:number,StopCount?:number,DeliveryWindowText?:string,Driver?:CourierTrackDriver,Proof?:CourierTrackProof,HandoffCode?:string,Rating?:CourierTrackRating,TipAllowed?:boolean,TipsPct?:number,Missed?:CourierTrackMissed,CancelFee?:number,CancelFeeCharged?:number,CancelledBy?:string,BookUrl?:string,Can?:CourierTrackCan,DeliverySlots?:CourierTrackSlot[],Messages?:CourierTrackMessage[],MessagesOpen?:boolean,CaseCode?:string,CaseStatus?:string,CaseReply?:string,ThreadHrs?:number,ExpiresUtc?:string,LiveEta?:boolean,Live?:boolean,ServerUtc?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    State;
    /** @type {string} */
    Code;
    /** @type {string} */
    RunCode;
    /** @type {string} */
    Shape;
    /** @type {string} */
    Template;
    /** @type {string} */
    CourierStep;
    /** @type {string} */
    UnitOne;
    /** @type {string} */
    UnitMany;
    /** @type {string} */
    UnitOneEs;
    /** @type {string} */
    UnitManyEs;
    /** @type {string} */
    FacilityNoun;
    /** @type {string} */
    FacilityNounEs;
    /** @type {number} */
    Units;
    /** @type {boolean} */
    UnitsCounted;
    /** @type {string} */
    Address;
    /** @type {string} */
    DropoffAddress;
    /** @type {string} */
    DropoffName;
    /** @type {string} */
    Instructions;
    /** @type {string} */
    GateCode;
    /** @type {string} */
    Handoff;
    /** @type {string} */
    LevelName;
    /** @type {string} */
    ReadyPromise;
    /** @type {string} */
    WindowText;
    /** @type {boolean} */
    IsAsap;
    /** @type {{ [index:string]: string; }} */
    Times = {};
    /** @type {?number} */
    StopPosition;
    /** @type {?number} */
    StopCount;
    /** @type {string} */
    DeliveryWindowText;
    /** @type {CourierTrackDriver} */
    Driver;
    /** @type {CourierTrackProof} */
    Proof;
    /** @type {string} */
    HandoffCode;
    /** @type {CourierTrackRating} */
    Rating;
    /** @type {boolean} */
    TipAllowed;
    /** @type {number} */
    TipsPct;
    /** @type {CourierTrackMissed} */
    Missed;
    /** @type {number} */
    CancelFee;
    /** @type {number} */
    CancelFeeCharged;
    /** @type {string} */
    CancelledBy;
    /** @type {string} */
    BookUrl;
    /** @type {CourierTrackCan} */
    Can;
    /** @type {CourierTrackSlot[]} */
    DeliverySlots = [];
    /** @type {CourierTrackMessage[]} */
    Messages = [];
    /** @type {boolean} */
    MessagesOpen;
    /** @type {string} */
    CaseCode;
    /** @type {string} */
    CaseStatus;
    /** @type {string} */
    CaseReply;
    /** @type {number} */
    ThreadHrs;
    /** @type {?string} */
    ExpiresUtc;
    /** @type {boolean} */
    LiveEta;
    /** @type {boolean} */
    Live;
    /** @type {string} */
    ServerUtc;
}
export class DispatchTrackResponse {
    /** @param {{Kind?:string,Code?:string,What?:string,FromLoc?:string,ToLoc?:string,Bags?:number,Fare?:number,PayMode?:string,CardLast4?:string,Charged?:boolean,Stage?:string,Headline?:string,Sub?:string,IsClosed?:boolean,Eta?:string,DriverName?:string,CustomerName?:string,Steps?:DispatchTrackStepView[],Expired?:boolean,Invalid?:boolean,Business?:CourierTrackBusiness,Courier?:CourierTrackView,Notice?:string,ResponseStatus?:ResponseStatus}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Kind;
    /** @type {string} */
    Code;
    /** @type {string} */
    What;
    /** @type {string} */
    FromLoc;
    /** @type {string} */
    ToLoc;
    /** @type {?number} */
    Bags;
    /** @type {?number} */
    Fare;
    /** @type {string} */
    PayMode;
    /** @type {string} */
    CardLast4;
    /** @type {boolean} */
    Charged;
    /** @type {string} */
    Stage;
    /** @type {string} */
    Headline;
    /** @type {string} */
    Sub;
    /** @type {boolean} */
    IsClosed;
    /** @type {string} */
    Eta;
    /** @type {string} */
    DriverName;
    /** @type {string} */
    CustomerName;
    /** @type {DispatchTrackStepView[]} */
    Steps = [];
    /** @type {boolean} */
    Expired;
    /** @type {boolean} */
    Invalid;
    /** @type {CourierTrackBusiness} */
    Business;
    /** @type {CourierTrackView} */
    Courier;
    /** @type {string} */
    Notice;
    /** @type {ResponseStatus} */
    ResponseStatus;
}
export class CourierTrackUnitsRequest extends CourierTrackActRequest {
    /** @param {{Count?:number,Token?:string,ActToken?:string}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {number} */
    Count;
}

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

<CourierTrackUnitsRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <ActToken>String</ActToken>
  <Token>String</Token>
  <Count>0</Count>
</CourierTrackUnitsRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<DispatchTrackResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Bags>0</Bags>
  <Business>
    <Name>String</Name>
    <Phone>String</Phone>
  </Business>
  <CardLast4>String</CardLast4>
  <Charged>false</Charged>
  <Code>String</Code>
  <Courier>
    <Address>String</Address>
    <BookUrl>String</BookUrl>
    <Can>
      <Cancel>false</Cancel>
      <ChangeUnits>false</ChangeUnits>
      <EditInstructions>false</EditInstructions>
      <MaxUnits>0</MaxUnits>
      <Message>false</Message>
      <Rate>false</Rate>
      <Rebook>false</Rebook>
      <Report>false</Report>
      <RescheduleDelivery>false</RescheduleDelivery>
    </Can>
    <CancelFee>0</CancelFee>
    <CancelFeeCharged>0</CancelFeeCharged>
    <CancelledBy>String</CancelledBy>
    <CaseCode>String</CaseCode>
    <CaseReply>String</CaseReply>
    <CaseStatus>String</CaseStatus>
    <Code>String</Code>
    <CourierStep>String</CourierStep>
    <DeliverySlots>
      <CourierTrackSlot>
        <Day>String</Day>
        <DayEs>String</DayEs>
        <Id>String</Id>
        <Win>String</Win>
      </CourierTrackSlot>
    </DeliverySlots>
    <DeliveryWindowText>String</DeliveryWindowText>
    <Driver>
      <EtaMin>0</EtaMin>
      <EtaPct>0</EtaPct>
      <FirstName>String</FirstName>
      <Initial>String</Initial>
      <Plate>String</Plate>
      <Vehicle>String</Vehicle>
    </Driver>
    <DropoffAddress>String</DropoffAddress>
    <DropoffName>String</DropoffName>
    <ExpiresUtc>0001-01-01T00:00:00</ExpiresUtc>
    <FacilityNoun>String</FacilityNoun>
    <FacilityNounEs>String</FacilityNounEs>
    <GateCode>String</GateCode>
    <Handoff>String</Handoff>
    <HandoffCode>String</HandoffCode>
    <Instructions>String</Instructions>
    <IsAsap>false</IsAsap>
    <LevelName>String</LevelName>
    <Live>false</Live>
    <LiveEta>false</LiveEta>
    <Messages>
      <CourierTrackMessage>
        <AtText>String</AtText>
        <Body>String</Body>
        <Mine>false</Mine>
        <Office>false</Office>
        <Who>String</Who>
      </CourierTrackMessage>
    </Messages>
    <MessagesOpen>false</MessagesOpen>
    <Missed>
      <AutoRebook>false</AutoRebook>
      <Code>String</Code>
      <Fee>0</Fee>
      <RebookWindowText>String</RebookWindowText>
      <Slots>
        <CourierTrackSlot>
          <Day>String</Day>
          <DayEs>String</DayEs>
          <Id>String</Id>
          <Win>String</Win>
        </CourierTrackSlot>
      </Slots>
      <WaitedMin>0</WaitedMin>
    </Missed>
    <Proof>
      <AtText>String</AtText>
      <Attempts>0</Attempts>
      <ContactedText>String</ContactedText>
      <DamageNote>String</DamageNote>
      <DeliveredTo>String</DeliveredTo>
      <EachScanned>false</EachScanned>
      <EachTagged>false</EachTagged>
      <GpsOk>false</GpsOk>
      <Kind>String</Kind>
      <PhotoUrl>String</PhotoUrl>
      <Units>0</Units>
      <WaitedMin>0</WaitedMin>
    </Proof>
    <Rating>
      <Stars>0</Stars>
      <Tags>String</Tags>
      <Tip>0</Tip>
      <TipStatus>String</TipStatus>
    </Rating>
    <ReadyPromise>String</ReadyPromise>
    <RunCode>String</RunCode>
    <ServerUtc>0001-01-01T00:00:00</ServerUtc>
    <Shape>String</Shape>
    <State>String</State>
    <StopCount>0</StopCount>
    <StopPosition>0</StopPosition>
    <Template>String</Template>
    <ThreadHrs>0</ThreadHrs>
    <Times xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </Times>
    <TipAllowed>false</TipAllowed>
    <TipsPct>0</TipsPct>
    <UnitMany>String</UnitMany>
    <UnitManyEs>String</UnitManyEs>
    <UnitOne>String</UnitOne>
    <UnitOneEs>String</UnitOneEs>
    <Units>0</Units>
    <UnitsCounted>false</UnitsCounted>
    <WindowText>String</WindowText>
  </Courier>
  <CustomerName>String</CustomerName>
  <DriverName>String</DriverName>
  <Eta>String</Eta>
  <Expired>false</Expired>
  <Fare>0</Fare>
  <FromLoc>String</FromLoc>
  <Headline>String</Headline>
  <Invalid>false</Invalid>
  <IsClosed>false</IsClosed>
  <Kind>String</Kind>
  <Notice>String</Notice>
  <PayMode>String</PayMode>
  <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>
  <Stage>String</Stage>
  <Steps>
    <DispatchTrackStepView>
      <At>0001-01-01T00:00:00</At>
      <Current>false</Current>
      <Done>false</Done>
      <Name>String</Name>
    </DispatchTrackStepView>
  </Steps>
  <Sub>String</Sub>
  <ToLoc>String</ToLoc>
  <What>String</What>
</DispatchTrackResponse>