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 .jsv suffix or ?format=jsv

HTTP + JSV

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: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Page: 
	{
		Available: False,
		BookingOn: False,
		Business: 
		{
			Name: String,
			Phone: String
		},
		Profile: 
		{
			Code: String,
			Name: String,
			Shape: String,
			Template: String,
			UnitOne: String,
			UnitMany: String,
			UnitOneEs: String,
			UnitManyEs: String,
			FacilityNoun: String,
			FacilityNounEs: String,
			FacilityName: String,
			Levels: 
			[
				{
					Code: String,
					Name: String,
					Ready: String,
					WithinMin: 0,
					InBy: String,
					Surcharge: 0,
					Days: 
					[
						0
					],
					DeadlineMin: 0
				}
			],
			Asap: False,
			Recurring: False,
			PayTiming: String,
			FinalAfterCount: False,
			CancelFee: 0,
			MissedFee: 0,
			MissedWaitMin: 0,
			ServiceArea: 
			[
				String
			],
			Zips: 
			[
				String
			],
			Handoffs: 
			{
				Hand: False,
				Porch: False,
				Desk: False,
				SigRequired: False,
				IdRequired: False,
				CodeRequired: False
			}
		},
		Profiles: 
		[
			{
				Code: String,
				Name: String,
				Shape: String
			}
		],
		CardEnabled: False,
		PublishableKey: String,
		AppUrl: String,
		Today: String,
		Weekday: 0,
		NowMin: 0
	},
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}