Trendsic Platform Service

<back to all web services

CourierBookPageRequest

The following routes are available for this service:
GET,OPTIONS/v1/book/{Slug}
"use strict";
export class CourierTrackBusiness {
    /** @param {{Name?:string,Phone?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Name;
    /** @type {string} */
    Phone;
}
export class CourierBookLevel {
    /** @param {{Code?:string,Name?:string,Ready?:string,WithinMin?:number,InBy?:string,Surcharge?:number,Days?:number[],DeadlineMin?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Code;
    /** @type {string} */
    Name;
    /** @type {string} */
    Ready;
    /** @type {number} */
    WithinMin;
    /** @type {string} */
    InBy;
    /** @type {number} */
    Surcharge;
    /** @type {number[]} */
    Days = [];
    /** @type {?number} */
    DeadlineMin;
}
export class HandoffOptions {
    /** @param {{Hand?:boolean,Porch?:boolean,Desk?:boolean,SigRequired?:boolean,IdRequired?:boolean,CodeRequired?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {boolean} */
    Hand;
    /** @type {boolean} */
    Porch;
    /** @type {boolean} */
    Desk;
    /** @type {boolean} */
    SigRequired;
    /** @type {boolean} */
    IdRequired;
    /** @type {boolean} */
    CodeRequired;
}
export class CourierBookProfile {
    /** @param {{Code?:string,Name?:string,Shape?:string,Template?:string,UnitOne?:string,UnitMany?:string,UnitOneEs?:string,UnitManyEs?:string,FacilityNoun?:string,FacilityNounEs?:string,FacilityName?:string,Levels?:CourierBookLevel[],Asap?:boolean,Recurring?:boolean,PayTiming?:string,FinalAfterCount?:boolean,CancelFee?:number,MissedFee?:number,MissedWaitMin?:number,ServiceArea?:string[],Zips?:string[],Handoffs?:HandoffOptions}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Code;
    /** @type {string} */
    Name;
    /** @type {string} */
    Shape;
    /** @type {string} */
    Template;
    /** @type {string} */
    UnitOne;
    /** @type {string} */
    UnitMany;
    /** @type {string} */
    UnitOneEs;
    /** @type {string} */
    UnitManyEs;
    /** @type {string} */
    FacilityNoun;
    /** @type {string} */
    FacilityNounEs;
    /** @type {string} */
    FacilityName;
    /** @type {CourierBookLevel[]} */
    Levels = [];
    /** @type {boolean} */
    Asap;
    /** @type {boolean} */
    Recurring;
    /** @type {string} */
    PayTiming;
    /** @type {boolean} */
    FinalAfterCount;
    /** @type {number} */
    CancelFee;
    /** @type {number} */
    MissedFee;
    /** @type {number} */
    MissedWaitMin;
    /** @type {string[]} */
    ServiceArea = [];
    /** @type {string[]} */
    Zips = [];
    /** @type {HandoffOptions} */
    Handoffs;
}
export class CourierBookProfileLink {
    /** @param {{Code?:string,Name?:string,Shape?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Code;
    /** @type {string} */
    Name;
    /** @type {string} */
    Shape;
}
export class CourierBookPageView {
    /** @param {{Available?:boolean,BookingOn?:boolean,Business?:CourierTrackBusiness,Profile?:CourierBookProfile,Profiles?:CourierBookProfileLink[],CardEnabled?:boolean,PublishableKey?:string,AppUrl?:string,Today?:string,Weekday?:number,NowMin?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {boolean} */
    Available;
    /** @type {boolean} */
    BookingOn;
    /** @type {CourierTrackBusiness} */
    Business;
    /** @type {CourierBookProfile} */
    Profile;
    /** @type {CourierBookProfileLink[]} */
    Profiles = [];
    /** @type {boolean} */
    CardEnabled;
    /** @type {string} */
    PublishableKey;
    /** @type {string} */
    AppUrl;
    /** @type {string} */
    Today;
    /** @type {number} */
    Weekday;
    /** @type {number} */
    NowMin;
}
export class CourierBookPageResponse {
    /** @param {{Page?:CourierBookPageView,ResponseStatus?:ResponseStatus}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {CourierBookPageView} */
    Page;
    /** @type {ResponseStatus} */
    ResponseStatus;
}
export class CourierBookPageRequest {
    /** @param {{Slug?:string,Profile?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Slug;
    /** @type {string} */
    Profile;
}

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

GET /v1/book/{Slug} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<CourierBookPageResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Page>
    <AppUrl>String</AppUrl>
    <Available>false</Available>
    <BookingOn>false</BookingOn>
    <Business>
      <Name>String</Name>
      <Phone>String</Phone>
    </Business>
    <CardEnabled>false</CardEnabled>
    <NowMin>0</NowMin>
    <Profile>
      <Asap>false</Asap>
      <CancelFee>0</CancelFee>
      <Code>String</Code>
      <FacilityName>String</FacilityName>
      <FacilityNoun>String</FacilityNoun>
      <FacilityNounEs>String</FacilityNounEs>
      <FinalAfterCount>false</FinalAfterCount>
      <Handoffs>
        <CodeRequired>false</CodeRequired>
        <Desk>false</Desk>
        <Hand>false</Hand>
        <IdRequired>false</IdRequired>
        <Porch>false</Porch>
        <SigRequired>false</SigRequired>
      </Handoffs>
      <Levels>
        <CourierBookLevel>
          <Code>String</Code>
          <Days xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
            <d6p1:int>0</d6p1:int>
          </Days>
          <DeadlineMin>0</DeadlineMin>
          <InBy>String</InBy>
          <Name>String</Name>
          <Ready>String</Ready>
          <Surcharge>0</Surcharge>
          <WithinMin>0</WithinMin>
        </CourierBookLevel>
      </Levels>
      <MissedFee>0</MissedFee>
      <MissedWaitMin>0</MissedWaitMin>
      <Name>String</Name>
      <PayTiming>String</PayTiming>
      <Recurring>false</Recurring>
      <ServiceArea xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </ServiceArea>
      <Shape>String</Shape>
      <Template>String</Template>
      <UnitMany>String</UnitMany>
      <UnitManyEs>String</UnitManyEs>
      <UnitOne>String</UnitOne>
      <UnitOneEs>String</UnitOneEs>
      <Zips xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </Zips>
    </Profile>
    <Profiles>
      <CourierBookProfileLink>
        <Code>String</Code>
        <Name>String</Name>
        <Shape>String</Shape>
      </CourierBookProfileLink>
    </Profiles>
    <PublishableKey>String</PublishableKey>
    <Today>String</Today>
    <Weekday>0</Weekday>
  </Page>
  <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>
</CourierBookPageResponse>