BokaMera.API.Host

<back to all web services

UpdateHomepageWidgetSettings

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
PUT/homepage/widget/settingsUpdate homepage widget settingsUpdate homepage widget 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 HomepageWidgetBookingLayoutsResponse
    {
        ///<summary>
        ///The layout id.
        ///</summary>
        [ApiMember(Description="The layout id.")]
        public virtual int Id { get; set; }

        ///<summary>
        ///The layout name.
        ///</summary>
        [ApiMember(Description="The layout name.")]
        public virtual string Name { get; set; }

        ///<summary>
        ///The layout description.
        ///</summary>
        [ApiMember(Description="The layout description.")]
        public virtual string Description { get; set; }

        ///<summary>
        ///The layout code.
        ///</summary>
        [ApiMember(Description="The layout code.")]
        public virtual string Code { get; set; }
    }

    public partial class HomepageWidgetBookingMethodsResponse
    {
        ///<summary>
        ///The layout id.
        ///</summary>
        [ApiMember(Description="The layout id.")]
        public virtual int Id { get; set; }

        ///<summary>
        ///The layout name.
        ///</summary>
        [ApiMember(Description="The layout name.")]
        public virtual string Name { get; set; }

        ///<summary>
        ///The layout description.
        ///</summary>
        [ApiMember(Description="The layout description.")]
        public virtual string Description { get; set; }

        ///<summary>
        ///The layout code.
        ///</summary>
        [ApiMember(Description="The layout code.")]
        public virtual string Code { get; set; }
    }

    public partial class HomepageWidgetServiceLayoutsResponse
    {
        ///<summary>
        ///The layout id.
        ///</summary>
        [ApiMember(Description="The layout id.")]
        public virtual int Id { get; set; }

        ///<summary>
        ///The layout name.
        ///</summary>
        [ApiMember(Description="The layout name.")]
        public virtual string Name { get; set; }

        ///<summary>
        ///The layout description.
        ///</summary>
        [ApiMember(Description="The layout description.")]
        public virtual string Description { get; set; }

        ///<summary>
        ///The layout code.
        ///</summary>
        [ApiMember(Description="The layout code.")]
        public virtual string Code { get; set; }
    }

    public partial class HomepageWidgetSettingsQueryResponse
    {
        public HomepageWidgetSettingsQueryResponse()
        {
            ServiceLayoutOptions = new List<HomepageWidgetServiceLayoutsResponse>{};
            TimeLayoutOptions = new List<HomepageWidgetTimeLayoutsResponse>{};
            BookingLayoutOptions = new List<HomepageWidgetBookingLayoutsResponse>{};
            BookingMethodOptions = new List<HomepageWidgetBookingMethodsResponse>{};
        }

        ///<summary>
        ///The company id.
        ///</summary>
        [ApiMember(Description="The company id.")]
        public virtual Guid CompanyId { get; set; }

        ///<summary>
        ///The service layouts id.
        ///</summary>
        [ApiMember(Description="The service layouts id.")]
        public virtual int ServiceLayoutId { get; set; }

        ///<summary>
        ///The time layouts id.
        ///</summary>
        [ApiMember(Description="The time layouts id.")]
        public virtual int TimeLayoutId { get; set; }

        ///<summary>
        ///The booking layouts id.
        ///</summary>
        [ApiMember(Description="The booking layouts id.")]
        public virtual int BookingLayoutId { get; set; }

        ///<summary>
        ///The primary color of the booking widget.
        ///</summary>
        [ApiMember(Description="The primary color of the booking widget.")]
        public virtual string PrimaryColor { get; set; }

        ///<summary>
        ///If you should show the service image in the booking widget.
        ///</summary>
        [ApiMember(Description="If you should show the service image in the booking widget.")]
        public virtual bool ShowServiceImage { get; set; }

        ///<summary>
        ///If you should show the rebate code field in the booking widget.
        ///</summary>
        [ApiMember(Description="If you should show the rebate code field in the booking widget.")]
        public virtual bool ShowRebateCodeField { get; set; }

        ///<summary>
        ///If you should show the next available time in the booking widget.
        ///</summary>
        [ApiMember(Description="If you should show the next available time in the booking widget.")]
        public virtual bool ShowNextAvailableTime { get; set; }

        ///<summary>
        ///If you should show the create account option.
        ///</summary>
        [ApiMember(Description="If you should show the create account option.")]
        public virtual bool EnableCreateAccount { get; set; }

        ///<summary>
        ///If you should show the login to account option.
        ///</summary>
        [ApiMember(Description="If you should show the login to account option.")]
        public virtual bool EnableLogin { get; set; }

        ///<summary>
        ///If you should show the facebook login to account option.
        ///</summary>
        [ApiMember(Description="If you should show the facebook login to account option.")]
        public virtual bool EnableFacebookLogin { get; set; }

        ///<summary>
        ///If you should show the direct booking option. This enables customer to book with entering contact information.
        ///</summary>
        [ApiMember(Description="If you should show the direct booking option. This enables customer to book with entering contact information.")]
        public virtual bool EnableDirectBooking { get; set; }

        ///<summary>
        ///If the site should have dark theme or not.
        ///</summary>
        [ApiMember(Description="If the site should have dark theme or not.")]
        public virtual bool DarkTheme { get; set; }

        ///<summary>
        ///If you should show the end time in the booking widget.
        ///</summary>
        [ApiMember(Description="If you should show the end time in the booking widget.")]
        public virtual bool ShowEndTime { get; set; }

        ///<summary>
        ///What text to show on booked time slots. Default text is Booked
        ///</summary>
        [ApiMember(Description="What text to show on booked time slots. Default text is Booked")]
        public virtual string BookedTimeSlotText { get; set; }

        public virtual List<HomepageWidgetServiceLayoutsResponse> ServiceLayoutOptions { get; set; }
        public virtual List<HomepageWidgetTimeLayoutsResponse> TimeLayoutOptions { get; set; }
        public virtual List<HomepageWidgetBookingLayoutsResponse> BookingLayoutOptions { get; set; }
        public virtual List<HomepageWidgetBookingMethodsResponse> BookingMethodOptions { get; set; }
    }

    public partial class HomepageWidgetTimeLayoutsResponse
    {
        ///<summary>
        ///The layout id.
        ///</summary>
        [ApiMember(Description="The layout id.")]
        public virtual int Id { get; set; }

        ///<summary>
        ///The layout name.
        ///</summary>
        [ApiMember(Description="The layout name.")]
        public virtual string Name { get; set; }

        ///<summary>
        ///The layout description.
        ///</summary>
        [ApiMember(Description="The layout description.")]
        public virtual string Description { get; set; }

        ///<summary>
        ///The layout code.
        ///</summary>
        [ApiMember(Description="The layout code.")]
        public virtual string Code { get; set; }
    }

    [ValidateRequest("IsAuthenticated")]
    public partial class UpdateHomepageWidgetSettings
        : ICompany
    {
        ///<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.")]
        public virtual Guid? CompanyId { get; set; }

        ///<summary>
        ///Serivce Layout.
        ///</summary>
        [ApiMember(Description="Serivce Layout.")]
        public virtual int? ServiceLayoutId { get; set; }

        ///<summary>
        ///Time Layout.
        ///</summary>
        [ApiMember(Description="Time Layout.")]
        public virtual int? TimeLayoutId { get; set; }

        ///<summary>
        ///Booking Layout.
        ///</summary>
        [ApiMember(Description="Booking Layout.")]
        public virtual int? BookingLayoutId { get; set; }

        ///<summary>
        ///The primary color of the booking widget.
        ///</summary>
        [ApiMember(Description="The primary color of the booking widget.")]
        public virtual string PrimaryColor { get; set; }

        ///<summary>
        ///If the site should have dark theme or not.
        ///</summary>
        [ApiMember(Description="If the site should have dark theme or not.")]
        public virtual bool? DarkTheme { get; set; }

        ///<summary>
        ///If you should show the service image in the booking widget.
        ///</summary>
        [ApiMember(Description="If you should show the service image in the booking widget.")]
        public virtual bool? ShowServiceImage { get; set; }

        ///<summary>
        ///If you should show the rebate code field in the booking widget.
        ///</summary>
        [ApiMember(Description="If you should show the rebate code field in the booking widget.")]
        public virtual bool? ShowRebateCodeField { get; set; }

        ///<summary>
        ///If you should show the next available time in the booking widget.
        ///</summary>
        [ApiMember(Description="If you should show the next available time in the booking widget.")]
        public virtual bool? ShowNextAvailableTime { get; set; }

        ///<summary>
        ///If you should show the end time in the booking widget.
        ///</summary>
        [ApiMember(Description="If you should show the end time in the booking widget.")]
        public virtual bool? ShowEndTime { get; set; }

        ///<summary>
        ///What text to show on booked time slots. Default text is Booked
        ///</summary>
        [ApiMember(Description="What text to show on booked time slots. Default text is Booked")]
        public virtual string BookedTimeSlotText { get; set; }

        ///<summary>
        ///If you should show the create account option.
        ///</summary>
        [ApiMember(Description="If you should show the create account option.")]
        public virtual bool? EnableCreateAccount { get; set; }

        ///<summary>
        ///If you should show the login to account option.
        ///</summary>
        [ApiMember(Description="If you should show the login to account option.")]
        public virtual bool? EnableLogin { get; set; }

        ///<summary>
        ///If you should show the facebook login to account option.
        ///</summary>
        [ApiMember(Description="If you should show the facebook login to account option.")]
        public virtual bool? EnableFacebookLogin { get; set; }

        ///<summary>
        ///If you should show the direct booking option. This enables customer to book with entering contact information.
        ///</summary>
        [ApiMember(Description="If you should show the direct booking option. This enables customer to book with entering contact information.")]
        public virtual bool? EnableDirectBooking { get; set; }
    }

}

C# UpdateHomepageWidgetSettings 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.

PUT /homepage/widget/settings HTTP/1.1 
Host: testapi.bokamera.se 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<UpdateHomepageWidgetSettings xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <BookedTimeSlotText>String</BookedTimeSlotText>
  <BookingLayoutId>0</BookingLayoutId>
  <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
  <DarkTheme>false</DarkTheme>
  <EnableCreateAccount>false</EnableCreateAccount>
  <EnableDirectBooking>false</EnableDirectBooking>
  <EnableFacebookLogin>false</EnableFacebookLogin>
  <EnableLogin>false</EnableLogin>
  <PrimaryColor>String</PrimaryColor>
  <ServiceLayoutId>0</ServiceLayoutId>
  <ShowEndTime>false</ShowEndTime>
  <ShowNextAvailableTime>false</ShowNextAvailableTime>
  <ShowRebateCodeField>false</ShowRebateCodeField>
  <ShowServiceImage>false</ShowServiceImage>
  <TimeLayoutId>0</TimeLayoutId>
</UpdateHomepageWidgetSettings>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<HomepageWidgetSettingsQueryResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <BookedTimeSlotText>String</BookedTimeSlotText>
  <BookingLayoutId>0</BookingLayoutId>
  <BookingLayoutOptions>
    <HomepageWidgetBookingLayoutsResponse>
      <Code>String</Code>
      <Description>String</Description>
      <Id>0</Id>
      <Name>String</Name>
    </HomepageWidgetBookingLayoutsResponse>
  </BookingLayoutOptions>
  <BookingMethodOptions>
    <HomepageWidgetBookingMethodsResponse>
      <Code>String</Code>
      <Description>String</Description>
      <Id>0</Id>
      <Name>String</Name>
    </HomepageWidgetBookingMethodsResponse>
  </BookingMethodOptions>
  <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
  <DarkTheme>false</DarkTheme>
  <EnableCreateAccount>false</EnableCreateAccount>
  <EnableDirectBooking>false</EnableDirectBooking>
  <EnableFacebookLogin>false</EnableFacebookLogin>
  <EnableLogin>false</EnableLogin>
  <PrimaryColor>String</PrimaryColor>
  <ServiceLayoutId>0</ServiceLayoutId>
  <ServiceLayoutOptions>
    <HomepageWidgetServiceLayoutsResponse>
      <Code>String</Code>
      <Description>String</Description>
      <Id>0</Id>
      <Name>String</Name>
    </HomepageWidgetServiceLayoutsResponse>
  </ServiceLayoutOptions>
  <ShowEndTime>false</ShowEndTime>
  <ShowNextAvailableTime>false</ShowNextAvailableTime>
  <ShowRebateCodeField>false</ShowRebateCodeField>
  <ShowServiceImage>false</ShowServiceImage>
  <TimeLayoutId>0</TimeLayoutId>
  <TimeLayoutOptions>
    <HomepageWidgetTimeLayoutsResponse>
      <Code>String</Code>
      <Description>String</Description>
      <Id>0</Id>
      <Name>String</Name>
    </HomepageWidgetTimeLayoutsResponse>
  </TimeLayoutOptions>
</HomepageWidgetSettingsQueryResponse>