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.*


@ValidateRequest(Validator="IsAuthenticated")
open class UpdateHomepageWidgetSettings : 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.")
    var CompanyId:UUID? = null

    /**
    * Serivce Layout.
    */
    @ApiMember(Description="Serivce Layout.")
    var ServiceLayoutId:Int? = null

    /**
    * Time Layout.
    */
    @ApiMember(Description="Time Layout.")
    var TimeLayoutId:Int? = null

    /**
    * Booking Layout.
    */
    @ApiMember(Description="Booking Layout.")
    var BookingLayoutId:Int? = null

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

    /**
    * If the site should have dark theme or not.
    */
    @ApiMember(Description="If the site should have dark theme or not.")
    var DarkTheme:Boolean? = 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.")
    var ShowServiceImage:Boolean? = 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.")
    var ShowRebateCodeField:Boolean? = 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.")
    var ShowNextAvailableTime:Boolean? = 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.")
    var ShowEndTime:Boolean? = null

    /**
    * Show subscribe to newsletter checkbox on the page
    */
    @ApiMember(Description="Show subscribe to newsletter checkbox on the page")
    var ShowSubscribeToNewsletter:Boolean? = 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")
    var BookedTimeSlotText:String? = null

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

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

    /**
    * If you should show the facebook login to account option.
    */
    @ApiMember(Description="If you should show the facebook login to account option.")
    var EnableFacebookLogin:Boolean? = 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.")
    var EnableDirectBooking:Boolean? = null
}

open class HomepageWidgetSettingsQueryResponse
{
    /**
    * The company id.
    */
    @ApiMember(Description="The company id.")
    var CompanyId:UUID? = null

    /**
    * The service layouts id.
    */
    @ApiMember(Description="The service layouts id.")
    var ServiceLayoutId:Int? = null

    /**
    * The time layouts id.
    */
    @ApiMember(Description="The time layouts id.")
    var TimeLayoutId:Int? = null

    /**
    * The booking layouts id.
    */
    @ApiMember(Description="The booking layouts id.")
    var BookingLayoutId:Int? = null

    /**
    * The primary color of the booking widget.
    */
    @ApiMember(Description="The primary color of the booking widget.")
    var PrimaryColor:String? = 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.")
    var ShowServiceImage:Boolean? = 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.")
    var ShowRebateCodeField:Boolean? = 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.")
    var ShowNextAvailableTime:Boolean? = 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.")
    var ShowSubscribeToNewsletter:Boolean? = null

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

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

    /**
    * If you should show the facebook login to account option.
    */
    @ApiMember(Description="If you should show the facebook login to account option.")
    var EnableFacebookLogin:Boolean? = 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.")
    var EnableDirectBooking:Boolean? = null

    /**
    * If the site should have dark theme or not.
    */
    @ApiMember(Description="If the site should have dark theme or not.")
    var DarkTheme:Boolean? = 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.")
    var ShowEndTime:Boolean? = 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")
    var BookedTimeSlotText:String? = null

    var ServiceLayoutOptions:ArrayList<HomepageWidgetServiceLayoutsResponse> = ArrayList<HomepageWidgetServiceLayoutsResponse>()
    var TimeLayoutOptions:ArrayList<HomepageWidgetTimeLayoutsResponse> = ArrayList<HomepageWidgetTimeLayoutsResponse>()
    var BookingLayoutOptions:ArrayList<HomepageWidgetBookingLayoutsResponse> = ArrayList<HomepageWidgetBookingLayoutsResponse>()
    var BookingMethodOptions:ArrayList<HomepageWidgetBookingMethodsResponse> = ArrayList<HomepageWidgetBookingMethodsResponse>()
}

open class HomepageWidgetServiceLayoutsResponse
{
    /**
    * The layout id.
    */
    @ApiMember(Description="The layout id.")
    var Id:Int? = null

    /**
    * The layout name.
    */
    @ApiMember(Description="The layout name.")
    var Name:String? = null

    /**
    * The layout description.
    */
    @ApiMember(Description="The layout description.")
    var Description:String? = null

    /**
    * The layout code.
    */
    @ApiMember(Description="The layout code.")
    var Code:String? = null
}

open class HomepageWidgetTimeLayoutsResponse
{
    /**
    * The layout id.
    */
    @ApiMember(Description="The layout id.")
    var Id:Int? = null

    /**
    * The layout name.
    */
    @ApiMember(Description="The layout name.")
    var Name:String? = null

    /**
    * The layout description.
    */
    @ApiMember(Description="The layout description.")
    var Description:String? = null

    /**
    * The layout code.
    */
    @ApiMember(Description="The layout code.")
    var Code:String? = null
}

open class HomepageWidgetBookingLayoutsResponse
{
    /**
    * The layout id.
    */
    @ApiMember(Description="The layout id.")
    var Id:Int? = null

    /**
    * The layout name.
    */
    @ApiMember(Description="The layout name.")
    var Name:String? = null

    /**
    * The layout description.
    */
    @ApiMember(Description="The layout description.")
    var Description:String? = null

    /**
    * The layout code.
    */
    @ApiMember(Description="The layout code.")
    var Code:String? = null
}

open class HomepageWidgetBookingMethodsResponse
{
    /**
    * The layout id.
    */
    @ApiMember(Description="The layout id.")
    var Id:Int? = null

    /**
    * The layout name.
    */
    @ApiMember(Description="The layout name.")
    var Name:String? = null

    /**
    * The layout description.
    */
    @ApiMember(Description="The layout description.")
    var Description:String? = null

    /**
    * The layout code.
    */
    @ApiMember(Description="The layout code.")
    var Code:String? = null
}

Kotlin UpdateHomepageWidgetSettings DTOs

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

HTTP + JSV

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/jsv
Content-Type: text/jsv
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/jsv
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
		}
	]
}