BokaMera.API.Host

<back to all web services

UpdateSetting

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
PUT/settingsUpdate settings for the company of the currently logged in userUpdate settings for the company of the currently logged in user.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using BokaMera.API.ServiceModel.Dtos;
using BokaMera.API.ServiceModel.Db;

namespace BokaMera.API.ServiceModel.Db
{
    public partial class BookingStatusOptions
    {
        public virtual int Id { get; set; }
        public virtual string Name { get; set; }
        public virtual string Description { get; set; }
    }

}

namespace BokaMera.API.ServiceModel.Dtos
{
    public partial class BookingTemplateResponse
    {
        public virtual int Id { get; set; }
        public virtual string Name { get; set; }
        public virtual string Description { get; set; }
        public virtual string UsedByApplication { get; set; }
    }

    public partial class CalendarTypeResponse
    {
        public virtual int Id { get; set; }
        public virtual string Name { get; set; }
        public virtual string Description { get; set; }
        public virtual bool Active { get; set; }
    }

    public partial class FreeSpotTextsResponse
    {
        public virtual int Id { get; set; }
        public virtual string TextSingular { get; set; }
        public virtual string TextPlural { get; set; }
    }

    public partial class ScheduleViewResponse
    {
        public virtual int Id { get; set; }
        public virtual string Name { get; set; }
    }

    public partial class SettingResponse
    {
        public SettingResponse()
        {
            ScheduleViewOptions = new List<ScheduleViewResponse>{};
            WeekNumberOptions = new List<WeekNumberSettingResponse>{};
            BookingTemplateOptions = new List<BookingTemplateResponse>{};
            CalendarTypeOptions = new List<CalendarTypeResponse>{};
            BookingStatusOptions = new List<BookingStatusOptions>{};
            FreeSpotTextOptions = new List<FreeSpotTextsResponse>{};
        }

        public virtual Guid CompanyId { get; set; }
        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="int", Description="")]
        public virtual int BookingStatusId { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="int", Description="")]
        public virtual int ScheduleViewId { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="int", Description="")]
        public virtual int BookingTemplateId { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="int", Description="")]
        public virtual int CalendarTypeId { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="boolean", Description="")]
        public virtual bool AllowBookingOnUnbookedTimes { get; set; }

        ///<summary>
        ///
        ///</summary>
        [DataMember(Name="SendEmailReminder")]
        [ApiMember(DataType="boolean", Description="")]
        public virtual bool SendEmailReminder { get; set; }

        ///<summary>
        ///
        ///</summary>
        [DataMember(Name="SendSmsReminder")]
        [ApiMember(DataType="boolean", Description="")]
        public virtual bool SendSmsReminder { get; set; }

        ///<summary>
        ///
        ///</summary>
        [DataMember(Name="SendEmailConfirmation")]
        [ApiMember(DataType="boolean", Description="")]
        public virtual bool SendEmailConfirmation { get; set; }

        ///<summary>
        ///
        ///</summary>
        [DataMember(Name="SendSmsConfirmation")]
        [ApiMember(DataType="boolean", Description="")]
        public virtual bool SendSmsConfirmation { get; set; }

        ///<summary>
        ///Message text field that could be used inside message templates using [MessageText].
        ///</summary>
        [ApiMember(DataType="string", Description="Message text field that could be used inside message templates using [MessageText].")]
        public virtual string MessageText { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="int", Description="")]
        public virtual int EmailReminderTime { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="int", Description="")]
        public virtual int SmsReminderTime { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="int", Description="")]
        public virtual int MaxActiveBookings { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="boolean", Description="")]
        public virtual bool SendNotifications { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="string", Description="")]
        public virtual string SendNotificationsEmail { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="boolean", Description="")]
        public virtual bool EnableMobileApp { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(Description="")]
        public virtual TimeSpan? ScheduleStartTime { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="boolean", Description="")]
        public virtual TimeSpan? ScheduleEndTime { get; set; }

        ///<summary>
        ///The admin scheduler if each resources should be shown in a seperate group
        ///</summary>
        [ApiMember(DataType="boolean", Description="The admin scheduler if each resources should be shown in a seperate group")]
        public virtual bool ScheduleGroupResources { get; set; }

        ///<summary>
        ///The admin scheduler if the horizontal scrolling should be turned off
        ///</summary>
        [ApiMember(DataType="boolean", Description="The admin scheduler if the horizontal scrolling should be turned off")]
        public virtual bool SchedulerDisableHorizontalScrolling { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="string", Description="")]
        public virtual string ReceiptTemplate { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="int", Description="")]
        public virtual int ScheduleTimeSlotMinutes { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="boolean", Description="")]
        public virtual bool ShowFreeTimesLeft { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="int", Description="")]
        public virtual int FreeSpotTextsId { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="boolean", Description="")]
        public virtual bool EnableICalGroupBookings { get; set; }

        ///<summary>
        ///Booking agreement text. All html needs to entered using markup. Read about markup here https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet. Use this editor to create markup https://stackedit.io/app#
        ///</summary>
        [ApiMember(DataType="string", Description="Booking agreement text. All html needs to entered using markup. Read about markup here https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet. Use this editor to create markup https://stackedit.io/app#")]
        public virtual string AgreementTemplate { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="boolean", Description="")]
        public virtual bool ScheduleShowTimeExeptions { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="boolean", Description="")]
        public virtual bool EnableBookingsOnSameTime { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="int", Description="")]
        public virtual int ShowWeekNumberSettingId { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="boolean", Description="")]
        public virtual bool EnableShowBookedTimes { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="", Description="")]
        public virtual int? BookSpotUserResponseMinutes { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="", Description="")]
        public virtual bool IsBookSpotDirectly { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="", Description="")]
        public virtual int BookSpotDirectlyTimeLeftMinutes { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="", Description="")]
        public virtual bool? SendEmailNotificationQueue { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="", Description="")]
        public virtual bool? SendSMSNotificationQueue { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(Description="")]
        public virtual bool EnableSendFollowUpMessage { get; set; }

        ///<summary>
        ///When follow up message should be sent in hours after the booking.
        ///</summary>
        [ApiMember(Description="When follow up message should be sent in hours after the booking.")]
        public virtual int FollowUpMessageTime { get; set; }

        ///<summary>
        ///If it's only allowed for existing customers to book
        ///</summary>
        [ApiMember(DataType="boolean", Description="If it's only allowed for existing customers to book")]
        public virtual bool BookOnlyOnExistingCustomers { get; set; }

        ///<summary>
        ///If a unique pin code should be generated for the customer
        ///</summary>
        [ApiMember(DataType="boolean", Description="If a unique pin code should be generated for the customer")]
        public virtual bool AutoGenerateUniquePinCode { get; set; }

        ///<summary>
        ///If a user profile should be created when customer is booking time. With the property customer can login.
        ///</summary>
        [ApiMember(DataType="boolean", Description="If a user profile should be created when customer is booking time. With the property customer can login.")]
        public virtual bool AutoCreateUserProfile { get; set; }

        ///<summary>
        ///The available schedule view options to choose from
        ///</summary>
        [ApiMember(Description="The available schedule view options to choose from")]
        public virtual List<ScheduleViewResponse> ScheduleViewOptions { get; set; }

        ///<summary>
        ///The available week number options to choose from
        ///</summary>
        [ApiMember(Description="The available week number options to choose from")]
        public virtual List<WeekNumberSettingResponse> WeekNumberOptions { get; set; }

        ///<summary>
        ///The booking template options to choose from
        ///</summary>
        [ApiMember(Description="The booking template options to choose from")]
        public virtual List<BookingTemplateResponse> BookingTemplateOptions { get; set; }

        ///<summary>
        ///The calendar type options to choose from
        ///</summary>
        [ApiMember(Description="The calendar type options to choose from")]
        public virtual List<CalendarTypeResponse> CalendarTypeOptions { get; set; }

        ///<summary>
        ///The booking status options to choose from
        ///</summary>
        [ApiMember(Description="The booking status options to choose from")]
        public virtual List<BookingStatusOptions> BookingStatusOptions { get; set; }

        ///<summary>
        ///The free spot text options to choose from
        ///</summary>
        [ApiMember(Description="The free spot text options to choose from")]
        public virtual List<FreeSpotTextsResponse> FreeSpotTextOptions { get; set; }

        ///<summary>
        ///If you have different prices over different times per day and want it to calculate the weighted price for the booked time.
        ///</summary>
        [ApiMember(DataType="boolean", Description="If you have different prices over different times per day and want it to calculate the weighted price for the booked time.")]
        public virtual bool WeightedPrices { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="boolean", Description="")]
        public virtual bool ShowMultiDayAsTime { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="boolean", Description="")]
        public virtual bool ShowMultipleResourcesAsOne { get; set; }
    }

    [ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)]
    [ApiResponse(Description="You have too low privilegies to call this service", StatusCode=403)]
    [ValidateRequest("IsAuthenticated")]
    public partial class UpdateSetting
        : 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 virtual Guid? CompanyId { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="int", Description="")]
        public virtual int? BookingStatusId { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="int", Description="")]
        public virtual int? ScheduleViewId { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="int", Description="")]
        public virtual int? BookingTemplateId { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="int", Description="")]
        public virtual int? CalendarTypeId { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="bool", Description="")]
        public virtual bool? AllowBookingOnUnbookedTimes { get; set; }

        ///<summary>
        ///
        ///</summary>
        [DataMember(Name="SendEmailReminder")]
        [ApiMember(DataType="boolean", Description="")]
        public virtual bool? SendEmailReminder { get; set; }

        ///<summary>
        ///
        ///</summary>
        [DataMember(Name="SendSmsReminder")]
        [ApiMember(DataType="boolean", Description="")]
        public virtual bool? SendSmsReminder { get; set; }

        ///<summary>
        ///
        ///</summary>
        [DataMember(Name="SendEmailConfirmation")]
        [ApiMember(DataType="boolean", Description="")]
        public virtual bool? SendEmailConfirmation { get; set; }

        ///<summary>
        ///
        ///</summary>
        [DataMember(Name="SendSmsConfirmation")]
        [ApiMember(DataType="boolean", Description="")]
        public virtual bool? SendSmsConfirmation { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="int", Description="")]
        public virtual int? EmailReminderTime { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="int", Description="")]
        public virtual int? SmsReminderTime { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="int", Description="")]
        public virtual int? MaxActiveBookings { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="bool", Description="")]
        public virtual bool? SendNotifications { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="string", Description="")]
        public virtual string SendNotificationsEmail { get; set; }

        ///<summary>
        ///Message text field that could be used inside message templates using [MessageText].
        ///</summary>
        [ApiMember(DataType="string", Description="Message text field that could be used inside message templates using [MessageText].")]
        public virtual string MessageText { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="bool", Description="")]
        public virtual bool? EnableMobileApp { get; set; }

        ///<summary>
        ///The admin scheduler start time to show as default
        ///</summary>
        [ApiMember(Description="The admin scheduler start time to show as default")]
        public virtual TimeSpan? ScheduleStartTime { get; set; }

        ///<summary>
        ///The admin scheduler end time to show as default
        ///</summary>
        [ApiMember(Description="The admin scheduler end time to show as default")]
        public virtual TimeSpan? ScheduleEndTime { get; set; }

        ///<summary>
        ///Booking receipt text.
        ///</summary>
        [ApiMember(DataType="string", Description="Booking receipt text.")]
        public virtual string ReceiptTemplate { get; set; }

        ///<summary>
        ///The admin scheduler minutes of each timeslot
        ///</summary>
        [ApiMember(Description="The admin scheduler minutes of each timeslot")]
        public virtual int? ScheduleTimeSlotMinutes { get; set; }

        ///<summary>
        ///The admin scheduler if each resources should be shown in a seperate group
        ///</summary>
        [ApiMember(Description="The admin scheduler if each resources should be shown in a seperate group")]
        public virtual bool? ScheduleGroupResources { get; set; }

        ///<summary>
        ///The admin scheduler if the horizontal scrolling should be turned off
        ///</summary>
        [ApiMember(DataType="boolean", Description="The admin scheduler if the horizontal scrolling should be turned off")]
        public virtual bool? SchedulerDisableHorizontalScrolling { get; set; }

        ///<summary>
        ///If it's only allowed for existing customers to book
        ///</summary>
        [ApiMember(DataType="boolean", Description="If it's only allowed for existing customers to book")]
        public virtual bool? BookOnlyOnExistingCustomers { get; set; }

        ///<summary>
        ///If a unique pin code should be generated for the customer
        ///</summary>
        [ApiMember(DataType="boolean", Description="If a unique pin code should be generated for the customer")]
        public virtual bool? AutoGenerateUniquePinCode { get; set; }

        ///<summary>
        ///If a user profile should be created when customer is booking time. With the property customer can login.
        ///</summary>
        [ApiMember(DataType="boolean", Description="If a user profile should be created when customer is booking time. With the property customer can login.")]
        public virtual bool? AutoCreateUserProfile { get; set; }

        ///<summary>
        ///When follow up message should be sent in hours after the booking.
        ///</summary>
        [ApiMember(Description="When follow up message should be sent in hours after the booking.")]
        public virtual int? FollowUpMessageTime { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(Description="")]
        public virtual bool? ShowFreeTimesLeft { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(Description="")]
        public virtual int? FreeSpotTextsId { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(Description="")]
        public virtual bool? EnableICalGroupBookings { get; set; }

        ///<summary>
        ///Booking agreement text. All html needs to entered using markup. Read about markup here https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet. Use this editor to create markup https://stackedit.io/app#
        ///</summary>
        [ApiMember(DataType="string", Description="Booking agreement text. All html needs to entered using markup. Read about markup here https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet. Use this editor to create markup https://stackedit.io/app#")]
        public virtual string AgreementTemplate { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(Description="")]
        public virtual bool? ScheduleShowTimeExeptions { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(Description="")]
        public virtual bool? EnableBookingsOnSameTime { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(Description="")]
        public virtual int? ShowWeekNumberSettingId { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(Description="")]
        public virtual bool? EnableShowBookedTimes { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(Description="")]
        public virtual bool? EnableSendFollowUpMessage { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="int", Description="")]
        public virtual int? BookSpotUserResponseMinutes { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="boolean", Description="")]
        public virtual bool? IsBookSpotDirectly { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="int", Description="")]
        public virtual int? BookSpotDirectlyTimeLeftMinutes { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="int", Description="")]
        public virtual bool? SendEmailNotificationQueue { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="boolean", Description="")]
        public virtual bool? SendSMSNotificationQueue { get; set; }

        ///<summary>
        ///If you have different prices over different times per day and want it to calculate the weighted price for the booked time.
        ///</summary>
        [ApiMember(DataType="boolean", Description="If you have different prices over different times per day and want it to calculate the weighted price for the booked time.")]
        public virtual bool? WeightedPrices { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="boolean", Description="")]
        public virtual bool? ShowMultiDayAsTime { get; set; }

        ///<summary>
        ///
        ///</summary>
        [ApiMember(DataType="boolean", Description="")]
        public virtual bool? ShowMultipleResourcesAsOne { get; set; }
    }

    public partial class WeekNumberSettingResponse
    {
        public virtual int Id { get; set; }
        public virtual string Name { get; set; }
        public virtual string Description { get; set; }
    }

}

C# UpdateSetting DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

PUT /settings HTTP/1.1 
Host: api.bokamera.se 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"CompanyId":"00000000-0000-0000-0000-000000000000","BookingStatusId":0,"ScheduleViewId":0,"BookingTemplateId":0,"CalendarTypeId":0,"AllowBookingOnUnbookedTimes":false,"SendEmailReminder":false,"SendSmsReminder":false,"SendEmailConfirmation":false,"SendSmsConfirmation":false,"EmailReminderTime":0,"SmsReminderTime":0,"MaxActiveBookings":0,"SendNotifications":false,"SendNotificationsEmail":"String","MessageText":"String","EnableMobileApp":false,"ScheduleStartTime":"00:00:00","ScheduleEndTime":"00:00:00","ReceiptTemplate":"String","ScheduleTimeSlotMinutes":0,"ScheduleGroupResources":false,"SchedulerDisableHorizontalScrolling":false,"BookOnlyOnExistingCustomers":false,"AutoGenerateUniquePinCode":false,"AutoCreateUserProfile":false,"FollowUpMessageTime":0,"ShowFreeTimesLeft":false,"FreeSpotTextsId":0,"EnableICalGroupBookings":false,"AgreementTemplate":"String","ScheduleShowTimeExeptions":false,"EnableBookingsOnSameTime":false,"ShowWeekNumberSettingId":0,"EnableShowBookedTimes":false,"EnableSendFollowUpMessage":false,"BookSpotUserResponseMinutes":0,"IsBookSpotDirectly":false,"BookSpotDirectlyTimeLeftMinutes":0,"SendEmailNotificationQueue":false,"SendSMSNotificationQueue":false,"WeightedPrices":false,"ShowMultiDayAsTime":false,"ShowMultipleResourcesAsOne":false}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"BookingStatusId":0,"ScheduleViewId":0,"BookingTemplateId":0,"CalendarTypeId":0,"AllowBookingOnUnbookedTimes":false,"SendEmailReminder":false,"SendSmsReminder":false,"SendEmailConfirmation":false,"SendSmsConfirmation":false,"MessageText":"String","EmailReminderTime":0,"SmsReminderTime":0,"MaxActiveBookings":0,"SendNotifications":false,"SendNotificationsEmail":"String","EnableMobileApp":false,"ScheduleStartTime":"00:00:00","ScheduleEndTime":"00:00:00","ScheduleGroupResources":false,"SchedulerDisableHorizontalScrolling":false,"ReceiptTemplate":"String","ScheduleTimeSlotMinutes":0,"ShowFreeTimesLeft":false,"FreeSpotTextsId":0,"EnableICalGroupBookings":false,"AgreementTemplate":"String","ScheduleShowTimeExeptions":false,"EnableBookingsOnSameTime":false,"ShowWeekNumberSettingId":0,"EnableShowBookedTimes":false,"BookSpotUserResponseMinutes":0,"IsBookSpotDirectly":false,"BookSpotDirectlyTimeLeftMinutes":0,"SendEmailNotificationQueue":false,"SendSMSNotificationQueue":false,"EnableSendFollowUpMessage":false,"FollowUpMessageTime":0,"BookOnlyOnExistingCustomers":false,"AutoGenerateUniquePinCode":false,"AutoCreateUserProfile":false,"ScheduleViewOptions":[{"Id":0,"Name":"String"}],"WeekNumberOptions":[{"Id":0,"Name":"String","Description":"String"}],"BookingTemplateOptions":[{"Id":0,"Name":"String","Description":"String","UsedByApplication":"String"}],"CalendarTypeOptions":[{"Id":0,"Name":"String","Description":"String","Active":false}],"BookingStatusOptions":[{"Id":0,"Name":"String","Description":"String"}],"FreeSpotTextOptions":[{"Id":0,"TextSingular":"String","TextPlural":"String"}],"WeightedPrices":false,"ShowMultiDayAsTime":false,"ShowMultipleResourcesAsOne":false}