GET | /homepage/settings | Get the homepage settings for the company |
---|
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 HomepageSettingsQuery
: ICompany, ICompanyRequest
{
///<summary>
///The company id, if empty will use the company id for the user you are logged in with.
///</summary>
[ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.", ParameterType="path")]
public virtual Guid? CompanyId { get; set; }
///<summary>
///If you want to include the homepage template options to select from
///</summary>
[ApiMember(DataType="boolean", Description="If you want to include the homepage template options to select from", ParameterType="query")]
public virtual bool IncludeHomePageTemplateOptions { get; set; }
///<summary>
///If you want to include the homepage hero section style options to select from
///</summary>
[ApiMember(DataType="boolean", Description="If you want to include the homepage hero section style options to select from", ParameterType="query")]
public virtual bool IncludeHomePageHeroSectionStyleOptions { get; set; }
///<summary>
///The homeage sitepath.
///</summary>
[ApiMember(Description="The homeage sitepath.")]
public virtual string SitePath { 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; }
}
}
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.
GET /homepage/settings HTTP/1.1 Host: api.bokamera.se Accept: application/xml
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>