Trendsic Platform Service

<back to all web services

BranchCalendarRequest

Requires Authentication
Requires any of the roles:Agent, Administrator
The following routes are available for this service:
GET,OPTIONS/v1/queue/calendar/{LocationId}
"use strict";
export class BranchCalendarHours {
    /** @param {{Date?:string,Opens?:string,Closes?:string,Closed?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Date;
    /** @type {string} */
    Opens;
    /** @type {string} */
    Closes;
    /** @type {boolean} */
    Closed;
}
export class BranchCalendarBranch {
    /** @param {{Id?:string,Name?:string,Street?:string,TimeZone?:string,Windows?:number,Hours?:BranchCalendarHours[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Id;
    /** @type {string} */
    Name;
    /** @type {string} */
    Street;
    /** @type {string} */
    TimeZone;
    /** @type {number} */
    Windows;
    /** @type {BranchCalendarHours[]} */
    Hours = [];
}
export class BranchCalendarLine {
    /** @param {{Id?:string,Name?:string,Minutes?:number,Color?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Id;
    /** @type {string} */
    Name;
    /** @type {number} */
    Minutes;
    /** @type {string} */
    Color;
}
export class BranchCalendarCustomer {
    /** @param {{ContactId?:number,ContactGuid?:string,Name?:string,Phone?:string,Email?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    ContactId;
    /** @type {?string} */
    ContactGuid;
    /** @type {string} */
    Name;
    /** @type {string} */
    Phone;
    /** @type {string} */
    Email;
}
export class BranchCalendarServiceItem {
    /** @param {{LineId?:string,Name?:string,Minutes?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {?string} */
    LineId;
    /** @type {string} */
    Name;
    /** @type {number} */
    Minutes;
}
export class BranchCalendarStatus {
    /** @param {{State?:string,TicketLabel?:string,Window?:string,ArrivedAt?:string,CalledAt?:string,ServedAt?:string,NoShowAt?:string,CancelledAt?:string,CancelledBy?:string,Source?:string,CanCheckIn?:boolean,CanNoShow?:boolean,CanReopen?:boolean,CanChange?:boolean,CanCancel?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    State;
    /** @type {string} */
    TicketLabel;
    /** @type {string} */
    Window;
    /** @type {?string} */
    ArrivedAt;
    /** @type {?string} */
    CalledAt;
    /** @type {?string} */
    ServedAt;
    /** @type {?string} */
    NoShowAt;
    /** @type {?string} */
    CancelledAt;
    /** @type {string} */
    CancelledBy;
    /** @type {string} */
    Source;
    /** @type {boolean} */
    CanCheckIn;
    /** @type {boolean} */
    CanNoShow;
    /** @type {boolean} */
    CanReopen;
    /** @type {boolean} */
    CanChange;
    /** @type {boolean} */
    CanCancel;
}
export class BranchCalendarPaperwork {
    /** @param {{AsksQuestionnaire?:boolean,AsksUpload?:boolean,Submitted?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {boolean} */
    AsksQuestionnaire;
    /** @type {boolean} */
    AsksUpload;
    /** @type {boolean} */
    Submitted;
}
export class BranchCalendarEvent {
    /** @param {{CalendarEventId?:number,Kind?:string,Title?:string,StartLocal?:string,EndLocal?:string,AllDay?:boolean,Description?:string,Customer?:BranchCalendarCustomer,Services?:BranchCalendarServiceItem[],Status?:BranchCalendarStatus,CheckInId?:string,Paperwork?:BranchCalendarPaperwork}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    CalendarEventId;
    /** @type {string} */
    Kind;
    /** @type {string} */
    Title;
    /** @type {string} */
    StartLocal;
    /** @type {?string} */
    EndLocal;
    /** @type {boolean} */
    AllDay;
    /** @type {string} */
    Description;
    /** @type {BranchCalendarCustomer} */
    Customer;
    /** @type {BranchCalendarServiceItem[]} */
    Services = [];
    /** @type {BranchCalendarStatus} */
    Status;
    /** @type {?string} */
    CheckInId;
    /** @type {BranchCalendarPaperwork} */
    Paperwork;
}
export class BranchCalendarStaffHour {
    /** @param {{Date?:string,Hour?:number,Windows?:number,Source?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Date;
    /** @type {number} */
    Hour;
    /** @type {number} */
    Windows;
    /** @type {string} */
    Source;
}
export class BranchCalendarWeekdayHour {
    /** @param {{Weekday?:number,Hour?:number,Windows?:number,Days?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    Weekday;
    /** @type {number} */
    Hour;
    /** @type {number} */
    Windows;
    /** @type {number} */
    Days;
}
export class BranchCalendarHourMean {
    /** @param {{Hour?:number,Windows?:number,Days?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    Hour;
    /** @type {number} */
    Windows;
    /** @type {number} */
    Days;
}
export class BranchCalendarHistory {
    /** @param {{ByWeekdayHour?:BranchCalendarWeekdayHour[],ByHour?:BranchCalendarHourMean[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {BranchCalendarWeekdayHour[]} */
    ByWeekdayHour = [];
    /** @type {BranchCalendarHourMean[]} */
    ByHour = [];
}
export class BranchCalendarResponse {
    /** @param {{ResponseStatus?:ResponseStatus,Branch?:BranchCalendarBranch,Lines?:BranchCalendarLine[],Events?:BranchCalendarEvent[],Staffing?:BranchCalendarStaffHour[],History?:BranchCalendarHistory,ColorByService?:boolean,ServerNowLocal?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {ResponseStatus} */
    ResponseStatus;
    /** @type {BranchCalendarBranch} */
    Branch;
    /** @type {BranchCalendarLine[]} */
    Lines = [];
    /** @type {BranchCalendarEvent[]} */
    Events = [];
    /** @type {BranchCalendarStaffHour[]} */
    Staffing = [];
    /** @type {BranchCalendarHistory} */
    History;
    /** @type {boolean} */
    ColorByService;
    /** @type {string} */
    ServerNowLocal;
}
export class BranchCalendarRequest {
    /** @param {{LocationId?:string,From?:string,To?:string,IncludeCancelled?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    LocationId;
    /** @type {?string} */
    From;
    /** @type {?string} */
    To;
    /** @type {boolean} */
    IncludeCancelled;
}

JavaScript BranchCalendarRequest 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/queue/calendar/{LocationId} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	Branch: 
	{
		Id: 00000000000000000000000000000000,
		Name: String,
		Street: String,
		TimeZone: String,
		Windows: 0,
		Hours: 
		[
			{
				Date: String,
				Opens: String,
				Closes: String,
				Closed: False
			}
		]
	},
	Lines: 
	[
		{
			Id: 00000000000000000000000000000000,
			Name: String,
			Minutes: 0,
			Color: String
		}
	],
	Events: 
	[
		{
			CalendarEventId: 0,
			Kind: String,
			Title: String,
			StartLocal: 0001-01-01,
			EndLocal: 0001-01-01,
			AllDay: False,
			Description: String,
			Customer: 
			{
				ContactId: 0,
				ContactGuid: 00000000000000000000000000000000,
				Name: String,
				Phone: String,
				Email: String
			},
			Services: 
			[
				{
					LineId: 00000000000000000000000000000000,
					Name: String,
					Minutes: 0
				}
			],
			Status: 
			{
				State: String,
				TicketLabel: String,
				Window: String,
				ArrivedAt: 0001-01-01,
				CalledAt: 0001-01-01,
				ServedAt: 0001-01-01,
				NoShowAt: 0001-01-01,
				CancelledAt: 0001-01-01,
				CancelledBy: String,
				Source: String,
				CanCheckIn: False,
				CanNoShow: False,
				CanReopen: False,
				CanChange: False,
				CanCancel: False
			},
			CheckInId: 00000000000000000000000000000000,
			Paperwork: 
			{
				AsksQuestionnaire: False,
				AsksUpload: False,
				Submitted: False
			}
		}
	],
	Staffing: 
	[
		{
			Date: String,
			Hour: 0,
			Windows: 0,
			Source: String
		}
	],
	History: 
	{
		ByWeekdayHour: 
		[
			{
				Weekday: 0,
				Hour: 0,
				Windows: 0,
				Days: 0
			}
		],
		ByHour: 
		[
			{
				Hour: 0,
				Windows: 0,
				Days: 0
			}
		]
	},
	ColorByService: False,
	ServerNowLocal: 0001-01-01
}