Trendsic Platform Service

<back to all web services

CourierRunUpdateRequest

Requires Authentication
The following routes are available for this service:
PUT,OPTIONS/v1/dispatch/courier/runs/{Id}
"use strict";
export class CourierItemView {
    /** @param {{CourierItemID?:number,DispatchOdRequestID?:number,Seq?:number,TagCode?:string,Custody?:string,IsOpen?:boolean,IsMissing?:boolean,MissingReason?:string,IsManual?:boolean,ReTagFlag?:boolean,Scanned?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    CourierItemID;
    /** @type {number} */
    DispatchOdRequestID;
    /** @type {number} */
    Seq;
    /** @type {string} */
    TagCode;
    /** @type {string} */
    Custody;
    /** @type {boolean} */
    IsOpen;
    /** @type {boolean} */
    IsMissing;
    /** @type {string} */
    MissingReason;
    /** @type {boolean} */
    IsManual;
    /** @type {boolean} */
    ReTagFlag;
    /** @type {boolean} */
    Scanned;
}
export class CourierStopView {
    /** @param {{Sequence?:number,Status?:string,DispatchOdRequestID?:number,Code?:string,CourierStep?:string,Address?:string,Unit?:string,City?:string,Zip?:string,Lat?:number,Lng?:number,CustomerName?:string,CustomerPhone?:string,Handoff?:string,GateCode?:string,Instructions?:string,Units?:number,DueText?:string,Note?:string,Needs?:string[],Items?:CourierItemView[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    Sequence;
    /** @type {string} */
    Status;
    /** @type {number} */
    DispatchOdRequestID;
    /** @type {string} */
    Code;
    /** @type {string} */
    CourierStep;
    /** @type {string} */
    Address;
    /** @type {string} */
    Unit;
    /** @type {string} */
    City;
    /** @type {string} */
    Zip;
    /** @type {?number} */
    Lat;
    /** @type {?number} */
    Lng;
    /** @type {string} */
    CustomerName;
    /** @type {string} */
    CustomerPhone;
    /** @type {string} */
    Handoff;
    /** @type {string} */
    GateCode;
    /** @type {string} */
    Instructions;
    /** @type {number} */
    Units;
    /** @type {string} */
    DueText;
    /** @type {string} */
    Note;
    /** @type {string[]} */
    Needs = [];
    /** @type {CourierItemView[]} */
    Items = [];
}
export class CourierRunView {
    /** @param {{CourierRunID?:number,Code?:string,Status?:string,CourierProfileId?:number,ProfileName?:string,CourierFacilityId?:number,FacilityName?:string,FacilityAddress?:string,DriverContactId?:number,DriverName?:string,EquipmentID?:number,VehicleUnit?:string,UnitOne?:string,UnitMany?:string,Units?:number,StopCount?:number,StopsDone?:number,Pay?:number,BuiltUtc?:string,StartedUtc?:string,CompletedUtc?:string,ToLoad?:number,ToReturn?:number,Stops?:CourierStopView[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    CourierRunID;
    /** @type {string} */
    Code;
    /** @type {string} */
    Status;
    /** @type {number} */
    CourierProfileId;
    /** @type {string} */
    ProfileName;
    /** @type {number} */
    CourierFacilityId;
    /** @type {string} */
    FacilityName;
    /** @type {string} */
    FacilityAddress;
    /** @type {?number} */
    DriverContactId;
    /** @type {string} */
    DriverName;
    /** @type {?number} */
    EquipmentID;
    /** @type {string} */
    VehicleUnit;
    /** @type {string} */
    UnitOne;
    /** @type {string} */
    UnitMany;
    /** @type {number} */
    Units;
    /** @type {number} */
    StopCount;
    /** @type {number} */
    StopsDone;
    /** @type {?number} */
    Pay;
    /** @type {?string} */
    BuiltUtc;
    /** @type {?string} */
    StartedUtc;
    /** @type {?string} */
    CompletedUtc;
    /** @type {number} */
    ToLoad;
    /** @type {number} */
    ToReturn;
    /** @type {CourierStopView[]} */
    Stops = [];
}
export class CourierRunResponse {
    /** @param {{Runs?:CourierRunView[],Run?:CourierRunView,Message?:string,ResponseStatus?:ResponseStatus}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {CourierRunView[]} */
    Runs = [];
    /** @type {CourierRunView} */
    Run;
    /** @type {string} */
    Message;
    /** @type {ResponseStatus} */
    ResponseStatus;
}
export class CourierRunUpdateRequest {
    /** @param {{Id?:number,Codes?:string[],DriverContactId?:number,ClearDriver?:boolean,EquipmentID?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    Id;
    /** @type {string[]} */
    Codes = [];
    /** @type {?number} */
    DriverContactId;
    /** @type {boolean} */
    ClearDriver;
    /** @type {?number} */
    EquipmentID;
}

JavaScript CourierRunUpdateRequest 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.

PUT /v1/dispatch/courier/runs/{Id} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<CourierRunUpdateRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <ClearDriver>false</ClearDriver>
  <Codes xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>String</d2p1:string>
  </Codes>
  <DriverContactId>0</DriverContactId>
  <EquipmentID>0</EquipmentID>
  <Id>0</Id>
</CourierRunUpdateRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<CourierRunResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Message>String</Message>
  <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>
  <Run>
    <BuiltUtc>0001-01-01T00:00:00</BuiltUtc>
    <Code>String</Code>
    <CompletedUtc>0001-01-01T00:00:00</CompletedUtc>
    <CourierFacilityId>0</CourierFacilityId>
    <CourierProfileId>0</CourierProfileId>
    <CourierRunID>0</CourierRunID>
    <DriverContactId>0</DriverContactId>
    <DriverName>String</DriverName>
    <EquipmentID>0</EquipmentID>
    <FacilityAddress>String</FacilityAddress>
    <FacilityName>String</FacilityName>
    <Pay>0</Pay>
    <ProfileName>String</ProfileName>
    <StartedUtc>0001-01-01T00:00:00</StartedUtc>
    <Status>String</Status>
    <StopCount>0</StopCount>
    <Stops>
      <CourierStopView>
        <Address>String</Address>
        <City>String</City>
        <Code>String</Code>
        <CourierStep>String</CourierStep>
        <CustomerName>String</CustomerName>
        <CustomerPhone>String</CustomerPhone>
        <DispatchOdRequestID>0</DispatchOdRequestID>
        <DueText>String</DueText>
        <GateCode>String</GateCode>
        <Handoff>String</Handoff>
        <Instructions>String</Instructions>
        <Items>
          <CourierItemView>
            <CourierItemID>0</CourierItemID>
            <Custody>String</Custody>
            <DispatchOdRequestID>0</DispatchOdRequestID>
            <IsManual>false</IsManual>
            <IsMissing>false</IsMissing>
            <IsOpen>false</IsOpen>
            <MissingReason>String</MissingReason>
            <ReTagFlag>false</ReTagFlag>
            <Scanned>false</Scanned>
            <Seq>0</Seq>
            <TagCode>String</TagCode>
          </CourierItemView>
        </Items>
        <Lat>0</Lat>
        <Lng>0</Lng>
        <Needs xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:string>String</d5p1:string>
        </Needs>
        <Note>String</Note>
        <Sequence>0</Sequence>
        <Status>String</Status>
        <Unit>String</Unit>
        <Units>0</Units>
        <Zip>String</Zip>
      </CourierStopView>
    </Stops>
    <StopsDone>0</StopsDone>
    <ToLoad>0</ToLoad>
    <ToReturn>0</ToReturn>
    <UnitMany>String</UnitMany>
    <UnitOne>String</UnitOne>
    <Units>0</Units>
    <VehicleUnit>String</VehicleUnit>
  </Run>
  <Runs>
    <CourierRunView>
      <BuiltUtc>0001-01-01T00:00:00</BuiltUtc>
      <Code>String</Code>
      <CompletedUtc>0001-01-01T00:00:00</CompletedUtc>
      <CourierFacilityId>0</CourierFacilityId>
      <CourierProfileId>0</CourierProfileId>
      <CourierRunID>0</CourierRunID>
      <DriverContactId>0</DriverContactId>
      <DriverName>String</DriverName>
      <EquipmentID>0</EquipmentID>
      <FacilityAddress>String</FacilityAddress>
      <FacilityName>String</FacilityName>
      <Pay>0</Pay>
      <ProfileName>String</ProfileName>
      <StartedUtc>0001-01-01T00:00:00</StartedUtc>
      <Status>String</Status>
      <StopCount>0</StopCount>
      <Stops>
        <CourierStopView>
          <Address>String</Address>
          <City>String</City>
          <Code>String</Code>
          <CourierStep>String</CourierStep>
          <CustomerName>String</CustomerName>
          <CustomerPhone>String</CustomerPhone>
          <DispatchOdRequestID>0</DispatchOdRequestID>
          <DueText>String</DueText>
          <GateCode>String</GateCode>
          <Handoff>String</Handoff>
          <Instructions>String</Instructions>
          <Items>
            <CourierItemView>
              <CourierItemID>0</CourierItemID>
              <Custody>String</Custody>
              <DispatchOdRequestID>0</DispatchOdRequestID>
              <IsManual>false</IsManual>
              <IsMissing>false</IsMissing>
              <IsOpen>false</IsOpen>
              <MissingReason>String</MissingReason>
              <ReTagFlag>false</ReTagFlag>
              <Scanned>false</Scanned>
              <Seq>0</Seq>
              <TagCode>String</TagCode>
            </CourierItemView>
          </Items>
          <Lat>0</Lat>
          <Lng>0</Lng>
          <Needs xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
            <d6p1:string>String</d6p1:string>
          </Needs>
          <Note>String</Note>
          <Sequence>0</Sequence>
          <Status>String</Status>
          <Unit>String</Unit>
          <Units>0</Units>
          <Zip>String</Zip>
        </CourierStopView>
      </Stops>
      <StopsDone>0</StopsDone>
      <ToLoad>0</ToLoad>
      <ToReturn>0</ToReturn>
      <UnitMany>String</UnitMany>
      <UnitOne>String</UnitOne>
      <Units>0</Units>
      <VehicleUnit>String</VehicleUnit>
    </CourierRunView>
  </Runs>
</CourierRunResponse>