BokaMera.API.Host

<back to all web services

UpdateHomepageWidgetSettings

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
PUT/homepage/widget/settingsUpdate homepage widget settingsUpdate homepage widget settings on the company of the currently logged in user, only administrators are allowed to update homepage menu.
"use strict";
export class HomepageWidgetServiceLayoutsResponse {
    /** @param {{Id?:number,Name?:string,Description?:string,Code?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {number}
     * @description The layout id. */
    Id;
    /**
     * @type {string}
     * @description The layout name. */
    Name;
    /**
     * @type {string}
     * @description The layout description. */
    Description;
    /**
     * @type {string}
     * @description The layout code. */
    Code;
}
export class HomepageWidgetTimeLayoutsResponse {
    /** @param {{Id?:number,Name?:string,Description?:string,Code?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {number}
     * @description The layout id. */
    Id;
    /**
     * @type {string}
     * @description The layout name. */
    Name;
    /**
     * @type {string}
     * @description The layout description. */
    Description;
    /**
     * @type {string}
     * @description The layout code. */
    Code;
}
export class HomepageWidgetBookingLayoutsResponse {
    /** @param {{Id?:number,Name?:string,Description?:string,Code?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {number}
     * @description The layout id. */
    Id;
    /**
     * @type {string}
     * @description The layout name. */
    Name;
    /**
     * @type {string}
     * @description The layout description. */
    Description;
    /**
     * @type {string}
     * @description The layout code. */
    Code;
}
export class HomepageWidgetBookingMethodsResponse {
    /** @param {{Id?:number,Name?:string,Description?:string,Code?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {number}
     * @description The layout id. */
    Id;
    /**
     * @type {string}
     * @description The layout name. */
    Name;
    /**
     * @type {string}
     * @description The layout description. */
    Description;
    /**
     * @type {string}
     * @description The layout code. */
    Code;
}
export class HomepageWidgetSettingsQueryResponse {
    /** @param {{CompanyId?:string,ServiceLayoutId?:number,TimeLayoutId?:number,BookingLayoutId?:number,PrimaryColor?:string,ShowServiceImage?:boolean,ShowRebateCodeField?:boolean,ShowNextAvailableTime?:boolean,EnableCreateAccount?:boolean,EnableLogin?:boolean,EnableFacebookLogin?:boolean,EnableDirectBooking?:boolean,DarkTheme?:boolean,ShowEndTime?:boolean,BookedTimeSlotText?:string,ServiceLayoutOptions?:HomepageWidgetServiceLayoutsResponse[],TimeLayoutOptions?:HomepageWidgetTimeLayoutsResponse[],BookingLayoutOptions?:HomepageWidgetBookingLayoutsResponse[],BookingMethodOptions?:HomepageWidgetBookingMethodsResponse[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description The company id. */
    CompanyId;
    /**
     * @type {number}
     * @description The service layouts id. */
    ServiceLayoutId;
    /**
     * @type {number}
     * @description The time layouts id. */
    TimeLayoutId;
    /**
     * @type {number}
     * @description The booking layouts id. */
    BookingLayoutId;
    /**
     * @type {string}
     * @description The primary color of the booking widget. */
    PrimaryColor;
    /**
     * @type {boolean}
     * @description If you should show the service image in the booking widget. */
    ShowServiceImage;
    /**
     * @type {boolean}
     * @description If you should show the rebate code field in the booking widget. */
    ShowRebateCodeField;
    /**
     * @type {boolean}
     * @description If you should show the next available time in the booking widget. */
    ShowNextAvailableTime;
    /**
     * @type {boolean}
     * @description If you should show the create account option. */
    EnableCreateAccount;
    /**
     * @type {boolean}
     * @description If you should show the login to account option. */
    EnableLogin;
    /**
     * @type {boolean}
     * @description If you should show the facebook login to account option. */
    EnableFacebookLogin;
    /**
     * @type {boolean}
     * @description If you should show the direct booking option. This enables customer to book with entering contact information. */
    EnableDirectBooking;
    /**
     * @type {boolean}
     * @description If the site should have dark theme or not. */
    DarkTheme;
    /**
     * @type {boolean}
     * @description If you should show the end time in the booking widget. */
    ShowEndTime;
    /**
     * @type {string}
     * @description What text to show on booked time slots. Default text is Booked */
    BookedTimeSlotText;
    /** @type {HomepageWidgetServiceLayoutsResponse[]} */
    ServiceLayoutOptions;
    /** @type {HomepageWidgetTimeLayoutsResponse[]} */
    TimeLayoutOptions;
    /** @type {HomepageWidgetBookingLayoutsResponse[]} */
    BookingLayoutOptions;
    /** @type {HomepageWidgetBookingMethodsResponse[]} */
    BookingMethodOptions;
}
export class UpdateHomepageWidgetSettings {
    /** @param {{CompanyId?:string,ServiceLayoutId?:number,TimeLayoutId?:number,BookingLayoutId?:number,PrimaryColor?:string,DarkTheme?:boolean,ShowServiceImage?:boolean,ShowRebateCodeField?:boolean,ShowNextAvailableTime?:boolean,ShowEndTime?:boolean,BookedTimeSlotText?:string,EnableCreateAccount?:boolean,EnableLogin?:boolean,EnableFacebookLogin?:boolean,EnableDirectBooking?:boolean}} [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 {?number}
     * @description Serivce Layout. */
    ServiceLayoutId;
    /**
     * @type {?number}
     * @description Time Layout. */
    TimeLayoutId;
    /**
     * @type {?number}
     * @description Booking Layout. */
    BookingLayoutId;
    /**
     * @type {string}
     * @description The primary color of the booking widget. */
    PrimaryColor;
    /**
     * @type {?boolean}
     * @description If the site should have dark theme or not. */
    DarkTheme;
    /**
     * @type {?boolean}
     * @description If you should show the service image in the booking widget. */
    ShowServiceImage;
    /**
     * @type {?boolean}
     * @description If you should show the rebate code field in the booking widget. */
    ShowRebateCodeField;
    /**
     * @type {?boolean}
     * @description If you should show the next available time in the booking widget. */
    ShowNextAvailableTime;
    /**
     * @type {?boolean}
     * @description If you should show the end time in the booking widget. */
    ShowEndTime;
    /**
     * @type {string}
     * @description What text to show on booked time slots. Default text is Booked */
    BookedTimeSlotText;
    /**
     * @type {?boolean}
     * @description If you should show the create account option. */
    EnableCreateAccount;
    /**
     * @type {?boolean}
     * @description If you should show the login to account option. */
    EnableLogin;
    /**
     * @type {?boolean}
     * @description If you should show the facebook login to account option. */
    EnableFacebookLogin;
    /**
     * @type {?boolean}
     * @description If you should show the direct booking option. This enables customer to book with entering contact information. */
    EnableDirectBooking;
}

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

PUT /homepage/widget/settings HTTP/1.1 
Host: testapi.bokamera.se 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	CompanyId: 00000000-0000-0000-0000-000000000000,
	ServiceLayoutId: 0,
	TimeLayoutId: 0,
	BookingLayoutId: 0,
	PrimaryColor: String,
	DarkTheme: False,
	ShowServiceImage: False,
	ShowRebateCodeField: False,
	ShowNextAvailableTime: False,
	ShowEndTime: False,
	BookedTimeSlotText: String,
	EnableCreateAccount: False,
	EnableLogin: False,
	EnableFacebookLogin: False,
	EnableDirectBooking: False
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ServiceLayoutId: 0,
	TimeLayoutId: 0,
	BookingLayoutId: 0,
	PrimaryColor: String,
	ShowServiceImage: False,
	ShowRebateCodeField: False,
	ShowNextAvailableTime: False,
	EnableCreateAccount: False,
	EnableLogin: False,
	EnableFacebookLogin: False,
	EnableDirectBooking: False,
	DarkTheme: False,
	ShowEndTime: False,
	BookedTimeSlotText: String,
	ServiceLayoutOptions: 
	[
		{
			Id: 0,
			Name: String,
			Description: String,
			Code: String
		}
	],
	TimeLayoutOptions: 
	[
		{
			Id: 0,
			Name: String,
			Description: String,
			Code: String
		}
	],
	BookingLayoutOptions: 
	[
		{
			Id: 0,
			Name: String,
			Description: String,
			Code: String
		}
	],
	BookingMethodOptions: 
	[
		{
			Id: 0,
			Name: String,
			Description: String,
			Code: String
		}
	]
}