Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
PUT | /homepage/settings | Update the homepage settings | Update the homepage settings on the company of the currently logged in user, only administrators are allowed to update homepage menu. |
---|
"use strict";
export class HomepageTemplateResponse {
/** @param {{Id?:number,Name?:string,Description?:string,ImageUrl?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {number}
* @description The template id */
Id;
/**
* @type {string}
* @description The template name */
Name;
/**
* @type {string}
* @description The template description */
Description;
/**
* @type {string}
* @description The template image url */
ImageUrl;
}
export class HomepageHeroSectionStyleResponse {
/** @param {{Id?:number,Name?:string,Description?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {number}
* @description The hero section style id */
Id;
/**
* @type {string}
* @description The hero section style name */
Name;
/**
* @type {string}
* @description The hero section style description */
Description;
}
export class HomepageSettingsQueryResponse {
/** @param {{CompanyId?:string,HomepageHeading?:string,WelcomePageHeading?:string,WelcomePageBody?:string,AboutUsPageHeading?:string,AboutUsPageBody?:string,ImageUrl?:string,HomePageTemplateId?:number,HeroSectionStyleId?:number,ShowRating?:boolean,EnableHomepage?:boolean,Updated?:string,Created?:string,HomePageTemplateOptions?:HomepageTemplateResponse[],HomepageHeroSectionStyleOptions?:HomepageHeroSectionStyleResponse[]}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description The company id */
CompanyId;
/**
* @type {string}
* @description The text for homepage heading */
HomepageHeading;
/**
* @type {string}
* @description The text for homepage startpage heading */
WelcomePageHeading;
/**
* @type {string}
* @description The text for homepage startpage body */
WelcomePageBody;
/**
* @type {string}
* @description The text for homepage about us page heading */
AboutUsPageHeading;
/**
* @type {string}
* @description The text for homepage about us page body */
AboutUsPageBody;
/**
* @type {string}
* @description The startpage image url */
ImageUrl;
/**
* @type {number}
* @description The template for the homepage */
HomePageTemplateId;
/**
* @type {number}
* @description The hero section style for the homepage */
HeroSectionStyleId;
/**
* @type {boolean}
* @description Show rating on the page */
ShowRating;
/**
* @type {boolean}
* @description Enable the BokaMera Homepage */
EnableHomepage;
/**
* @type {?string}
* @description Will show when the homepage settings was created, note it will only be shown if your logged in as admin for the company. */
Updated;
/**
* @type {?string}
* @description Will show when the homepage settings was updated, note it will only be shown if your logged in as admin for the company. */
Created;
/**
* @type {HomepageTemplateResponse[]}
* @description The homepage templates options to select from */
HomePageTemplateOptions;
/**
* @type {HomepageHeroSectionStyleResponse[]}
* @description The homepage hero section style options to select from */
HomepageHeroSectionStyleOptions;
}
export class UpdateHomepageSettings {
/** @param {{CompanyId?:string,HomepageHeading?:string,WelcomePageHeading?:string,WelcomePageBody?:string,AboutUsPageHeading?:string,AboutUsPageBody?:string,ImageUrl?:string,HomePageTemplateId?:number,ShowRating?:boolean,EnableHomepage?:boolean,HeroSectionStyleId?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {?string}
* @description The company id */
CompanyId;
/**
* @type {string}
* @description The text for homepage heading */
HomepageHeading;
/**
* @type {string}
* @description The text for homepage startpage heading */
WelcomePageHeading;
/**
* @type {string}
* @description The text for homepage startpage body */
WelcomePageBody;
/**
* @type {string}
* @description The text for homepage about us page heading */
AboutUsPageHeading;
/**
* @type {string}
* @description The text for homepage about us page body */
AboutUsPageBody;
/**
* @type {string}
* @description The start page image url */
ImageUrl;
/**
* @type {?number}
* @description The template for the homepage */
HomePageTemplateId;
/**
* @type {?boolean}
* @description Show rating on the page */
ShowRating;
/**
* @type {?boolean}
* @description Enable the BokaMera Homepage */
EnableHomepage;
/**
* @type {?number}
* @description The hero section style for the homepage */
HeroSectionStyleId;
}
JavaScript UpdateHomepageSettings DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /homepage/settings HTTP/1.1
Host: api.bokamera.se
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<UpdateHomepageSettings xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
<AboutUsPageBody>String</AboutUsPageBody>
<AboutUsPageHeading>String</AboutUsPageHeading>
<CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
<EnableHomepage>false</EnableHomepage>
<HeroSectionStyleId>0</HeroSectionStyleId>
<HomePageTemplateId>0</HomePageTemplateId>
<HomepageHeading>String</HomepageHeading>
<ImageUrl i:nil="true" />
<ShowRating>false</ShowRating>
<WelcomePageBody>String</WelcomePageBody>
<WelcomePageHeading>String</WelcomePageHeading>
</UpdateHomepageSettings>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <HomepageSettingsQueryResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos"> <AboutUsPageBody>String</AboutUsPageBody> <AboutUsPageHeading>String</AboutUsPageHeading> <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId> <Created>0001-01-01T00:00:00</Created> <EnableHomepage>false</EnableHomepage> <HeroSectionStyleId>0</HeroSectionStyleId> <HomePageTemplateId>0</HomePageTemplateId> <HomePageTemplateOptions> <HomepageTemplateResponse> <Description>String</Description> <Id>0</Id> <ImageUrl i:nil="true" /> <Name>String</Name> </HomepageTemplateResponse> </HomePageTemplateOptions> <HomepageHeading>String</HomepageHeading> <HomepageHeroSectionStyleOptions> <HomepageHeroSectionStyleResponse> <Description>String</Description> <Id>0</Id> <Name>String</Name> </HomepageHeroSectionStyleResponse> </HomepageHeroSectionStyleOptions> <ImageUrl i:nil="true" /> <ShowRating>false</ShowRating> <Updated>0001-01-01T00:00:00</Updated> <WelcomePageBody>String</WelcomePageBody> <WelcomePageHeading>String</WelcomePageHeading> </HomepageSettingsQueryResponse>