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.
namespace BokaMera.API.ServiceModel.Dtos

open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type HomepageTemplateResponse() = 
        ///<summary>
        ///The template id
        ///</summary>
        [<ApiMember(Description="The template id")>]
        member val Id:Int32 = new Int32() with get,set

        ///<summary>
        ///The template name
        ///</summary>
        [<ApiMember(Description="The template name")>]
        member val Name:String = null with get,set

        ///<summary>
        ///The template description
        ///</summary>
        [<ApiMember(Description="The template description")>]
        member val Description:String = null with get,set

        ///<summary>
        ///The template image url
        ///</summary>
        [<ApiMember(Description="The template image url")>]
        member val ImageUrl:Uri = null with get,set

    [<AllowNullLiteral>]
    type HomepageHeroSectionStyleResponse() = 
        ///<summary>
        ///The hero section style id
        ///</summary>
        [<ApiMember(Description="The hero section style id")>]
        member val Id:Int32 = new Int32() with get,set

        ///<summary>
        ///The hero section style name
        ///</summary>
        [<ApiMember(Description="The hero section style name")>]
        member val Name:String = null with get,set

        ///<summary>
        ///The hero section style description
        ///</summary>
        [<ApiMember(Description="The hero section style description")>]
        member val Description:String = null with get,set

    [<AllowNullLiteral>]
    type HomepageSettingsQueryResponse() = 
        ///<summary>
        ///The company id
        ///</summary>
        [<ApiMember(Description="The company id")>]
        member val CompanyId:Guid = new Guid() with get,set

        ///<summary>
        ///The text for homepage heading
        ///</summary>
        [<ApiMember(Description="The text for homepage heading")>]
        member val HomepageHeading:String = null with get,set

        ///<summary>
        ///The text for homepage startpage heading
        ///</summary>
        [<ApiMember(Description="The text for homepage startpage heading")>]
        member val WelcomePageHeading:String = null with get,set

        ///<summary>
        ///The text for homepage startpage body
        ///</summary>
        [<ApiMember(Description="The text for homepage startpage body")>]
        member val WelcomePageBody:String = null with get,set

        ///<summary>
        ///The text for homepage about us page heading
        ///</summary>
        [<ApiMember(Description="The text for homepage about us page heading")>]
        member val AboutUsPageHeading:String = null with get,set

        ///<summary>
        ///The text for homepage about us page body
        ///</summary>
        [<ApiMember(Description="The text for homepage about us page body")>]
        member val AboutUsPageBody:String = null with get,set

        ///<summary>
        ///The startpage image url
        ///</summary>
        [<ApiMember(Description="The startpage image url")>]
        member val ImageUrl:Uri = null with get,set

        ///<summary>
        ///The template for the homepage
        ///</summary>
        [<ApiMember(Description="The template for the homepage")>]
        member val HomePageTemplateId:Int32 = new Int32() with get,set

        ///<summary>
        ///The hero section style for the homepage
        ///</summary>
        [<ApiMember(Description="The hero section style for the homepage")>]
        member val HeroSectionStyleId:Int32 = new Int32() with get,set

        ///<summary>
        ///Show rating on the page
        ///</summary>
        [<ApiMember(Description="Show rating on the page")>]
        member val ShowRating:Boolean = new Boolean() with get,set

        ///<summary>
        ///Enable the BokaMera Homepage
        ///</summary>
        [<ApiMember(Description="Enable the BokaMera Homepage")>]
        member val EnableHomepage:Boolean = new Boolean() with get,set

        ///<summary>
        ///Will show when the homepage settings was created, note it will only be shown if your logged in as admin for the company.
        ///</summary>
        [<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.")>]
        member val Updated:Nullable<DateTime> = new Nullable<DateTime>() with get,set

        ///<summary>
        ///Will show when the homepage settings was updated, note it will only be shown if your logged in as admin for the company.
        ///</summary>
        [<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.")>]
        member val Created:Nullable<DateTime> = new Nullable<DateTime>() with get,set

        ///<summary>
        ///The homepage templates options to select from
        ///</summary>
        [<ApiMember(DataType="boolean", Description="The homepage templates options to select from", ParameterType="query")>]
        member val HomePageTemplateOptions:ResizeArray<HomepageTemplateResponse> = new ResizeArray<HomepageTemplateResponse>() with get,set

        ///<summary>
        ///The homepage hero section style options to select from
        ///</summary>
        [<ApiMember(DataType="boolean", Description="The homepage hero section style options to select from", ParameterType="query")>]
        member val HomepageHeroSectionStyleOptions:ResizeArray<HomepageHeroSectionStyleResponse> = new ResizeArray<HomepageHeroSectionStyleResponse>() with get,set

    [<ValidateRequest(Validator="IsAuthenticated")>]
    [<AllowNullLiteral>]
    type UpdateHomepageSettings() = 
        ///<summary>
        ///The company id
        ///</summary>
        [<ApiMember(Description="The company id")>]
        member val CompanyId:Nullable<Guid> = new Nullable<Guid>() with get,set

        ///<summary>
        ///The text for homepage heading
        ///</summary>
        [<ApiMember(Description="The text for homepage heading")>]
        member val HomepageHeading:String = null with get,set

        ///<summary>
        ///The text for homepage startpage heading
        ///</summary>
        [<ApiMember(Description="The text for homepage startpage heading")>]
        member val WelcomePageHeading:String = null with get,set

        ///<summary>
        ///The text for homepage startpage body
        ///</summary>
        [<ApiMember(Description="The text for homepage startpage body")>]
        member val WelcomePageBody:String = null with get,set

        ///<summary>
        ///The text for homepage about us page heading
        ///</summary>
        [<ApiMember(Description="The text for homepage about us page heading")>]
        member val AboutUsPageHeading:String = null with get,set

        ///<summary>
        ///The text for homepage about us page body
        ///</summary>
        [<ApiMember(Description="The text for homepage about us page body")>]
        member val AboutUsPageBody:String = null with get,set

        ///<summary>
        ///The startpage image url
        ///</summary>
        [<ApiMember(Description="The startpage image url")>]
        member val ImageUrl:Uri = null with get,set

        ///<summary>
        ///The template for the homepage
        ///</summary>
        [<ApiMember(Description="The template for the homepage")>]
        member val HomePageTemplateId:Nullable<Int32> = new Nullable<Int32>() with get,set

        ///<summary>
        ///Show rating on the page
        ///</summary>
        [<ApiMember(Description="Show rating on the page")>]
        member val ShowRating:Nullable<Boolean> = new Nullable<Boolean>() with get,set

        ///<summary>
        ///Enable the BokaMera Homepage
        ///</summary>
        [<ApiMember(Description="Enable the BokaMera Homepage")>]
        member val EnableHomepage:Nullable<Boolean> = new Nullable<Boolean>() with get,set

        ///<summary>
        ///The hero section style for the homepage
        ///</summary>
        [<ApiMember(Description="The hero section style for the homepage")>]
        member val HeroSectionStyleId:Nullable<Int32> = new Nullable<Int32>() with get,set

F# UpdateHomepageSettings 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

HTTP + JSON

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: testapi.bokamera.se 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"CompanyId":"00000000-0000-0000-0000-000000000000","HomepageHeading":"String","WelcomePageHeading":"String","WelcomePageBody":"String","AboutUsPageHeading":"String","AboutUsPageBody":"String","HomePageTemplateId":0,"ShowRating":false,"EnableHomepage":false,"HeroSectionStyleId":0}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"HomepageHeading":"String","WelcomePageHeading":"String","WelcomePageBody":"String","AboutUsPageHeading":"String","AboutUsPageBody":"String","HomePageTemplateId":0,"HeroSectionStyleId":0,"ShowRating":false,"EnableHomepage":false,"Updated":"0001-01-01T00:00:00","Created":"0001-01-01T00:00:00","HomePageTemplateOptions":[{"Id":0,"Name":"String","Description":"String"}],"HomepageHeroSectionStyleOptions":[{"Id":0,"Name":"String","Description":"String"}]}