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.
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports BokaMera.API.ServiceModel.Dtos

Namespace Global

    Namespace BokaMera.API.ServiceModel.Dtos

        Public Partial Class HomepageWidgetBookingLayoutsResponse
            '''<Summary>
            '''The layout id.
            '''</Summary>
            <ApiMember(Description:="The layout id.")>
            Public Overridable Property Id As Integer

            '''<Summary>
            '''The layout name.
            '''</Summary>
            <ApiMember(Description:="The layout name.")>
            Public Overridable Property Name As String

            '''<Summary>
            '''The layout description.
            '''</Summary>
            <ApiMember(Description:="The layout description.")>
            Public Overridable Property Description As String

            '''<Summary>
            '''The layout code.
            '''</Summary>
            <ApiMember(Description:="The layout code.")>
            Public Overridable Property Code As String
        End Class

        Public Partial Class HomepageWidgetBookingMethodsResponse
            '''<Summary>
            '''The layout id.
            '''</Summary>
            <ApiMember(Description:="The layout id.")>
            Public Overridable Property Id As Integer

            '''<Summary>
            '''The layout name.
            '''</Summary>
            <ApiMember(Description:="The layout name.")>
            Public Overridable Property Name As String

            '''<Summary>
            '''The layout description.
            '''</Summary>
            <ApiMember(Description:="The layout description.")>
            Public Overridable Property Description As String

            '''<Summary>
            '''The layout code.
            '''</Summary>
            <ApiMember(Description:="The layout code.")>
            Public Overridable Property Code As String
        End Class

        Public Partial Class HomepageWidgetServiceLayoutsResponse
            '''<Summary>
            '''The layout id.
            '''</Summary>
            <ApiMember(Description:="The layout id.")>
            Public Overridable Property Id As Integer

            '''<Summary>
            '''The layout name.
            '''</Summary>
            <ApiMember(Description:="The layout name.")>
            Public Overridable Property Name As String

            '''<Summary>
            '''The layout description.
            '''</Summary>
            <ApiMember(Description:="The layout description.")>
            Public Overridable Property Description As String

            '''<Summary>
            '''The layout code.
            '''</Summary>
            <ApiMember(Description:="The layout code.")>
            Public Overridable Property Code As String
        End Class

        Public Partial Class HomepageWidgetSettingsQueryResponse
            Public Sub New()
                ServiceLayoutOptions = New List(Of HomepageWidgetServiceLayoutsResponse)
                TimeLayoutOptions = New List(Of HomepageWidgetTimeLayoutsResponse)
                BookingLayoutOptions = New List(Of HomepageWidgetBookingLayoutsResponse)
                BookingMethodOptions = New List(Of HomepageWidgetBookingMethodsResponse)
            End Sub

            '''<Summary>
            '''The company id.
            '''</Summary>
            <ApiMember(Description:="The company id.")>
            Public Overridable Property CompanyId As Guid

            '''<Summary>
            '''The service layouts id.
            '''</Summary>
            <ApiMember(Description:="The service layouts id.")>
            Public Overridable Property ServiceLayoutId As Integer

            '''<Summary>
            '''The time layouts id.
            '''</Summary>
            <ApiMember(Description:="The time layouts id.")>
            Public Overridable Property TimeLayoutId As Integer

            '''<Summary>
            '''The booking layouts id.
            '''</Summary>
            <ApiMember(Description:="The booking layouts id.")>
            Public Overridable Property BookingLayoutId As Integer

            '''<Summary>
            '''The primary color of the booking widget.
            '''</Summary>
            <ApiMember(Description:="The primary color of the booking widget.")>
            Public Overridable Property PrimaryColor As String

            '''<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 Overridable Property ShowServiceImage As Boolean

            '''<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 Overridable Property ShowRebateCodeField As Boolean

            '''<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 Overridable Property ShowNextAvailableTime As Boolean

            '''<Summary>
            '''If you should show the subscribe to newsletter checkbox in the booking widget.
            '''</Summary>
            <ApiMember(Description:="If you should show the subscribe to newsletter checkbox in the booking widget.")>
            Public Overridable Property ShowSubscribeToNewsletter As Boolean

            '''<Summary>
            '''If you should show the create account option.
            '''</Summary>
            <ApiMember(Description:="If you should show the create account option.")>
            Public Overridable Property EnableCreateAccount As Boolean

            '''<Summary>
            '''If you should show the login to account option.
            '''</Summary>
            <ApiMember(Description:="If you should show the login to account option.")>
            Public Overridable Property EnableLogin As Boolean

            '''<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 Overridable Property EnableFacebookLogin As Boolean

            '''<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 Overridable Property EnableDirectBooking As Boolean

            '''<Summary>
            '''If the site should have dark theme or not.
            '''</Summary>
            <ApiMember(Description:="If the site should have dark theme or not.")>
            Public Overridable Property DarkTheme As Boolean

            '''<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 Overridable Property ShowEndTime As Boolean

            '''<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 Overridable Property BookedTimeSlotText As String

            Public Overridable Property ServiceLayoutOptions As List(Of HomepageWidgetServiceLayoutsResponse)
            Public Overridable Property TimeLayoutOptions As List(Of HomepageWidgetTimeLayoutsResponse)
            Public Overridable Property BookingLayoutOptions As List(Of HomepageWidgetBookingLayoutsResponse)
            Public Overridable Property BookingMethodOptions As List(Of HomepageWidgetBookingMethodsResponse)
        End Class

        Public Partial Class HomepageWidgetTimeLayoutsResponse
            '''<Summary>
            '''The layout id.
            '''</Summary>
            <ApiMember(Description:="The layout id.")>
            Public Overridable Property Id As Integer

            '''<Summary>
            '''The layout name.
            '''</Summary>
            <ApiMember(Description:="The layout name.")>
            Public Overridable Property Name As String

            '''<Summary>
            '''The layout description.
            '''</Summary>
            <ApiMember(Description:="The layout description.")>
            Public Overridable Property Description As String

            '''<Summary>
            '''The layout code.
            '''</Summary>
            <ApiMember(Description:="The layout code.")>
            Public Overridable Property Code As String
        End Class

        <ValidateRequest(Validator:="IsAuthenticated")>
        Public Partial Class UpdateHomepageWidgetSettings
            Implements 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 Overridable Property CompanyId As Nullable(Of Guid)

            '''<Summary>
            '''Serivce Layout.
            '''</Summary>
            <ApiMember(Description:="Serivce Layout.")>
            Public Overridable Property ServiceLayoutId As Nullable(Of Integer)

            '''<Summary>
            '''Time Layout.
            '''</Summary>
            <ApiMember(Description:="Time Layout.")>
            Public Overridable Property TimeLayoutId As Nullable(Of Integer)

            '''<Summary>
            '''Booking Layout.
            '''</Summary>
            <ApiMember(Description:="Booking Layout.")>
            Public Overridable Property BookingLayoutId As Nullable(Of Integer)

            '''<Summary>
            '''The primary color of the booking widget.
            '''</Summary>
            <ApiMember(Description:="The primary color of the booking widget.")>
            Public Overridable Property PrimaryColor As String

            '''<Summary>
            '''If the site should have dark theme or not.
            '''</Summary>
            <ApiMember(Description:="If the site should have dark theme or not.")>
            Public Overridable Property DarkTheme As Nullable(Of Boolean)

            '''<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 Overridable Property ShowServiceImage As Nullable(Of Boolean)

            '''<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 Overridable Property ShowRebateCodeField As Nullable(Of Boolean)

            '''<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 Overridable Property ShowNextAvailableTime As Nullable(Of Boolean)

            '''<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 Overridable Property ShowEndTime As Nullable(Of Boolean)

            '''<Summary>
            '''Show subscribe to newsletter checkbox on the page
            '''</Summary>
            <ApiMember(Description:="Show subscribe to newsletter checkbox on the page")>
            Public Overridable Property ShowSubscribeToNewsletter As Nullable(Of Boolean)

            '''<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 Overridable Property BookedTimeSlotText As String

            '''<Summary>
            '''If you should show the create account option.
            '''</Summary>
            <ApiMember(Description:="If you should show the create account option.")>
            Public Overridable Property EnableCreateAccount As Nullable(Of Boolean)

            '''<Summary>
            '''If you should show the login to account option.
            '''</Summary>
            <ApiMember(Description:="If you should show the login to account option.")>
            Public Overridable Property EnableLogin As Nullable(Of Boolean)

            '''<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 Overridable Property EnableFacebookLogin As Nullable(Of Boolean)

            '''<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 Overridable Property EnableDirectBooking As Nullable(Of Boolean)
        End Class
    End Namespace
End Namespace

VB.NET UpdateHomepageWidgetSettings DTOs

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

HTTP + OTHER

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