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 .jsv suffix or ?format=jsv
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: text/jsv
Content-Type: text/jsv
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: text/jsv 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 } ] }