Trendsic Platform Service

<back to all web services

CourierProfileResetRequest

Requires Authentication
The following routes are available for this service:
POST,OPTIONS/v1/dispatch/courier/profiles/{Id}/reset
"use strict";
export class CourierProfileSummary {
    /** @param {{CourierProfileID?:number,Code?:string,Name?:string,BusinessName?:string,RouteShape?:string,Enabled?:boolean,TemplateFrom?:string,Drivers?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    CourierProfileID;
    /** @type {string} */
    Code;
    /** @type {string} */
    Name;
    /** @type {string} */
    BusinessName;
    /** @type {string} */
    RouteShape;
    /** @type {boolean} */
    Enabled;
    /** @type {string} */
    TemplateFrom;
    /** @type {number} */
    Drivers;
}
export class CourierTemplateOption {
    /** @param {{Key?:string,Label?:string,Detail?:string,RouteShape?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Key;
    /** @type {string} */
    Label;
    /** @type {string} */
    Detail;
    /** @type {string} */
    RouteShape;
}
export class CourierPay {
    /** @param {{WorkerClass?:string,PerPickup?:number,PerStop?:number,PerMissed?:number,PerCancel?:number,WaitAfterMin?:number,WaitPerMin?:number,MileageOn?:boolean,PerMile?:number,MinPerJob?:number,TipsPct?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    WorkerClass;
    /** @type {number} */
    PerPickup;
    /** @type {number} */
    PerStop;
    /** @type {number} */
    PerMissed;
    /** @type {number} */
    PerCancel;
    /** @type {number} */
    WaitAfterMin;
    /** @type {number} */
    WaitPerMin;
    /** @type {boolean} */
    MileageOn;
    /** @type {number} */
    PerMile;
    /** @type {number} */
    MinPerJob;
    /** @type {number} */
    TipsPct;
}
export class CourierDispatch {
    /** @param {{PingSecs?:number,RadiusMi?:number,DeclinePenalty?:boolean,NextRule?:string,GoMin?:number,LastMin?:number,NearFull?:number,MarginMin?:number,TrafficSource?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    PingSecs;
    /** @type {number} */
    RadiusMi;
    /** @type {boolean} */
    DeclinePenalty;
    /** @type {string} */
    NextRule;
    /** @type {number} */
    GoMin;
    /** @type {number} */
    LastMin;
    /** @type {number} */
    NearFull;
    /** @type {number} */
    MarginMin;
    /** @type {string} */
    TrafficSource;
}
export class CourierMissed {
    /** @param {{WaitMin?:number,Fee?:number,CancelFee?:number,AutoRebook?:boolean,RequireContact?:boolean,RequirePhoto?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    WaitMin;
    /** @type {number} */
    Fee;
    /** @type {number} */
    CancelFee;
    /** @type {boolean} */
    AutoRebook;
    /** @type {boolean} */
    RequireContact;
    /** @type {boolean} */
    RequirePhoto;
}
export class CourierPrivacy {
    /** @param {{ThreadHrs?:number,PhotoDays?:number,LockNames?:string,HideAddr?:boolean,LiveEta?:boolean,Tipping?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    ThreadHrs;
    /** @type {number} */
    PhotoDays;
    /** @type {string} */
    LockNames;
    /** @type {boolean} */
    HideAddr;
    /** @type {boolean} */
    LiveEta;
    /** @type {boolean} */
    Tipping;
}
export class CourierPricing {
    /** @param {{Base?:number,PerUnit?:number,PerMile?:number,MinOrder?:number,TaxPct?:number,FinalAfterCount?:boolean,ServiceArea?:string[],WindowMin?:number,Surcharges?:{ [index:string]: number; }}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    Base;
    /** @type {number} */
    PerUnit;
    /** @type {number} */
    PerMile;
    /** @type {number} */
    MinOrder;
    /** @type {number} */
    TaxPct;
    /** @type {boolean} */
    FinalAfterCount;
    /** @type {string[]} */
    ServiceArea = [];
    /** @type {number} */
    WindowMin;
    /** @type {{ [index:string]: number; }} */
    Surcharges = {};
}
export class CourierBooking {
    /** @param {{On?:boolean,Slug?:string,Asap?:boolean,MinLeadMin?:number,Open?:string,Close?:string,DriveBufferMin?:number,Zips?:string[],Recurring?:boolean,PayTiming?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {boolean} */
    On;
    /** @type {string} */
    Slug;
    /** @type {boolean} */
    Asap;
    /** @type {number} */
    MinLeadMin;
    /** @type {string} */
    Open;
    /** @type {string} */
    Close;
    /** @type {number} */
    DriveBufferMin;
    /** @type {string[]} */
    Zips = [];
    /** @type {boolean} */
    Recurring;
    /** @type {string} */
    PayTiming;
}
export class CourierLevelView {
    /** @param {{Code?:string,Name?:string,InBy?:string,WithinMin?:number,Ready?:string,Days?:number[],IsOn?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Code;
    /** @type {string} */
    Name;
    /** @type {string} */
    InBy;
    /** @type {number} */
    WithinMin;
    /** @type {string} */
    Ready;
    /** @type {number[]} */
    Days = [];
    /** @type {boolean} */
    IsOn;
}
export class CourierFacilityView {
    /** @param {{Code?:string,Name?:string,Address?:string,IntakeMin?:number,Levels?:CourierLevelView[],Holidays?:string[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Code;
    /** @type {string} */
    Name;
    /** @type {string} */
    Address;
    /** @type {number} */
    IntakeMin;
    /** @type {CourierLevelView[]} */
    Levels = [];
    /** @type {string[]} */
    Holidays = [];
}
export class CourierVehicleView {
    /** @param {{EquipmentID?:number,UnitNumber?:string,Name?:string,Unit?:string,Cap?:number,Cold?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    EquipmentID;
    /** @type {string} */
    UnitNumber;
    /** @type {string} */
    Name;
    /** @type {string} */
    Unit;
    /** @type {number} */
    Cap;
    /** @type {boolean} */
    Cold;
}
export class CourierProfileContext {
    /** @param {{Drivers?:number,ProfileCount?:number,PayPlanId?:number,ZoneMode?:string,ZoneName?:string,ZoneCount?:number,HasBookingPage?:boolean,HasRateConfig?:boolean,VehicleFacts?:{ [index:string]: string; }}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    Drivers;
    /** @type {number} */
    ProfileCount;
    /** @type {?number} */
    PayPlanId;
    /** @type {string} */
    ZoneMode;
    /** @type {string} */
    ZoneName;
    /** @type {number} */
    ZoneCount;
    /** @type {boolean} */
    HasBookingPage;
    /** @type {boolean} */
    HasRateConfig;
    /** @type {{ [index:string]: string; }} */
    VehicleFacts = {};
}
export class CourierProfileView {
    /** @param {{CourierProfileID?:number,Code?:string,Name?:string,BusinessName?:string,RouteShape?:string,Enabled?:boolean,TemplateFrom?:string,UnitOne?:string,UnitMany?:string,FacilityNoun?:string,UnitOneEs?:string,UnitManyEs?:string,FacilityNounEs?:string,TagMode?:string,TagFormats?:string[],Pay?:CourierPay,Dispatch?:CourierDispatch,Missed?:CourierMissed,Privacy?:CourierPrivacy,Pricing?:CourierPricing,Booking?:CourierBooking,Facilities?:CourierFacilityView[],Vehicles?:CourierVehicleView[],Proof?:{ [index:string]: { [index:string]: string; }; },Context?:CourierProfileContext}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    CourierProfileID;
    /** @type {string} */
    Code;
    /** @type {string} */
    Name;
    /** @type {string} */
    BusinessName;
    /** @type {string} */
    RouteShape;
    /** @type {boolean} */
    Enabled;
    /** @type {string} */
    TemplateFrom;
    /** @type {string} */
    UnitOne;
    /** @type {string} */
    UnitMany;
    /** @type {string} */
    FacilityNoun;
    /** @type {string} */
    UnitOneEs;
    /** @type {string} */
    UnitManyEs;
    /** @type {string} */
    FacilityNounEs;
    /** @type {string} */
    TagMode;
    /** @type {string[]} */
    TagFormats = [];
    /** @type {CourierPay} */
    Pay;
    /** @type {CourierDispatch} */
    Dispatch;
    /** @type {CourierMissed} */
    Missed;
    /** @type {CourierPrivacy} */
    Privacy;
    /** @type {CourierPricing} */
    Pricing;
    /** @type {CourierBooking} */
    Booking;
    /** @type {CourierFacilityView[]} */
    Facilities = [];
    /** @type {CourierVehicleView[]} */
    Vehicles = [];
    /** @type {{ [index:string]: { [index:string]: string; }; }} */
    Proof = {};
    /** @type {CourierProfileContext} */
    Context;
}
export class CourierIssue {
    /** @param {{Key?:string,Section?:string,Message?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Key;
    /** @type {string} */
    Section;
    /** @type {string} */
    Message;
}
export class CourierChange {
    /** @param {{Key?:string,Section?:string,Label?:string,From?:string,To?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Key;
    /** @type {string} */
    Section;
    /** @type {string} */
    Label;
    /** @type {string} */
    From;
    /** @type {string} */
    To;
}
export class CourierPreviewLine {
    /** @param {{K?:string,V?:string,Dot?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    K;
    /** @type {string} */
    V;
    /** @type {string} */
    Dot;
}
export class CourierPreview {
    /** @param {{DeadlineTitle?:string,DeadlineLead?:string,RoomW?:string,LastW?:string,GoW?:string,Zones?:CourierPreviewLine[],PaySub?:string,PayRows?:CourierPreviewLine[],PayTotal?:string,ProofRows?:CourierPreviewLine[],Ping?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    DeadlineTitle;
    /** @type {string} */
    DeadlineLead;
    /** @type {string} */
    RoomW;
    /** @type {string} */
    LastW;
    /** @type {string} */
    GoW;
    /** @type {CourierPreviewLine[]} */
    Zones = [];
    /** @type {string} */
    PaySub;
    /** @type {CourierPreviewLine[]} */
    PayRows = [];
    /** @type {string} */
    PayTotal;
    /** @type {CourierPreviewLine[]} */
    ProofRows = [];
    /** @type {string} */
    Ping;
}
export class CourierFleetVehicle {
    /** @param {{EquipmentID?:number,UnitNumber?:string,Name?:string,VehicleType?:string,Unit?:string,Cap?:number,Cold?:boolean,Status?:string,Assigned?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    EquipmentID;
    /** @type {string} */
    UnitNumber;
    /** @type {string} */
    Name;
    /** @type {string} */
    VehicleType;
    /** @type {string} */
    Unit;
    /** @type {?number} */
    Cap;
    /** @type {boolean} */
    Cold;
    /** @type {string} */
    Status;
    /** @type {boolean} */
    Assigned;
}
export class CourierResponse {
    /** @param {{Profiles?:CourierProfileSummary[],Templates?:CourierTemplateOption[],Profile?:CourierProfileView,Issues?:CourierIssue[],Changes?:CourierChange[],Preview?:CourierPreview,Fleet?:CourierFleetVehicle[],ResponseStatus?:ResponseStatus}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {CourierProfileSummary[]} */
    Profiles = [];
    /** @type {CourierTemplateOption[]} */
    Templates = [];
    /** @type {CourierProfileView} */
    Profile;
    /** @type {CourierIssue[]} */
    Issues = [];
    /** @type {CourierChange[]} */
    Changes = [];
    /** @type {CourierPreview} */
    Preview;
    /** @type {CourierFleetVehicle[]} */
    Fleet = [];
    /** @type {ResponseStatus} */
    ResponseStatus;
}
export class CourierProfileResetRequest {
    /** @param {{Id?:number,DryRun?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    Id;
    /** @type {boolean} */
    DryRun;
}

JavaScript CourierProfileResetRequest 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/courier/profiles/{Id}/reset HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

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

<CourierResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Changes>
    <CourierChange>
      <From>String</From>
      <Key>String</Key>
      <Label>String</Label>
      <Section>String</Section>
      <To>String</To>
    </CourierChange>
  </Changes>
  <Fleet>
    <CourierFleetVehicle>
      <Assigned>false</Assigned>
      <Cap>0</Cap>
      <Cold>false</Cold>
      <EquipmentID>0</EquipmentID>
      <Name>String</Name>
      <Status>String</Status>
      <Unit>String</Unit>
      <UnitNumber>String</UnitNumber>
      <VehicleType>String</VehicleType>
    </CourierFleetVehicle>
  </Fleet>
  <Issues>
    <CourierIssue>
      <Key>String</Key>
      <Message>String</Message>
      <Section>String</Section>
    </CourierIssue>
  </Issues>
  <Preview>
    <DeadlineLead>String</DeadlineLead>
    <DeadlineTitle>String</DeadlineTitle>
    <GoW>String</GoW>
    <LastW>String</LastW>
    <PayRows>
      <CourierPreviewLine>
        <Dot>String</Dot>
        <K>String</K>
        <V>String</V>
      </CourierPreviewLine>
    </PayRows>
    <PaySub>String</PaySub>
    <PayTotal>String</PayTotal>
    <Ping>String</Ping>
    <ProofRows>
      <CourierPreviewLine>
        <Dot>String</Dot>
        <K>String</K>
        <V>String</V>
      </CourierPreviewLine>
    </ProofRows>
    <RoomW>String</RoomW>
    <Zones>
      <CourierPreviewLine>
        <Dot>String</Dot>
        <K>String</K>
        <V>String</V>
      </CourierPreviewLine>
    </Zones>
  </Preview>
  <Profile>
    <Booking>
      <Asap>false</Asap>
      <Close>String</Close>
      <DriveBufferMin>0</DriveBufferMin>
      <MinLeadMin>0</MinLeadMin>
      <On>false</On>
      <Open>String</Open>
      <PayTiming>String</PayTiming>
      <Recurring>false</Recurring>
      <Slug>String</Slug>
      <Zips xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </Zips>
    </Booking>
    <BusinessName>String</BusinessName>
    <Code>String</Code>
    <Context>
      <Drivers>0</Drivers>
      <HasBookingPage>false</HasBookingPage>
      <HasRateConfig>false</HasRateConfig>
      <PayPlanId>0</PayPlanId>
      <ProfileCount>0</ProfileCount>
      <VehicleFacts xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:KeyValueOfstringstring>
          <d4p1:Key>String</d4p1:Key>
          <d4p1:Value>String</d4p1:Value>
        </d4p1:KeyValueOfstringstring>
      </VehicleFacts>
      <ZoneCount>0</ZoneCount>
      <ZoneMode>String</ZoneMode>
      <ZoneName>String</ZoneName>
    </Context>
    <CourierProfileID>0</CourierProfileID>
    <Dispatch>
      <DeclinePenalty>false</DeclinePenalty>
      <GoMin>0</GoMin>
      <LastMin>0</LastMin>
      <MarginMin>0</MarginMin>
      <NearFull>0</NearFull>
      <NextRule>String</NextRule>
      <PingSecs>0</PingSecs>
      <RadiusMi>0</RadiusMi>
      <TrafficSource>String</TrafficSource>
    </Dispatch>
    <Enabled>false</Enabled>
    <Facilities>
      <CourierFacilityView>
        <Address>String</Address>
        <Code>String</Code>
        <Holidays xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:string>String</d5p1:string>
        </Holidays>
        <IntakeMin>0</IntakeMin>
        <Levels>
          <CourierLevelView>
            <Code>String</Code>
            <Days xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
              <d7p1:int>0</d7p1:int>
            </Days>
            <InBy>String</InBy>
            <IsOn>false</IsOn>
            <Name>String</Name>
            <Ready>String</Ready>
            <WithinMin>0</WithinMin>
          </CourierLevelView>
        </Levels>
        <Name>String</Name>
      </CourierFacilityView>
    </Facilities>
    <FacilityNoun>String</FacilityNoun>
    <FacilityNounEs>String</FacilityNounEs>
    <Missed>
      <AutoRebook>false</AutoRebook>
      <CancelFee>0</CancelFee>
      <Fee>0</Fee>
      <RequireContact>false</RequireContact>
      <RequirePhoto>false</RequirePhoto>
      <WaitMin>0</WaitMin>
    </Missed>
    <Name>String</Name>
    <Pay>
      <MileageOn>false</MileageOn>
      <MinPerJob>0</MinPerJob>
      <PerCancel>0</PerCancel>
      <PerMile>0</PerMile>
      <PerMissed>0</PerMissed>
      <PerPickup>0</PerPickup>
      <PerStop>0</PerStop>
      <TipsPct>0</TipsPct>
      <WaitAfterMin>0</WaitAfterMin>
      <WaitPerMin>0</WaitPerMin>
      <WorkerClass>String</WorkerClass>
    </Pay>
    <Pricing>
      <Base>0</Base>
      <FinalAfterCount>false</FinalAfterCount>
      <MinOrder>0</MinOrder>
      <PerMile>0</PerMile>
      <PerUnit>0</PerUnit>
      <ServiceArea xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </ServiceArea>
      <Surcharges xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:KeyValueOfstringdecimal>
          <d4p1:Key>String</d4p1:Key>
          <d4p1:Value>0</d4p1:Value>
        </d4p1:KeyValueOfstringdecimal>
      </Surcharges>
      <TaxPct>0</TaxPct>
      <WindowMin>0</WindowMin>
    </Pricing>
    <Privacy>
      <HideAddr>false</HideAddr>
      <LiveEta>false</LiveEta>
      <LockNames>String</LockNames>
      <PhotoDays>0</PhotoDays>
      <ThreadHrs>0</ThreadHrs>
      <Tipping>false</Tipping>
    </Privacy>
    <Proof xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringArrayOfKeyValueOfstringstringty7Ep6D1>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>
          <d3p1:KeyValueOfstringstring>
            <d3p1:Key>String</d3p1:Key>
            <d3p1:Value>String</d3p1:Value>
          </d3p1:KeyValueOfstringstring>
        </d3p1:Value>
      </d3p1:KeyValueOfstringArrayOfKeyValueOfstringstringty7Ep6D1>
    </Proof>
    <RouteShape>String</RouteShape>
    <TagFormats xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:string>String</d3p1:string>
    </TagFormats>
    <TagMode>String</TagMode>
    <TemplateFrom>String</TemplateFrom>
    <UnitMany>String</UnitMany>
    <UnitManyEs>String</UnitManyEs>
    <UnitOne>String</UnitOne>
    <UnitOneEs>String</UnitOneEs>
    <Vehicles>
      <CourierVehicleView>
        <Cap>0</Cap>
        <Cold>false</Cold>
        <EquipmentID>0</EquipmentID>
        <Name>String</Name>
        <Unit>String</Unit>
        <UnitNumber>String</UnitNumber>
      </CourierVehicleView>
    </Vehicles>
  </Profile>
  <Profiles>
    <CourierProfileSummary>
      <BusinessName>String</BusinessName>
      <Code>String</Code>
      <CourierProfileID>0</CourierProfileID>
      <Drivers>0</Drivers>
      <Enabled>false</Enabled>
      <Name>String</Name>
      <RouteShape>String</RouteShape>
      <TemplateFrom>String</TemplateFrom>
    </CourierProfileSummary>
  </Profiles>
  <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>
  <Templates>
    <CourierTemplateOption>
      <Detail>String</Detail>
      <Key>String</Key>
      <Label>String</Label>
      <RouteShape>String</RouteShape>
    </CourierTemplateOption>
  </Templates>
</CourierResponse>