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. |
---|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using BokaMera.API.ServiceModel.Dtos;
namespace BokaMera.API.ServiceModel.Dtos
{
public partial class HomepageHeroSectionStyleResponse
{
///<summary>
///The hero section style id
///</summary>
[ApiMember(Description="The hero section style id")]
public virtual int Id { get; set; }
///<summary>
///The hero section style name
///</summary>
[ApiMember(Description="The hero section style name")]
public virtual string Name { get; set; }
///<summary>
///The hero section style description
///</summary>
[ApiMember(Description="The hero section style description")]
public virtual string Description { get; set; }
}
public partial class HomepageSettingsQueryResponse
{
public HomepageSettingsQueryResponse()
{
HomePageTemplateOptions = new List<HomepageTemplateResponse>{};
HomepageHeroSectionStyleOptions = new List<HomepageHeroSectionStyleResponse>{};
}
///<summary>
///The company id
///</summary>
[ApiMember(Description="The company id")]
public virtual Guid CompanyId { get; set; }
///<summary>
///The text for homepage heading
///</summary>
[ApiMember(Description="The text for homepage heading")]
public virtual string HomepageHeading { get; set; }
///<summary>
///The text for homepage startpage heading
///</summary>
[ApiMember(Description="The text for homepage startpage heading")]
public virtual string WelcomePageHeading { get; set; }
///<summary>
///The text for homepage startpage body
///</summary>
[ApiMember(Description="The text for homepage startpage body")]
public virtual string WelcomePageBody { get; set; }
///<summary>
///The text for homepage about us page heading
///</summary>
[ApiMember(Description="The text for homepage about us page heading")]
public virtual string AboutUsPageHeading { get; set; }
///<summary>
///The text for homepage about us page body
///</summary>
[ApiMember(Description="The text for homepage about us page body")]
public virtual string AboutUsPageBody { get; set; }
///<summary>
///The startpage image url
///</summary>
[ApiMember(Description="The startpage image url")]
public virtual Uri ImageUrl { get; set; }
///<summary>
///The template for the homepage
///</summary>
[ApiMember(Description="The template for the homepage")]
public virtual int HomePageTemplateId { get; set; }
///<summary>
///The hero section style for the homepage
///</summary>
[ApiMember(Description="The hero section style for the homepage")]
public virtual int HeroSectionStyleId { get; set; }
///<summary>
///Show rating on the page
///</summary>
[ApiMember(Description="Show rating on the page")]
public virtual bool ShowRating { get; set; }
///<summary>
///Enable the BokaMera Homepage
///</summary>
[ApiMember(Description="Enable the BokaMera Homepage")]
public virtual bool EnableHomepage { 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.")]
public virtual DateTime? Updated { 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.")]
public virtual DateTime? Created { get; set; }
///<summary>
///The homepage templates options to select from
///</summary>
[ApiMember(DataType="boolean", Description="The homepage templates options to select from", ParameterType="query")]
public virtual List<HomepageTemplateResponse> HomePageTemplateOptions { 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")]
public virtual List<HomepageHeroSectionStyleResponse> HomepageHeroSectionStyleOptions { get; set; }
}
public partial class HomepageTemplateResponse
{
///<summary>
///The template id
///</summary>
[ApiMember(Description="The template id")]
public virtual int Id { get; set; }
///<summary>
///The template name
///</summary>
[ApiMember(Description="The template name")]
public virtual string Name { get; set; }
///<summary>
///The template description
///</summary>
[ApiMember(Description="The template description")]
public virtual string Description { get; set; }
///<summary>
///The template image url
///</summary>
[ApiMember(Description="The template image url")]
public virtual Uri ImageUrl { get; set; }
}
[ValidateRequest("IsAuthenticated")]
public partial class UpdateHomepageSettings
: ICompany
{
///<summary>
///The company id
///</summary>
[ApiMember(Description="The company id")]
public virtual Guid? CompanyId { get; set; }
///<summary>
///The text for homepage heading
///</summary>
[ApiMember(Description="The text for homepage heading")]
public virtual string HomepageHeading { get; set; }
///<summary>
///The text for homepage startpage heading
///</summary>
[ApiMember(Description="The text for homepage startpage heading")]
public virtual string WelcomePageHeading { get; set; }
///<summary>
///The text for homepage startpage body
///</summary>
[ApiMember(Description="The text for homepage startpage body")]
public virtual string WelcomePageBody { get; set; }
///<summary>
///The text for homepage about us page heading
///</summary>
[ApiMember(Description="The text for homepage about us page heading")]
public virtual string AboutUsPageHeading { get; set; }
///<summary>
///The text for homepage about us page body
///</summary>
[ApiMember(Description="The text for homepage about us page body")]
public virtual string AboutUsPageBody { get; set; }
///<summary>
///The start page image url
///</summary>
[ApiMember(Description="The start page image url")]
public virtual Uri ImageUrl { get; set; }
///<summary>
///The template for the homepage
///</summary>
[ApiMember(Description="The template for the homepage")]
public virtual int? HomePageTemplateId { get; set; }
///<summary>
///Show rating on the page
///</summary>
[ApiMember(Description="Show rating on the page")]
public virtual bool? ShowRating { get; set; }
///<summary>
///Enable the BokaMera Homepage
///</summary>
[ApiMember(Description="Enable the BokaMera Homepage")]
public virtual bool? EnableHomepage { get; set; }
///<summary>
///The hero section style for the homepage
///</summary>
[ApiMember(Description="The hero section style for the homepage")]
public virtual int? HeroSectionStyleId { get; set; }
}
}
C# 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
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/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"}]}