BokaMera.API.Host

<back to all web services

HomepageSettingsQuery

The following routes are available for this service:
GET/homepage/settingsGet the homepage settings for the company
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class HomepageTemplateResponse:
    # @ApiMember(Description="The template id")
    id: int = 0
    """
    The template id
    """


    # @ApiMember(Description="The template name")
    name: Optional[str] = None
    """
    The template name
    """


    # @ApiMember(Description="The template description")
    description: Optional[str] = None
    """
    The template description
    """


    # @ApiMember(Description="The template image url")
    image_url: Optional[str] = None
    """
    The template image url
    """


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class HomepageHeroSectionStyleResponse:
    # @ApiMember(Description="The hero section style id")
    id: int = 0
    """
    The hero section style id
    """


    # @ApiMember(Description="The hero section style name")
    name: Optional[str] = None
    """
    The hero section style name
    """


    # @ApiMember(Description="The hero section style description")
    description: Optional[str] = None
    """
    The hero section style description
    """


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class HomepageSettingsQueryResponse:
    # @ApiMember(Description="The company id")
    company_id: Optional[str] = None
    """
    The company id
    """


    # @ApiMember(Description="The text for homepage heading")
    homepage_heading: Optional[str] = None
    """
    The text for homepage heading
    """


    # @ApiMember(Description="The text for homepage startpage heading")
    welcome_page_heading: Optional[str] = None
    """
    The text for homepage startpage heading
    """


    # @ApiMember(Description="The text for homepage startpage body")
    welcome_page_body: Optional[str] = None
    """
    The text for homepage startpage body
    """


    # @ApiMember(Description="The text for homepage about us page heading")
    about_us_page_heading: Optional[str] = None
    """
    The text for homepage about us page heading
    """


    # @ApiMember(Description="The text for homepage about us page body")
    about_us_page_body: Optional[str] = None
    """
    The text for homepage about us page body
    """


    # @ApiMember(Description="The startpage image url")
    image_url: Optional[str] = None
    """
    The startpage image url
    """


    # @ApiMember(Description="The template for the homepage")
    home_page_template_id: int = 0
    """
    The template for the homepage
    """


    # @ApiMember(Description="The hero section style for the homepage")
    hero_section_style_id: int = 0
    """
    The hero section style for the homepage
    """


    # @ApiMember(Description="Show rating on the page")
    show_rating: bool = False
    """
    Show rating on the page
    """


    # @ApiMember(Description="Enable the BokaMera Homepage")
    enable_homepage: bool = False
    """
    Enable the BokaMera Homepage
    """


    # @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.")
    updated: Optional[datetime.datetime] = None
    """
    Will show when the homepage settings was created, note it will only be shown if your logged in as admin for the company.
    """


    # @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.")
    created: Optional[datetime.datetime] = None
    """
    Will show when the homepage settings was updated, note it will only be shown if your logged in as admin for the company.
    """


    # @ApiMember(DataType="boolean", Description="The homepage templates options to select from", ParameterType="query")
    home_page_template_options: Optional[List[HomepageTemplateResponse]] = None
    """
    The homepage templates options to select from
    """


    # @ApiMember(DataType="boolean", Description="The homepage hero section style options to select from", ParameterType="query")
    homepage_hero_section_style_options: Optional[List[HomepageHeroSectionStyleResponse]] = None
    """
    The homepage hero section style options to select from
    """


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class HomepageSettingsQuery(ICompany, ICompanyRequest):
    # @ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.", ParameterType="path")
    company_id: Optional[str] = None
    """
    The company id, if empty will use the company id for the user you are logged in with.
    """


    # @ApiMember(DataType="boolean", Description="If you want to include the homepage template options to select from", ParameterType="query")
    include_home_page_template_options: bool = False
    """
    If you want to include the homepage template options to select from
    """


    # @ApiMember(DataType="boolean", Description="If you want to include the homepage hero section style options to select from", ParameterType="query")
    include_home_page_hero_section_style_options: bool = False
    """
    If you want to include the homepage hero section style options to select from
    """


    # @ApiMember(Description="The homeage sitepath.")
    site_path: Optional[str] = None
    """
    The homeage sitepath.
    """

Python HomepageSettingsQuery DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + 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>