BokaMera.API.Host

<back to all web services

UpdateHomepageSettings

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
PUT/homepage/settingsUpdate the homepage settingsUpdate the homepage settings on the company of the currently logged in user, only administrators are allowed to update homepage menu.
import Foundation
import ServiceStack

// @ValidateRequest(Validator="IsAuthenticated")
public class UpdateHomepageSettings : ICompany, Codable
{
    /**
    * The company id
    */
    // @ApiMember(Description="The company id")
    public var companyId:String?

    /**
    * The text for homepage heading
    */
    // @ApiMember(Description="The text for homepage heading")
    public var homepageHeading:String

    /**
    * The text for homepage startpage heading
    */
    // @ApiMember(Description="The text for homepage startpage heading")
    public var welcomePageHeading:String

    /**
    * The text for homepage startpage body
    */
    // @ApiMember(Description="The text for homepage startpage body")
    public var welcomePageBody:String

    /**
    * The text for homepage about us page heading
    */
    // @ApiMember(Description="The text for homepage about us page heading")
    public var aboutUsPageHeading:String

    /**
    * The text for homepage about us page body
    */
    // @ApiMember(Description="The text for homepage about us page body")
    public var aboutUsPageBody:String

    /**
    * The start page image url
    */
    // @ApiMember(Description="The start page image url")
    public var imageUrl:Uri

    /**
    * The template for the homepage
    */
    // @ApiMember(Description="The template for the homepage")
    public var homePageTemplateId:Int?

    /**
    * Show rating on the page
    */
    // @ApiMember(Description="Show rating on the page")
    public var showRating:Bool?

    /**
    * Enable the BokaMera Homepage
    */
    // @ApiMember(Description="Enable the BokaMera Homepage")
    public var enableHomepage:Bool?

    /**
    * The hero section style for the homepage
    */
    // @ApiMember(Description="The hero section style for the homepage")
    public var heroSectionStyleId:Int?

    required public init(){}
}

public class HomepageSettingsQueryResponse : Codable
{
    /**
    * The company id
    */
    // @ApiMember(Description="The company id")
    public var companyId:String

    /**
    * The text for homepage heading
    */
    // @ApiMember(Description="The text for homepage heading")
    public var homepageHeading:String

    /**
    * The text for homepage startpage heading
    */
    // @ApiMember(Description="The text for homepage startpage heading")
    public var welcomePageHeading:String

    /**
    * The text for homepage startpage body
    */
    // @ApiMember(Description="The text for homepage startpage body")
    public var welcomePageBody:String

    /**
    * The text for homepage about us page heading
    */
    // @ApiMember(Description="The text for homepage about us page heading")
    public var aboutUsPageHeading:String

    /**
    * The text for homepage about us page body
    */
    // @ApiMember(Description="The text for homepage about us page body")
    public var aboutUsPageBody:String

    /**
    * The startpage image url
    */
    // @ApiMember(Description="The startpage image url")
    public var imageUrl:Uri

    /**
    * The template for the homepage
    */
    // @ApiMember(Description="The template for the homepage")
    public var homePageTemplateId:Int

    /**
    * The hero section style for the homepage
    */
    // @ApiMember(Description="The hero section style for the homepage")
    public var heroSectionStyleId:Int

    /**
    * Show rating on the page
    */
    // @ApiMember(Description="Show rating on the page")
    public var showRating:Bool

    /**
    * Enable the BokaMera Homepage
    */
    // @ApiMember(Description="Enable the BokaMera Homepage")
    public var enableHomepage:Bool

    /**
    * Will show when the homepage settings was created, note it will only be shown if your logged in as admin for the company.
    */
    // @ApiMember(DataType="datetime", Description="Will show when the homepage settings was created, note it will only be shown if your logged in as admin for the company.")
    public var updated:Date?

    /**
    * Will show when the homepage settings was updated, note it will only be shown if your logged in as admin for the company.
    */
    // @ApiMember(DataType="datetime", Description="Will show when the homepage settings was updated, note it will only be shown if your logged in as admin for the company.")
    public var created:Date?

    /**
    * The homepage templates options to select from
    */
    // @ApiMember(DataType="boolean", Description="The homepage templates options to select from", ParameterType="query")
    public var homePageTemplateOptions:[HomepageTemplateResponse] = []

    /**
    * The homepage hero section style options to select from
    */
    // @ApiMember(DataType="boolean", Description="The homepage hero section style options to select from", ParameterType="query")
    public var homepageHeroSectionStyleOptions:[HomepageHeroSectionStyleResponse] = []

    required public init(){}
}

public class HomepageTemplateResponse : Codable
{
    /**
    * The template id
    */
    // @ApiMember(Description="The template id")
    public var id:Int

    /**
    * The template name
    */
    // @ApiMember(Description="The template name")
    public var name:String

    /**
    * The template description
    */
    // @ApiMember(Description="The template description")
    public var Description:String

    /**
    * The template image url
    */
    // @ApiMember(Description="The template image url")
    public var imageUrl:Uri

    required public init(){}
}

public class HomepageHeroSectionStyleResponse : Codable
{
    /**
    * The hero section style id
    */
    // @ApiMember(Description="The hero section style id")
    public var id:Int

    /**
    * The hero section style name
    */
    // @ApiMember(Description="The hero section style name")
    public var name:String

    /**
    * The hero section style description
    */
    // @ApiMember(Description="The hero section style description")
    public var Description:String

    required public init(){}
}


Swift UpdateHomepageSettings DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + 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>