Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
PUT | /homepage/scheduler/settings | Update homepage scheduler settings | Update homepage scheduler settings on the company of the currently logged in user, only administrators are allowed to update homepage menu. |
---|
"use strict";
export class HomepageSchedulerServiceResponse {
/** @param {{Id?:number,Name?:string,Description?:string,ImageUrl?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {number}
* @description The service id. */
Id;
/**
* @type {string}
* @description The service name. */
Name;
/**
* @type {string}
* @description The service description. */
Description;
/**
* @type {string}
* @description The service image url. */
ImageUrl;
}
export class HomepageSchedulerResourceResponse {
/** @param {{Id?:number,Name?:string,Description?:string,ImageUrl?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {number}
* @description The resource id. */
Id;
/**
* @type {string}
* @description The resource name. */
Name;
/**
* @type {string}
* @description The resource description. */
Description;
/**
* @type {string}
* @description The resource image url. */
ImageUrl;
}
export class HomepageSchedulerFieldResponse {
/** @param {{Id?:number,ShowOnBooking?:boolean,ShowOnTooltip?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {number}
* @description The field id. */
Id;
/**
* @type {boolean}
* @description If the field should be shown on booking. */
ShowOnBooking;
/**
* @type {boolean}
* @description If the field should be shown on tooltip. */
ShowOnTooltip;
}
export class HomepageSchedulerFieldOptionsResponse {
/** @param {{Id?:number,Name?:string,Description?:string,SortOrder?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {number}
* @description The field id. */
Id;
/**
* @type {string}
* @description The field name. */
Name;
/**
* @type {string}
* @description The field description. */
Description;
/**
* @type {number}
* @description The field sort order when listing. */
SortOrder;
}
export class ScheduleViewResponse {
/** @param {{Id?:number,Name?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
Id;
/** @type {string} */
Name;
}
export class HomepageSchedulerSettingsQueryResponse {
/** @param {{CompanyId?:string,Active?:boolean,ScheduleViewId?:number,ScheduleTimeSlotMinutes?:number,StartTime?:string,EndTime?:string,ShowTimeExceptions?:boolean,EnableBooking?:boolean,Services?:HomepageSchedulerServiceResponse[],Resources?:HomepageSchedulerResourceResponse[],Fields?:HomepageSchedulerFieldResponse[],FieldOptions?:HomepageSchedulerFieldOptionsResponse[],ScheduleViewOptions?:ScheduleViewResponse[]}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description The company id. */
CompanyId;
/**
* @type {boolean}
* @description If the user schedule is activated. */
Active;
/**
* @type {number}
* @description If the user schedule views id. */
ScheduleViewId;
/**
* @type {number}
* @description If the user schedule time slots in minutes. */
ScheduleTimeSlotMinutes;
/**
* @type {?string}
* @description If the user schedule time start time. */
StartTime;
/**
* @type {?string}
* @description If the user schedule time end time. */
EndTime;
/**
* @type {boolean}
* @description If the user schedule should contain time exceptions. */
ShowTimeExceptions;
/**
* @type {boolean}
* @description If allow booking in the scheduler. */
EnableBooking;
/**
* @type {HomepageSchedulerServiceResponse[]}
* @description The homepage schedule services that are selected */
Services;
/**
* @type {HomepageSchedulerResourceResponse[]}
* @description The homepage schedule resources that are selected */
Resources;
/**
* @type {HomepageSchedulerFieldResponse[]}
* @description The homepage schedule fields that are selected */
Fields;
/**
* @type {HomepageSchedulerFieldOptionsResponse[]}
* @description The homepage schedule fields select from */
FieldOptions;
/**
* @type {ScheduleViewResponse[]}
* @description The available schedule view options to choose from */
ScheduleViewOptions;
}
export class HomepageSchedulerResource {
/** @param {{Id?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {number}
* @description The resource id. */
Id;
}
export class HomepageSchedulerService {
/** @param {{Id?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {number}
* @description The service id. */
Id;
}
export class HomepageScheduleField {
/** @param {{Id?:number,ShowOnBooking?:boolean,ShowOnTooltip?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {number}
* @description The field id. */
Id;
/**
* @type {boolean}
* @description If the field showed on the booking. */
ShowOnBooking;
/**
* @type {boolean}
* @description If the field showed on the bookings tooltip. */
ShowOnTooltip;
}
export class UpdateHomepageSchedulerSettings {
/** @param {{CompanyId?:string,Active?:boolean,ScheduleViewId?:number,ScheduleTimeSlotMinutes?:number,StartTime?:string,EndTime?:string,ShowTimeExceptions?:boolean,EnableBooking?:boolean,Resources?:HomepageSchedulerResource[],Services?:HomepageSchedulerService[],Fields?:HomepageScheduleField[]}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {?string}
* @description The company id, if empty will use the company id for the user you are logged in with. */
CompanyId;
/**
* @type {?boolean}
* @description If the user schedule is activated. */
Active;
/**
* @type {?number}
* @description If the user schedule views id. */
ScheduleViewId;
/**
* @type {?number}
* @description If the user schedule time slots in minutes. */
ScheduleTimeSlotMinutes;
/**
* @type {?string}
* @description If the user schedule time start time. */
StartTime;
/**
* @type {?string}
* @description If the user schedule time end time. */
EndTime;
/**
* @type {?boolean}
* @description If the user schedule should contain time exceptions. */
ShowTimeExceptions;
/**
* @type {?boolean}
* @description If allow booking in the scheduler. */
EnableBooking;
/**
* @type {HomepageSchedulerResource[]}
* @description What resources you want to be shown in scheduler. */
Resources;
/**
* @type {HomepageSchedulerService[]}
* @description What services you want to be shown in scheduler. */
Services;
/**
* @type {HomepageScheduleField[]}
* @description What fields you want to be shown in scheduler. */
Fields;
}
JavaScript UpdateHomepageSchedulerSettings DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /homepage/scheduler/settings HTTP/1.1
Host: testapi.bokamera.se
Accept: application/json
Content-Type: application/json
Content-Length: length
{"CompanyId":"00000000-0000-0000-0000-000000000000","Active":false,"ScheduleViewId":0,"ScheduleTimeSlotMinutes":0,"StartTime":"00:00:00","EndTime":"00:00:00","ShowTimeExceptions":false,"EnableBooking":false,"Resources":[{"Id":0}],"Services":[{"Id":0}],"Fields":[{"Id":0,"ShowOnBooking":false,"ShowOnTooltip":false}]}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"Active":false,"ScheduleViewId":0,"ScheduleTimeSlotMinutes":0,"StartTime":"00:00:00","EndTime":"00:00:00","ShowTimeExceptions":false,"EnableBooking":false,"Services":[{"Id":0,"Name":"String","Description":"String"}],"Resources":[{"Id":0,"Name":"String","Description":"String"}],"Fields":[{"Id":0,"ShowOnBooking":false,"ShowOnTooltip":false}],"FieldOptions":[{"Id":0,"Name":"String","Description":"String","SortOrder":0}],"ScheduleViewOptions":[{"Id":0,"Name":"String"}]}