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. |
---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports BokaMera.API.ServiceModel.Dtos
Namespace Global
Namespace BokaMera.API.ServiceModel.Dtos
Public Partial Class HomepageHeroSectionStyleResponse
'''<Summary>
'''The hero section style id
'''</Summary>
<ApiMember(Description:="The hero section style id")>
Public Overridable Property Id As Integer
'''<Summary>
'''The hero section style name
'''</Summary>
<ApiMember(Description:="The hero section style name")>
Public Overridable Property Name As String
'''<Summary>
'''The hero section style description
'''</Summary>
<ApiMember(Description:="The hero section style description")>
Public Overridable Property Description As String
End Class
Public Partial Class HomepageSettingsQueryResponse
Public Sub New()
HomePageTemplateOptions = New List(Of HomepageTemplateResponse)
HomepageHeroSectionStyleOptions = New List(Of HomepageHeroSectionStyleResponse)
End Sub
'''<Summary>
'''The company id
'''</Summary>
<ApiMember(Description:="The company id")>
Public Overridable Property CompanyId As Guid
'''<Summary>
'''The text for homepage heading
'''</Summary>
<ApiMember(Description:="The text for homepage heading")>
Public Overridable Property HomepageHeading As String
'''<Summary>
'''The text for homepage startpage heading
'''</Summary>
<ApiMember(Description:="The text for homepage startpage heading")>
Public Overridable Property WelcomePageHeading As String
'''<Summary>
'''The text for homepage startpage body
'''</Summary>
<ApiMember(Description:="The text for homepage startpage body")>
Public Overridable Property WelcomePageBody As String
'''<Summary>
'''The text for homepage about us page heading
'''</Summary>
<ApiMember(Description:="The text for homepage about us page heading")>
Public Overridable Property AboutUsPageHeading As String
'''<Summary>
'''The text for homepage about us page body
'''</Summary>
<ApiMember(Description:="The text for homepage about us page body")>
Public Overridable Property AboutUsPageBody As String
'''<Summary>
'''The startpage image url
'''</Summary>
<ApiMember(Description:="The startpage image url")>
Public Overridable Property ImageUrl As Uri
'''<Summary>
'''The template for the homepage
'''</Summary>
<ApiMember(Description:="The template for the homepage")>
Public Overridable Property HomePageTemplateId As Integer
'''<Summary>
'''The hero section style for the homepage
'''</Summary>
<ApiMember(Description:="The hero section style for the homepage")>
Public Overridable Property HeroSectionStyleId As Integer
'''<Summary>
'''Show rating on the page
'''</Summary>
<ApiMember(Description:="Show rating on the page")>
Public Overridable Property ShowRating As Boolean
'''<Summary>
'''Enable the BokaMera Homepage
'''</Summary>
<ApiMember(Description:="Enable the BokaMera Homepage")>
Public Overridable Property EnableHomepage As Boolean
'''<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.")>
Public Overridable Property Updated As Nullable(Of Date)
'''<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.")>
Public Overridable Property Created As Nullable(Of Date)
'''<Summary>
'''The homepage templates options to select from
'''</Summary>
<ApiMember(DataType:="boolean", Description:="The homepage templates options to select from", ParameterType:="query")>
Public Overridable Property HomePageTemplateOptions As List(Of HomepageTemplateResponse)
'''<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")>
Public Overridable Property HomepageHeroSectionStyleOptions As List(Of HomepageHeroSectionStyleResponse)
End Class
Public Partial Class HomepageTemplateResponse
'''<Summary>
'''The template id
'''</Summary>
<ApiMember(Description:="The template id")>
Public Overridable Property Id As Integer
'''<Summary>
'''The template name
'''</Summary>
<ApiMember(Description:="The template name")>
Public Overridable Property Name As String
'''<Summary>
'''The template description
'''</Summary>
<ApiMember(Description:="The template description")>
Public Overridable Property Description As String
'''<Summary>
'''The template image url
'''</Summary>
<ApiMember(Description:="The template image url")>
Public Overridable Property ImageUrl As Uri
End Class
<ValidateRequest(Validator:="IsAuthenticated")>
Public Partial Class UpdateHomepageSettings
Implements ICompany
'''<Summary>
'''The company id
'''</Summary>
<ApiMember(Description:="The company id")>
Public Overridable Property CompanyId As Nullable(Of Guid)
'''<Summary>
'''The text for homepage heading
'''</Summary>
<ApiMember(Description:="The text for homepage heading")>
Public Overridable Property HomepageHeading As String
'''<Summary>
'''The text for homepage startpage heading
'''</Summary>
<ApiMember(Description:="The text for homepage startpage heading")>
Public Overridable Property WelcomePageHeading As String
'''<Summary>
'''The text for homepage startpage body
'''</Summary>
<ApiMember(Description:="The text for homepage startpage body")>
Public Overridable Property WelcomePageBody As String
'''<Summary>
'''The text for homepage about us page heading
'''</Summary>
<ApiMember(Description:="The text for homepage about us page heading")>
Public Overridable Property AboutUsPageHeading As String
'''<Summary>
'''The text for homepage about us page body
'''</Summary>
<ApiMember(Description:="The text for homepage about us page body")>
Public Overridable Property AboutUsPageBody As String
'''<Summary>
'''The start page image url
'''</Summary>
<ApiMember(Description:="The start page image url")>
Public Overridable Property ImageUrl As Uri
'''<Summary>
'''The template for the homepage
'''</Summary>
<ApiMember(Description:="The template for the homepage")>
Public Overridable Property HomePageTemplateId As Nullable(Of Integer)
'''<Summary>
'''Show rating on the page
'''</Summary>
<ApiMember(Description:="Show rating on the page")>
Public Overridable Property ShowRating As Nullable(Of Boolean)
'''<Summary>
'''Enable the BokaMera Homepage
'''</Summary>
<ApiMember(Description:="Enable the BokaMera Homepage")>
Public Overridable Property EnableHomepage As Nullable(Of Boolean)
'''<Summary>
'''The hero section style for the homepage
'''</Summary>
<ApiMember(Description:="The hero section style for the homepage")>
Public Overridable Property HeroSectionStyleId As Nullable(Of Integer)
End Class
End Namespace
End Namespace
VB.NET 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: testapi.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>