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

// @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(Validator="IsAuthenticated")
public class UpdateSetting : 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?

    /**
    * 
    */
    // @ApiMember(DataType="int", Description="")
    public var bookingStatusId:Int?

    /**
    * 
    */
    // @ApiMember(DataType="int", Description="")
    public var scheduleViewId:Int?

    /**
    * 
    */
    // @ApiMember(DataType="int", Description="")
    public var bookingTemplateId:Int?

    /**
    * 
    */
    // @ApiMember(DataType="int", Description="")
    public var calendarTypeId:Int?

    /**
    * 
    */
    // @ApiMember(DataType="bool", Description="")
    public var allowBookingOnUnbookedTimes:Bool?

    /**
    * 
    */
    // @DataMember(Name="SendEmailReminder")
    // @ApiMember(DataType="boolean", Description="")
    public var SendEmailReminder:Bool?

    /**
    * 
    */
    // @DataMember(Name="SendSmsReminder")
    // @ApiMember(DataType="boolean", Description="")
    public var SendSmsReminder:Bool?

    /**
    * 
    */
    // @DataMember(Name="SendEmailConfirmation")
    // @ApiMember(DataType="boolean", Description="")
    public var SendEmailConfirmation:Bool?

    /**
    * 
    */
    // @DataMember(Name="SendSmsConfirmation")
    // @ApiMember(DataType="boolean", Description="")
    public var SendSmsConfirmation:Bool?

    /**
    * 
    */
    // @ApiMember(DataType="int", Description="")
    public var emailReminderTime:Int?

    /**
    * 
    */
    // @ApiMember(DataType="int", Description="")
    public var smsReminderTime:Int?

    /**
    * 
    */
    // @ApiMember(DataType="int", Description="")
    public var maxActiveBookings:Int?

    /**
    * 
    */
    // @ApiMember(DataType="bool", Description="")
    public var sendNotifications:Bool?

    /**
    * 
    */
    // @ApiMember(DataType="string", Description="")
    public var sendNotificationsEmail:String

    /**
    * Message text field that could be used inside message templates using [MessageText].
    */
    // @ApiMember(DataType="string", Description="Message text field that could be used inside message templates using [MessageText].")
    public var messageText:String

    /**
    * 
    */
    // @ApiMember(DataType="bool", Description="")
    public var enableMobileApp:Bool?

    /**
    * The admin scheduler start time to show as default
    */
    // @ApiMember(Description="The admin scheduler start time to show as default")
    @TimeSpan public var scheduleStartTime:TimeInterval?

    /**
    * The admin scheduler end time to show as default
    */
    // @ApiMember(Description="The admin scheduler end time to show as default")
    @TimeSpan public var scheduleEndTime:TimeInterval?

    /**
    * Booking receipt text.
    */
    // @ApiMember(DataType="string", Description="Booking receipt text.")
    public var receiptTemplate:String

    /**
    * The admin scheduler minutes of each timeslot
    */
    // @ApiMember(Description="The admin scheduler minutes of each timeslot")
    public var scheduleTimeSlotMinutes:Int?

    /**
    * The admin scheduler if each resources should be shown in a seperate group
    */
    // @ApiMember(Description="The admin scheduler if each resources should be shown in a seperate group")
    public var scheduleGroupResources:Bool?

    /**
    * The admin scheduler if the horizontal scrolling should be turned off
    */
    // @ApiMember(DataType="boolean", Description="The admin scheduler if the horizontal scrolling should be turned off")
    public var schedulerDisableHorizontalScrolling:Bool?

    /**
    * If it's only allowed for existing customers to book
    */
    // @ApiMember(DataType="boolean", Description="If it's only allowed for existing customers to book")
    public var bookOnlyOnExistingCustomers:Bool?

    /**
    * If a unique pin code should be generated for the customer
    */
    // @ApiMember(DataType="boolean", Description="If a unique pin code should be generated for the customer")
    public var autoGenerateUniquePinCode:Bool?

    /**
    * If a user profile should be created when customer is booking time. With the property customer can login.
    */
    // @ApiMember(DataType="boolean", Description="If a user profile should be created when customer is booking time. With the property customer can login.")
    public var autoCreateUserProfile:Bool?

    /**
    * When follow up message should be sent in hours after the booking.
    */
    // @ApiMember(Description="When follow up message should be sent in hours after the booking.")
    public var followUpMessageTime:Int?

    /**
    * 
    */
    // @ApiMember(Description="")
    public var showFreeTimesLeft:Bool?

    /**
    * 
    */
    // @ApiMember(Description="")
    public var freeSpotTextsId:Int?

    /**
    * 
    */
    // @ApiMember(Description="")
    public var enableICalGroupBookings:Bool?

    /**
    * 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#
    */
    // @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 var agreementTemplate:String

    /**
    * 
    */
    // @ApiMember(Description="")
    public var scheduleShowTimeExeptions:Bool?

    /**
    * 
    */
    // @ApiMember(Description="")
    public var enableBookingsOnSameTime:Bool?

    /**
    * 
    */
    // @ApiMember(Description="")
    public var showWeekNumberSettingId:Int?

    /**
    * 
    */
    // @ApiMember(Description="")
    public var enableShowBookedTimes:Bool?

    /**
    * 
    */
    // @ApiMember(Description="")
    public var enableSendFollowUpMessage:Bool?

    /**
    * 
    */
    // @ApiMember(DataType="int", Description="")
    public var bookSpotUserResponseMinutes:Int?

    /**
    * 
    */
    // @ApiMember(DataType="boolean", Description="")
    public var isBookSpotDirectly:Bool?

    /**
    * 
    */
    // @ApiMember(DataType="int", Description="")
    public var bookSpotDirectlyTimeLeftMinutes:Int?

    /**
    * 
    */
    // @ApiMember(DataType="int", Description="")
    public var sendEmailNotificationQueue:Bool?

    /**
    * 
    */
    // @ApiMember(DataType="boolean", Description="")
    public var sendSMSNotificationQueue:Bool?

    /**
    * If you have different prices over different times per day and want it to calculate the weighted price for the booked time.
    */
    // @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 var weightedPrices:Bool?

    /**
    * 
    */
    // @ApiMember(DataType="boolean", Description="")
    public var showMultiDayAsTime:Bool?

    /**
    * 
    */
    // @ApiMember(DataType="boolean", Description="")
    public var showMultipleResourcesAsOne:Bool?

    required public init(){}
}

public class SettingResponse : Codable
{
    public var companyId:String
    /**
    * 
    */
    // @ApiMember(DataType="int", Description="")
    public var bookingStatusId:Int

    /**
    * 
    */
    // @ApiMember(DataType="int", Description="")
    public var scheduleViewId:Int

    /**
    * 
    */
    // @ApiMember(DataType="int", Description="")
    public var bookingTemplateId:Int

    /**
    * 
    */
    // @ApiMember(DataType="int", Description="")
    public var calendarTypeId:Int

    /**
    * 
    */
    // @ApiMember(DataType="boolean", Description="")
    public var allowBookingOnUnbookedTimes:Bool

    /**
    * 
    */
    // @DataMember(Name="SendEmailReminder")
    // @ApiMember(DataType="boolean", Description="")
    public var SendEmailReminder:Bool

    /**
    * 
    */
    // @DataMember(Name="SendSmsReminder")
    // @ApiMember(DataType="boolean", Description="")
    public var SendSmsReminder:Bool

    /**
    * 
    */
    // @DataMember(Name="SendEmailConfirmation")
    // @ApiMember(DataType="boolean", Description="")
    public var SendEmailConfirmation:Bool

    /**
    * 
    */
    // @DataMember(Name="SendSmsConfirmation")
    // @ApiMember(DataType="boolean", Description="")
    public var SendSmsConfirmation:Bool

    /**
    * Message text field that could be used inside message templates using [MessageText].
    */
    // @ApiMember(DataType="string", Description="Message text field that could be used inside message templates using [MessageText].")
    public var messageText:String

    /**
    * 
    */
    // @ApiMember(DataType="int", Description="")
    public var emailReminderTime:Int

    /**
    * 
    */
    // @ApiMember(DataType="int", Description="")
    public var smsReminderTime:Int

    /**
    * 
    */
    // @ApiMember(DataType="int", Description="")
    public var maxActiveBookings:Int

    /**
    * 
    */
    // @ApiMember(DataType="boolean", Description="")
    public var sendNotifications:Bool

    /**
    * 
    */
    // @ApiMember(DataType="string", Description="")
    public var sendNotificationsEmail:String

    /**
    * 
    */
    // @ApiMember(DataType="boolean", Description="")
    public var enableMobileApp:Bool

    /**
    * 
    */
    // @ApiMember(Description="")
    @TimeSpan public var scheduleStartTime:TimeInterval?

    /**
    * 
    */
    // @ApiMember(DataType="boolean", Description="")
    @TimeSpan public var scheduleEndTime:TimeInterval?

    /**
    * The admin scheduler if each resources should be shown in a seperate group
    */
    // @ApiMember(DataType="boolean", Description="The admin scheduler if each resources should be shown in a seperate group")
    public var scheduleGroupResources:Bool

    /**
    * The admin scheduler if the horizontal scrolling should be turned off
    */
    // @ApiMember(DataType="boolean", Description="The admin scheduler if the horizontal scrolling should be turned off")
    public var schedulerDisableHorizontalScrolling:Bool

    /**
    * 
    */
    // @ApiMember(DataType="string", Description="")
    public var receiptTemplate:String

    /**
    * 
    */
    // @ApiMember(DataType="int", Description="")
    public var scheduleTimeSlotMinutes:Int

    /**
    * 
    */
    // @ApiMember(DataType="boolean", Description="")
    public var showFreeTimesLeft:Bool

    /**
    * 
    */
    // @ApiMember(DataType="int", Description="")
    public var freeSpotTextsId:Int

    /**
    * 
    */
    // @ApiMember(DataType="boolean", Description="")
    public var enableICalGroupBookings:Bool

    /**
    * 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#
    */
    // @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 var agreementTemplate:String

    /**
    * 
    */
    // @ApiMember(DataType="boolean", Description="")
    public var scheduleShowTimeExeptions:Bool

    /**
    * 
    */
    // @ApiMember(DataType="boolean", Description="")
    public var enableBookingsOnSameTime:Bool

    /**
    * 
    */
    // @ApiMember(DataType="int", Description="")
    public var showWeekNumberSettingId:Int

    /**
    * 
    */
    // @ApiMember(DataType="boolean", Description="")
    public var enableShowBookedTimes:Bool

    /**
    * 
    */
    // @ApiMember(DataType="", Description="")
    public var bookSpotUserResponseMinutes:Int?

    /**
    * 
    */
    // @ApiMember(DataType="", Description="")
    public var isBookSpotDirectly:Bool

    /**
    * 
    */
    // @ApiMember(DataType="", Description="")
    public var bookSpotDirectlyTimeLeftMinutes:Int

    /**
    * 
    */
    // @ApiMember(DataType="", Description="")
    public var sendEmailNotificationQueue:Bool?

    /**
    * 
    */
    // @ApiMember(DataType="", Description="")
    public var sendSMSNotificationQueue:Bool?

    /**
    * 
    */
    // @ApiMember(Description="")
    public var enableSendFollowUpMessage:Bool

    /**
    * When follow up message should be sent in hours after the booking.
    */
    // @ApiMember(Description="When follow up message should be sent in hours after the booking.")
    public var followUpMessageTime:Int

    /**
    * If it's only allowed for existing customers to book
    */
    // @ApiMember(DataType="boolean", Description="If it's only allowed for existing customers to book")
    public var bookOnlyOnExistingCustomers:Bool

    /**
    * If a unique pin code should be generated for the customer
    */
    // @ApiMember(DataType="boolean", Description="If a unique pin code should be generated for the customer")
    public var autoGenerateUniquePinCode:Bool

    /**
    * If a user profile should be created when customer is booking time. With the property customer can login.
    */
    // @ApiMember(DataType="boolean", Description="If a user profile should be created when customer is booking time. With the property customer can login.")
    public var autoCreateUserProfile:Bool

    /**
    * The available schedule view options to choose from
    */
    // @ApiMember(Description="The available schedule view options to choose from")
    public var scheduleViewOptions:[ScheduleViewResponse] = []

    /**
    * The available week number options to choose from
    */
    // @ApiMember(Description="The available week number options to choose from")
    public var weekNumberOptions:[WeekNumberSettingResponse] = []

    /**
    * The booking template options to choose from
    */
    // @ApiMember(Description="The booking template options to choose from")
    public var bookingTemplateOptions:[BookingTemplateResponse] = []

    /**
    * The calendar type options to choose from
    */
    // @ApiMember(Description="The calendar type options to choose from")
    public var calendarTypeOptions:[CalendarTypeResponse] = []

    /**
    * The booking status options to choose from
    */
    // @ApiMember(Description="The booking status options to choose from")
    public var bookingStatusOptions:[BookingStatusOptions] = []

    /**
    * The free spot text options to choose from
    */
    // @ApiMember(Description="The free spot text options to choose from")
    public var freeSpotTextOptions:[FreeSpotTextsResponse] = []

    /**
    * If you have different prices over different times per day and want it to calculate the weighted price for the booked time.
    */
    // @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 var weightedPrices:Bool

    /**
    * 
    */
    // @ApiMember(DataType="boolean", Description="")
    public var showMultiDayAsTime:Bool

    /**
    * 
    */
    // @ApiMember(DataType="boolean", Description="")
    public var showMultipleResourcesAsOne:Bool

    required public init(){}
}

public class ScheduleViewResponse : Codable
{
    public var id:Int
    public var name:String

    required public init(){}
}

public class WeekNumberSettingResponse : Codable
{
    public var id:Int
    public var name:String
    public var Description:String

    required public init(){}
}

public class BookingTemplateResponse : Codable
{
    public var id:Int
    public var name:String
    public var Description:String
    public var usedByApplication:String

    required public init(){}
}

public class CalendarTypeResponse : Codable
{
    public var id:Int
    public var name:String
    public var Description:String
    public var active:Bool

    required public init(){}
}

public class BookingStatusOptions : Codable
{
    public var id:Int
    public var name:String
    public var Description:String

    required public init(){}
}

public class FreeSpotTextsResponse : Codable
{
    public var id:Int
    public var textSingular:String
    public var textPlural:String

    required public init(){}
}


Swift UpdateSetting DTOs

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

HTTP + XML

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/xml
Content-Type: application/xml
Content-Length: length

<UpdateSetting xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <AgreementTemplate>String</AgreementTemplate>
  <AllowBookingOnUnbookedTimes>false</AllowBookingOnUnbookedTimes>
  <AutoCreateUserProfile>false</AutoCreateUserProfile>
  <AutoGenerateUniquePinCode>false</AutoGenerateUniquePinCode>
  <BookOnlyOnExistingCustomers>false</BookOnlyOnExistingCustomers>
  <BookSpotDirectlyTimeLeftMinutes>0</BookSpotDirectlyTimeLeftMinutes>
  <BookSpotUserResponseMinutes>0</BookSpotUserResponseMinutes>
  <BookingStatusId>0</BookingStatusId>
  <BookingTemplateId>0</BookingTemplateId>
  <CalendarTypeId>0</CalendarTypeId>
  <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
  <EmailReminderTime>0</EmailReminderTime>
  <EnableBookingsOnSameTime>false</EnableBookingsOnSameTime>
  <EnableICalGroupBookings>false</EnableICalGroupBookings>
  <EnableMobileApp>false</EnableMobileApp>
  <EnableSendFollowUpMessage>false</EnableSendFollowUpMessage>
  <EnableShowBookedTimes>false</EnableShowBookedTimes>
  <FollowUpMessageTime>0</FollowUpMessageTime>
  <FreeSpotTextsId>0</FreeSpotTextsId>
  <IsBookSpotDirectly>false</IsBookSpotDirectly>
  <MaxActiveBookings>0</MaxActiveBookings>
  <MessageText>String</MessageText>
  <ReceiptTemplate>String</ReceiptTemplate>
  <ScheduleEndTime>PT0S</ScheduleEndTime>
  <ScheduleGroupResources>false</ScheduleGroupResources>
  <ScheduleShowTimeExeptions>false</ScheduleShowTimeExeptions>
  <ScheduleStartTime>PT0S</ScheduleStartTime>
  <ScheduleTimeSlotMinutes>0</ScheduleTimeSlotMinutes>
  <ScheduleViewId>0</ScheduleViewId>
  <SchedulerDisableHorizontalScrolling>false</SchedulerDisableHorizontalScrolling>
  <SendEmailConfirmation>false</SendEmailConfirmation>
  <SendEmailNotificationQueue>false</SendEmailNotificationQueue>
  <SendEmailReminder>false</SendEmailReminder>
  <SendNotifications>false</SendNotifications>
  <SendNotificationsEmail>String</SendNotificationsEmail>
  <SendSMSNotificationQueue>false</SendSMSNotificationQueue>
  <SendSmsConfirmation>false</SendSmsConfirmation>
  <SendSmsReminder>false</SendSmsReminder>
  <ShowFreeTimesLeft>false</ShowFreeTimesLeft>
  <ShowMultiDayAsTime>false</ShowMultiDayAsTime>
  <ShowMultipleResourcesAsOne>false</ShowMultipleResourcesAsOne>
  <ShowWeekNumberSettingId>0</ShowWeekNumberSettingId>
  <SmsReminderTime>0</SmsReminderTime>
  <WeightedPrices>false</WeightedPrices>
</UpdateSetting>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<SettingResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <AgreementTemplate>String</AgreementTemplate>
  <AllowBookingOnUnbookedTimes>false</AllowBookingOnUnbookedTimes>
  <AutoCreateUserProfile>false</AutoCreateUserProfile>
  <AutoGenerateUniquePinCode>false</AutoGenerateUniquePinCode>
  <BookOnlyOnExistingCustomers>false</BookOnlyOnExistingCustomers>
  <BookSpotDirectlyTimeLeftMinutes>0</BookSpotDirectlyTimeLeftMinutes>
  <BookSpotUserResponseMinutes>0</BookSpotUserResponseMinutes>
  <BookingStatusId>0</BookingStatusId>
  <BookingStatusOptions xmlns:d2p1="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Db">
    <d2p1:BookingStatusOptions>
      <d2p1:Description>String</d2p1:Description>
      <d2p1:Id>0</d2p1:Id>
      <d2p1:Name>String</d2p1:Name>
    </d2p1:BookingStatusOptions>
  </BookingStatusOptions>
  <BookingTemplateId>0</BookingTemplateId>
  <BookingTemplateOptions>
    <BookingTemplateResponse>
      <Description>String</Description>
      <Id>0</Id>
      <Name>String</Name>
      <UsedByApplication>String</UsedByApplication>
    </BookingTemplateResponse>
  </BookingTemplateOptions>
  <CalendarTypeId>0</CalendarTypeId>
  <CalendarTypeOptions>
    <CalendarTypeResponse>
      <Active>false</Active>
      <Description>String</Description>
      <Id>0</Id>
      <Name>String</Name>
    </CalendarTypeResponse>
  </CalendarTypeOptions>
  <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
  <EmailReminderTime>0</EmailReminderTime>
  <EnableBookingsOnSameTime>false</EnableBookingsOnSameTime>
  <EnableICalGroupBookings>false</EnableICalGroupBookings>
  <EnableMobileApp>false</EnableMobileApp>
  <EnableSendFollowUpMessage>false</EnableSendFollowUpMessage>
  <EnableShowBookedTimes>false</EnableShowBookedTimes>
  <FollowUpMessageTime>0</FollowUpMessageTime>
  <FreeSpotTextOptions>
    <FreeSpotTextsResponse>
      <Id>0</Id>
      <TextPlural>String</TextPlural>
      <TextSingular>String</TextSingular>
    </FreeSpotTextsResponse>
  </FreeSpotTextOptions>
  <FreeSpotTextsId>0</FreeSpotTextsId>
  <IsBookSpotDirectly>false</IsBookSpotDirectly>
  <MaxActiveBookings>0</MaxActiveBookings>
  <MessageText>String</MessageText>
  <ReceiptTemplate>String</ReceiptTemplate>
  <ScheduleEndTime>PT0S</ScheduleEndTime>
  <ScheduleGroupResources>false</ScheduleGroupResources>
  <ScheduleShowTimeExeptions>false</ScheduleShowTimeExeptions>
  <ScheduleStartTime>PT0S</ScheduleStartTime>
  <ScheduleTimeSlotMinutes>0</ScheduleTimeSlotMinutes>
  <ScheduleViewId>0</ScheduleViewId>
  <ScheduleViewOptions>
    <ScheduleViewResponse>
      <Id>0</Id>
      <Name>String</Name>
    </ScheduleViewResponse>
  </ScheduleViewOptions>
  <SchedulerDisableHorizontalScrolling>false</SchedulerDisableHorizontalScrolling>
  <SendEmailConfirmation>false</SendEmailConfirmation>
  <SendEmailNotificationQueue>false</SendEmailNotificationQueue>
  <SendEmailReminder>false</SendEmailReminder>
  <SendNotifications>false</SendNotifications>
  <SendNotificationsEmail>String</SendNotificationsEmail>
  <SendSMSNotificationQueue>false</SendSMSNotificationQueue>
  <SendSmsConfirmation>false</SendSmsConfirmation>
  <SendSmsReminder>false</SendSmsReminder>
  <ShowFreeTimesLeft>false</ShowFreeTimesLeft>
  <ShowMultiDayAsTime>false</ShowMultiDayAsTime>
  <ShowMultipleResourcesAsOne>false</ShowMultipleResourcesAsOne>
  <ShowWeekNumberSettingId>0</ShowWeekNumberSettingId>
  <SmsReminderTime>0</SmsReminderTime>
  <WeekNumberOptions>
    <WeekNumberSettingResponse>
      <Description>String</Description>
      <Id>0</Id>
      <Name>String</Name>
    </WeekNumberSettingResponse>
  </WeekNumberOptions>
  <WeightedPrices>false</WeightedPrices>
</SettingResponse>