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 Foundation
import ServiceStack

// @ValidateRequest(Validator="IsAuthenticated")
public class UpdateHomepageWidgetSettings : ICompany, Codable
{
    /**
    * 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 var companyId:String?

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

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

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

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

    /**
    * If the site should have dark theme or not.
    */
    // @ApiMember(Description="If the site should have dark theme or not.")
    public var darkTheme:Bool?

    /**
    * 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 var showServiceImage:Bool?

    /**
    * 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 var showRebateCodeField:Bool?

    /**
    * 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 var showNextAvailableTime:Bool?

    /**
    * 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 var showEndTime:Bool?

    /**
    * 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 var bookedTimeSlotText:String

    /**
    * If you should show the create account option.
    */
    // @ApiMember(Description="If you should show the create account option.")
    public var enableCreateAccount:Bool?

    /**
    * If you should show the login to account option.
    */
    // @ApiMember(Description="If you should show the login to account option.")
    public var enableLogin:Bool?

    /**
    * If you should show the facebook login to account option.
    */
    // @ApiMember(Description="If you should show the facebook login to account option.")
    public var enableFacebookLogin:Bool?

    /**
    * 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 var enableDirectBooking:Bool?

    required public init(){}
}

public class HomepageWidgetSettingsQueryResponse : Codable
{
    /**
    * The company id.
    */
    // @ApiMember(Description="The company id.")
    public var companyId:String

    /**
    * The service layouts id.
    */
    // @ApiMember(Description="The service layouts id.")
    public var serviceLayoutId:Int

    /**
    * The time layouts id.
    */
    // @ApiMember(Description="The time layouts id.")
    public var timeLayoutId:Int

    /**
    * The booking layouts id.
    */
    // @ApiMember(Description="The booking layouts id.")
    public var bookingLayoutId:Int

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

    /**
    * 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 var showServiceImage:Bool

    /**
    * 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 var showRebateCodeField:Bool

    /**
    * 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 var showNextAvailableTime:Bool

    /**
    * If you should show the create account option.
    */
    // @ApiMember(Description="If you should show the create account option.")
    public var enableCreateAccount:Bool

    /**
    * If you should show the login to account option.
    */
    // @ApiMember(Description="If you should show the login to account option.")
    public var enableLogin:Bool

    /**
    * If you should show the facebook login to account option.
    */
    // @ApiMember(Description="If you should show the facebook login to account option.")
    public var enableFacebookLogin:Bool

    /**
    * 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 var enableDirectBooking:Bool

    /**
    * If the site should have dark theme or not.
    */
    // @ApiMember(Description="If the site should have dark theme or not.")
    public var darkTheme:Bool

    /**
    * 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 var showEndTime:Bool

    /**
    * 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 var bookedTimeSlotText:String

    public var serviceLayoutOptions:[HomepageWidgetServiceLayoutsResponse] = []
    public var timeLayoutOptions:[HomepageWidgetTimeLayoutsResponse] = []
    public var bookingLayoutOptions:[HomepageWidgetBookingLayoutsResponse] = []
    public var bookingMethodOptions:[HomepageWidgetBookingMethodsResponse] = []

    required public init(){}
}

public class HomepageWidgetServiceLayoutsResponse : Codable
{
    /**
    * The layout id.
    */
    // @ApiMember(Description="The layout id.")
    public var id:Int

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

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

    /**
    * The layout code.
    */
    // @ApiMember(Description="The layout code.")
    public var code:String

    required public init(){}
}

public class HomepageWidgetTimeLayoutsResponse : Codable
{
    /**
    * The layout id.
    */
    // @ApiMember(Description="The layout id.")
    public var id:Int

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

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

    /**
    * The layout code.
    */
    // @ApiMember(Description="The layout code.")
    public var code:String

    required public init(){}
}

public class HomepageWidgetBookingLayoutsResponse : Codable
{
    /**
    * The layout id.
    */
    // @ApiMember(Description="The layout id.")
    public var id:Int

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

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

    /**
    * The layout code.
    */
    // @ApiMember(Description="The layout code.")
    public var code:String

    required public init(){}
}

public class HomepageWidgetBookingMethodsResponse : Codable
{
    /**
    * The layout id.
    */
    // @ApiMember(Description="The layout id.")
    public var id:Int

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

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

    /**
    * The layout code.
    */
    // @ApiMember(Description="The layout code.")
    public var code:String

    required public init(){}
}


Swift 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: testapi.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,"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,"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"}]}