| 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 .jsv suffix or ?format=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
}
]
}