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.
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    @ValidateRequest(Validator="IsAuthenticated")
    public static class UpdateHomepageWidgetSettings implements ICompany
    {
        /**
        * The company id, if empty will use the company id for the user you are logged in with.
        */
        @ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.")
        public UUID CompanyId = null;

        /**
        * Serivce Layout.
        */
        @ApiMember(Description="Serivce Layout.")
        public Integer ServiceLayoutId = null;

        /**
        * Time Layout.
        */
        @ApiMember(Description="Time Layout.")
        public Integer TimeLayoutId = null;

        /**
        * Booking Layout.
        */
        @ApiMember(Description="Booking Layout.")
        public Integer BookingLayoutId = null;

        /**
        * The primary color of the booking widget.
        */
        @ApiMember(Description="The primary color of the booking widget.")
        public String PrimaryColor = null;

        /**
        * If the site should have dark theme or not.
        */
        @ApiMember(Description="If the site should have dark theme or not.")
        public Boolean DarkTheme = null;

        /**
        * If you should show the service image in the booking widget.
        */
        @ApiMember(Description="If you should show the service image in the booking widget.")
        public Boolean ShowServiceImage = null;

        /**
        * If you should show the rebate code field in the booking widget.
        */
        @ApiMember(Description="If you should show the rebate code field in the booking widget.")
        public Boolean ShowRebateCodeField = null;

        /**
        * If you should show the next available time in the booking widget.
        */
        @ApiMember(Description="If you should show the next available time in the booking widget.")
        public Boolean ShowNextAvailableTime = null;

        /**
        * If you should show the end time in the booking widget.
        */
        @ApiMember(Description="If you should show the end time in the booking widget.")
        public Boolean ShowEndTime = null;

        /**
        * Show subscribe to newsletter checkbox on the page
        */
        @ApiMember(Description="Show subscribe to newsletter checkbox on the page")
        public Boolean ShowSubscribeToNewsletter = null;

        /**
        * What text to show on booked time slots. Default text is Booked
        */
        @ApiMember(Description="What text to show on booked time slots. Default text is Booked")
        public String BookedTimeSlotText = null;

        /**
        * If you should show the create account option.
        */
        @ApiMember(Description="If you should show the create account option.")
        public Boolean EnableCreateAccount = null;

        /**
        * If you should show the login to account option.
        */
        @ApiMember(Description="If you should show the login to account option.")
        public Boolean EnableLogin = null;

        /**
        * If you should show the facebook login to account option.
        */
        @ApiMember(Description="If you should show the facebook login to account option.")
        public Boolean EnableFacebookLogin = null;

        /**
        * If you should show the direct booking option. This enables customer to book with entering contact information.
        */
        @ApiMember(Description="If you should show the direct booking option. This enables customer to book with entering contact information.")
        public Boolean EnableDirectBooking = null;
        
        public UUID getCompanyId() { return CompanyId; }
        public UpdateHomepageWidgetSettings setCompanyId(UUID value) { this.CompanyId = value; return this; }
        public Integer getServiceLayoutId() { return ServiceLayoutId; }
        public UpdateHomepageWidgetSettings setServiceLayoutId(Integer value) { this.ServiceLayoutId = value; return this; }
        public Integer getTimeLayoutId() { return TimeLayoutId; }
        public UpdateHomepageWidgetSettings setTimeLayoutId(Integer value) { this.TimeLayoutId = value; return this; }
        public Integer getBookingLayoutId() { return BookingLayoutId; }
        public UpdateHomepageWidgetSettings setBookingLayoutId(Integer value) { this.BookingLayoutId = value; return this; }
        public String getPrimaryColor() { return PrimaryColor; }
        public UpdateHomepageWidgetSettings setPrimaryColor(String value) { this.PrimaryColor = value; return this; }
        public Boolean isDarkTheme() { return DarkTheme; }
        public UpdateHomepageWidgetSettings setDarkTheme(Boolean value) { this.DarkTheme = value; return this; }
        public Boolean isShowServiceImage() { return ShowServiceImage; }
        public UpdateHomepageWidgetSettings setShowServiceImage(Boolean value) { this.ShowServiceImage = value; return this; }
        public Boolean isShowRebateCodeField() { return ShowRebateCodeField; }
        public UpdateHomepageWidgetSettings setShowRebateCodeField(Boolean value) { this.ShowRebateCodeField = value; return this; }
        public Boolean isShowNextAvailableTime() { return ShowNextAvailableTime; }
        public UpdateHomepageWidgetSettings setShowNextAvailableTime(Boolean value) { this.ShowNextAvailableTime = value; return this; }
        public Boolean isShowEndTime() { return ShowEndTime; }
        public UpdateHomepageWidgetSettings setShowEndTime(Boolean value) { this.ShowEndTime = value; return this; }
        public Boolean isShowSubscribeToNewsletter() { return ShowSubscribeToNewsletter; }
        public UpdateHomepageWidgetSettings setShowSubscribeToNewsletter(Boolean value) { this.ShowSubscribeToNewsletter = value; return this; }
        public String getBookedTimeSlotText() { return BookedTimeSlotText; }
        public UpdateHomepageWidgetSettings setBookedTimeSlotText(String value) { this.BookedTimeSlotText = value; return this; }
        public Boolean isEnableCreateAccount() { return EnableCreateAccount; }
        public UpdateHomepageWidgetSettings setEnableCreateAccount(Boolean value) { this.EnableCreateAccount = value; return this; }
        public Boolean isEnableLogin() { return EnableLogin; }
        public UpdateHomepageWidgetSettings setEnableLogin(Boolean value) { this.EnableLogin = value; return this; }
        public Boolean isEnableFacebookLogin() { return EnableFacebookLogin; }
        public UpdateHomepageWidgetSettings setEnableFacebookLogin(Boolean value) { this.EnableFacebookLogin = value; return this; }
        public Boolean isEnableDirectBooking() { return EnableDirectBooking; }
        public UpdateHomepageWidgetSettings setEnableDirectBooking(Boolean value) { this.EnableDirectBooking = value; return this; }
    }

    public static class HomepageWidgetSettingsQueryResponse
    {
        /**
        * The company id.
        */
        @ApiMember(Description="The company id.")
        public UUID CompanyId = null;

        /**
        * The service layouts id.
        */
        @ApiMember(Description="The service layouts id.")
        public Integer ServiceLayoutId = null;

        /**
        * The time layouts id.
        */
        @ApiMember(Description="The time layouts id.")
        public Integer TimeLayoutId = null;

        /**
        * The booking layouts id.
        */
        @ApiMember(Description="The booking layouts id.")
        public Integer BookingLayoutId = null;

        /**
        * The primary color of the booking widget.
        */
        @ApiMember(Description="The primary color of the booking widget.")
        public String PrimaryColor = null;

        /**
        * If you should show the service image in the booking widget.
        */
        @ApiMember(Description="If you should show the service image in the booking widget.")
        public Boolean ShowServiceImage = null;

        /**
        * If you should show the rebate code field in the booking widget.
        */
        @ApiMember(Description="If you should show the rebate code field in the booking widget.")
        public Boolean ShowRebateCodeField = null;

        /**
        * If you should show the next available time in the booking widget.
        */
        @ApiMember(Description="If you should show the next available time in the booking widget.")
        public Boolean ShowNextAvailableTime = null;

        /**
        * If you should show the subscribe to newsletter checkbox in the booking widget.
        */
        @ApiMember(Description="If you should show the subscribe to newsletter checkbox in the booking widget.")
        public Boolean ShowSubscribeToNewsletter = null;

        /**
        * If you should show the create account option.
        */
        @ApiMember(Description="If you should show the create account option.")
        public Boolean EnableCreateAccount = null;

        /**
        * If you should show the login to account option.
        */
        @ApiMember(Description="If you should show the login to account option.")
        public Boolean EnableLogin = null;

        /**
        * If you should show the facebook login to account option.
        */
        @ApiMember(Description="If you should show the facebook login to account option.")
        public Boolean EnableFacebookLogin = null;

        /**
        * If you should show the direct booking option. This enables customer to book with entering contact information.
        */
        @ApiMember(Description="If you should show the direct booking option. This enables customer to book with entering contact information.")
        public Boolean EnableDirectBooking = null;

        /**
        * If the site should have dark theme or not.
        */
        @ApiMember(Description="If the site should have dark theme or not.")
        public Boolean DarkTheme = null;

        /**
        * If you should show the end time in the booking widget.
        */
        @ApiMember(Description="If you should show the end time in the booking widget.")
        public Boolean ShowEndTime = null;

        /**
        * What text to show on booked time slots. Default text is Booked
        */
        @ApiMember(Description="What text to show on booked time slots. Default text is Booked")
        public String BookedTimeSlotText = null;

        public ArrayList<HomepageWidgetServiceLayoutsResponse> ServiceLayoutOptions = null;
        public ArrayList<HomepageWidgetTimeLayoutsResponse> TimeLayoutOptions = null;
        public ArrayList<HomepageWidgetBookingLayoutsResponse> BookingLayoutOptions = null;
        public ArrayList<HomepageWidgetBookingMethodsResponse> BookingMethodOptions = null;
        
        public UUID getCompanyId() { return CompanyId; }
        public HomepageWidgetSettingsQueryResponse setCompanyId(UUID value) { this.CompanyId = value; return this; }
        public Integer getServiceLayoutId() { return ServiceLayoutId; }
        public HomepageWidgetSettingsQueryResponse setServiceLayoutId(Integer value) { this.ServiceLayoutId = value; return this; }
        public Integer getTimeLayoutId() { return TimeLayoutId; }
        public HomepageWidgetSettingsQueryResponse setTimeLayoutId(Integer value) { this.TimeLayoutId = value; return this; }
        public Integer getBookingLayoutId() { return BookingLayoutId; }
        public HomepageWidgetSettingsQueryResponse setBookingLayoutId(Integer value) { this.BookingLayoutId = value; return this; }
        public String getPrimaryColor() { return PrimaryColor; }
        public HomepageWidgetSettingsQueryResponse setPrimaryColor(String value) { this.PrimaryColor = value; return this; }
        public Boolean isShowServiceImage() { return ShowServiceImage; }
        public HomepageWidgetSettingsQueryResponse setShowServiceImage(Boolean value) { this.ShowServiceImage = value; return this; }
        public Boolean isShowRebateCodeField() { return ShowRebateCodeField; }
        public HomepageWidgetSettingsQueryResponse setShowRebateCodeField(Boolean value) { this.ShowRebateCodeField = value; return this; }
        public Boolean isShowNextAvailableTime() { return ShowNextAvailableTime; }
        public HomepageWidgetSettingsQueryResponse setShowNextAvailableTime(Boolean value) { this.ShowNextAvailableTime = value; return this; }
        public Boolean isShowSubscribeToNewsletter() { return ShowSubscribeToNewsletter; }
        public HomepageWidgetSettingsQueryResponse setShowSubscribeToNewsletter(Boolean value) { this.ShowSubscribeToNewsletter = value; return this; }
        public Boolean isEnableCreateAccount() { return EnableCreateAccount; }
        public HomepageWidgetSettingsQueryResponse setEnableCreateAccount(Boolean value) { this.EnableCreateAccount = value; return this; }
        public Boolean isEnableLogin() { return EnableLogin; }
        public HomepageWidgetSettingsQueryResponse setEnableLogin(Boolean value) { this.EnableLogin = value; return this; }
        public Boolean isEnableFacebookLogin() { return EnableFacebookLogin; }
        public HomepageWidgetSettingsQueryResponse setEnableFacebookLogin(Boolean value) { this.EnableFacebookLogin = value; return this; }
        public Boolean isEnableDirectBooking() { return EnableDirectBooking; }
        public HomepageWidgetSettingsQueryResponse setEnableDirectBooking(Boolean value) { this.EnableDirectBooking = value; return this; }
        public Boolean isDarkTheme() { return DarkTheme; }
        public HomepageWidgetSettingsQueryResponse setDarkTheme(Boolean value) { this.DarkTheme = value; return this; }
        public Boolean isShowEndTime() { return ShowEndTime; }
        public HomepageWidgetSettingsQueryResponse setShowEndTime(Boolean value) { this.ShowEndTime = value; return this; }
        public String getBookedTimeSlotText() { return BookedTimeSlotText; }
        public HomepageWidgetSettingsQueryResponse setBookedTimeSlotText(String value) { this.BookedTimeSlotText = value; return this; }
        public ArrayList<HomepageWidgetServiceLayoutsResponse> getServiceLayoutOptions() { return ServiceLayoutOptions; }
        public HomepageWidgetSettingsQueryResponse setServiceLayoutOptions(ArrayList<HomepageWidgetServiceLayoutsResponse> value) { this.ServiceLayoutOptions = value; return this; }
        public ArrayList<HomepageWidgetTimeLayoutsResponse> getTimeLayoutOptions() { return TimeLayoutOptions; }
        public HomepageWidgetSettingsQueryResponse setTimeLayoutOptions(ArrayList<HomepageWidgetTimeLayoutsResponse> value) { this.TimeLayoutOptions = value; return this; }
        public ArrayList<HomepageWidgetBookingLayoutsResponse> getBookingLayoutOptions() { return BookingLayoutOptions; }
        public HomepageWidgetSettingsQueryResponse setBookingLayoutOptions(ArrayList<HomepageWidgetBookingLayoutsResponse> value) { this.BookingLayoutOptions = value; return this; }
        public ArrayList<HomepageWidgetBookingMethodsResponse> getBookingMethodOptions() { return BookingMethodOptions; }
        public HomepageWidgetSettingsQueryResponse setBookingMethodOptions(ArrayList<HomepageWidgetBookingMethodsResponse> value) { this.BookingMethodOptions = value; return this; }
    }

    public static class HomepageWidgetServiceLayoutsResponse
    {
        /**
        * The layout id.
        */
        @ApiMember(Description="The layout id.")
        public Integer Id = null;

        /**
        * The layout name.
        */
        @ApiMember(Description="The layout name.")
        public String Name = null;

        /**
        * The layout description.
        */
        @ApiMember(Description="The layout description.")
        public String Description = null;

        /**
        * The layout code.
        */
        @ApiMember(Description="The layout code.")
        public String Code = null;
        
        public Integer getId() { return Id; }
        public HomepageWidgetServiceLayoutsResponse setId(Integer value) { this.Id = value; return this; }
        public String getName() { return Name; }
        public HomepageWidgetServiceLayoutsResponse setName(String value) { this.Name = value; return this; }
        public String getDescription() { return Description; }
        public HomepageWidgetServiceLayoutsResponse setDescription(String value) { this.Description = value; return this; }
        public String getCode() { return Code; }
        public HomepageWidgetServiceLayoutsResponse setCode(String value) { this.Code = value; return this; }
    }

    public static class HomepageWidgetTimeLayoutsResponse
    {
        /**
        * The layout id.
        */
        @ApiMember(Description="The layout id.")
        public Integer Id = null;

        /**
        * The layout name.
        */
        @ApiMember(Description="The layout name.")
        public String Name = null;

        /**
        * The layout description.
        */
        @ApiMember(Description="The layout description.")
        public String Description = null;

        /**
        * The layout code.
        */
        @ApiMember(Description="The layout code.")
        public String Code = null;
        
        public Integer getId() { return Id; }
        public HomepageWidgetTimeLayoutsResponse setId(Integer value) { this.Id = value; return this; }
        public String getName() { return Name; }
        public HomepageWidgetTimeLayoutsResponse setName(String value) { this.Name = value; return this; }
        public String getDescription() { return Description; }
        public HomepageWidgetTimeLayoutsResponse setDescription(String value) { this.Description = value; return this; }
        public String getCode() { return Code; }
        public HomepageWidgetTimeLayoutsResponse setCode(String value) { this.Code = value; return this; }
    }

    public static class HomepageWidgetBookingLayoutsResponse
    {
        /**
        * The layout id.
        */
        @ApiMember(Description="The layout id.")
        public Integer Id = null;

        /**
        * The layout name.
        */
        @ApiMember(Description="The layout name.")
        public String Name = null;

        /**
        * The layout description.
        */
        @ApiMember(Description="The layout description.")
        public String Description = null;

        /**
        * The layout code.
        */
        @ApiMember(Description="The layout code.")
        public String Code = null;
        
        public Integer getId() { return Id; }
        public HomepageWidgetBookingLayoutsResponse setId(Integer value) { this.Id = value; return this; }
        public String getName() { return Name; }
        public HomepageWidgetBookingLayoutsResponse setName(String value) { this.Name = value; return this; }
        public String getDescription() { return Description; }
        public HomepageWidgetBookingLayoutsResponse setDescription(String value) { this.Description = value; return this; }
        public String getCode() { return Code; }
        public HomepageWidgetBookingLayoutsResponse setCode(String value) { this.Code = value; return this; }
    }

    public static class HomepageWidgetBookingMethodsResponse
    {
        /**
        * The layout id.
        */
        @ApiMember(Description="The layout id.")
        public Integer Id = null;

        /**
        * The layout name.
        */
        @ApiMember(Description="The layout name.")
        public String Name = null;

        /**
        * The layout description.
        */
        @ApiMember(Description="The layout description.")
        public String Description = null;

        /**
        * The layout code.
        */
        @ApiMember(Description="The layout code.")
        public String Code = null;
        
        public Integer getId() { return Id; }
        public HomepageWidgetBookingMethodsResponse setId(Integer value) { this.Id = value; return this; }
        public String getName() { return Name; }
        public HomepageWidgetBookingMethodsResponse setName(String value) { this.Name = value; return this; }
        public String getDescription() { return Description; }
        public HomepageWidgetBookingMethodsResponse setDescription(String value) { this.Description = value; return this; }
        public String getCode() { return Code; }
        public HomepageWidgetBookingMethodsResponse setCode(String value) { this.Code = value; return this; }
    }

}

Java UpdateHomepageWidgetSettings DTOs

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

HTTP + CSV

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: api.bokamera.se 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"CompanyId":"00000000-0000-0000-0000-000000000000","ServiceLayoutId":0,"TimeLayoutId":0,"BookingLayoutId":0,"PrimaryColor":"String","DarkTheme":false,"ShowServiceImage":false,"ShowRebateCodeField":false,"ShowNextAvailableTime":false,"ShowEndTime":false,"ShowSubscribeToNewsletter":false,"BookedTimeSlotText":"String","EnableCreateAccount":false,"EnableLogin":false,"EnableFacebookLogin":false,"EnableDirectBooking":false}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"ServiceLayoutId":0,"TimeLayoutId":0,"BookingLayoutId":0,"PrimaryColor":"String","ShowServiceImage":false,"ShowRebateCodeField":false,"ShowNextAvailableTime":false,"ShowSubscribeToNewsletter":false,"EnableCreateAccount":false,"EnableLogin":false,"EnableFacebookLogin":false,"EnableDirectBooking":false,"DarkTheme":false,"ShowEndTime":false,"BookedTimeSlotText":"String","ServiceLayoutOptions":[{"Id":0,"Name":"String","Description":"String","Code":"String"}],"TimeLayoutOptions":[{"Id":0,"Name":"String","Description":"String","Code":"String"}],"BookingLayoutOptions":[{"Id":0,"Name":"String","Description":"String","Code":"String"}],"BookingMethodOptions":[{"Id":0,"Name":"String","Description":"String","Code":"String"}]}