Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
PUT | /homepage/widget/settings | Update homepage widget settings | Update homepage widget settings on the company of the currently logged in user, only administrators are allowed to update homepage menu. |
---|
Imports System
Imports System.IO
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
'''<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) = New List(Of HomepageWidgetServiceLayoutsResponse)
Public Overridable Property TimeLayoutOptions As List(Of HomepageWidgetTimeLayoutsResponse) = New List(Of HomepageWidgetTimeLayoutsResponse)
Public Overridable Property BookingLayoutOptions As List(Of HomepageWidgetBookingLayoutsResponse) = New List(Of HomepageWidgetBookingLayoutsResponse)
Public Overridable Property BookingMethodOptions As List(Of HomepageWidgetBookingMethodsResponse) = New 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 Guid? Implements ICompany.CompanyId
'''<Summary>
'''Serivce Layout.
'''</Summary>
<ApiMember(Description:="Serivce Layout.")>
Public Overridable Property ServiceLayoutId As Integer?
'''<Summary>
'''Time Layout.
'''</Summary>
<ApiMember(Description:="Time Layout.")>
Public Overridable Property TimeLayoutId As Integer?
'''<Summary>
'''Booking Layout.
'''</Summary>
<ApiMember(Description:="Booking Layout.")>
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 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 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 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>
'''Show subscribe to newsletter checkbox on the page
'''</Summary>
<ApiMember(Description:="Show subscribe to newsletter checkbox on the page")>
Public Overridable Property ShowSubscribeToNewsletter 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
'''<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?
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 .xml suffix or ?format=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: api.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>
<ShowSubscribeToNewsletter>false</ShowSubscribeToNewsletter>
<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> <ShowSubscribeToNewsletter>false</ShowSubscribeToNewsletter> <TimeLayoutId>0</TimeLayoutId> <TimeLayoutOptions> <HomepageWidgetTimeLayoutsResponse> <Code>String</Code> <Description>String</Description> <Id>0</Id> <Name>String</Name> </HomepageWidgetTimeLayoutsResponse> </TimeLayoutOptions> </HomepageWidgetSettingsQueryResponse>