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 datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ScheduleViewResponse:
    id: int = 0
    name: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class WeekNumberSettingResponse:
    id: int = 0
    name: Optional[str] = None
    description: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BookingTemplateResponse:
    id: int = 0
    name: Optional[str] = None
    description: Optional[str] = None
    used_by_application: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CalendarTypeResponse:
    id: int = 0
    name: Optional[str] = None
    description: Optional[str] = None
    active: bool = False


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BookingStatusOptions:
    id: int = 0
    name: Optional[str] = None
    description: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class FreeSpotTextsResponse:
    id: int = 0
    text_singular: Optional[str] = None
    text_plural: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SettingResponse:
    company_id: Optional[str] = None
    # @ApiMember(DataType="int", Description="")
    booking_status_id: int = 0
    """
    
    """

    # @ApiMember(DataType="int", Description="")
    schedule_view_id: int = 0
    """
    
    """

    # @ApiMember(DataType="int", Description="")
    booking_template_id: int = 0
    """
    
    """

    # @ApiMember(DataType="int", Description="")
    calendar_type_id: int = 0
    """
    
    """

    # @ApiMember(DataType="boolean", Description="")
    allow_booking_on_unbooked_times: bool = False
    """
    
    """

    # @ApiMember(DataType="boolean", Description="")
    send_email_reminder: bool = False
    """
    
    """

    # @ApiMember(DataType="boolean", Description="")
    send_sms_reminder: bool = False
    """
    
    """

    # @ApiMember(DataType="boolean", Description="")
    send_email_confirmation: bool = False
    """
    
    """

    # @ApiMember(DataType="boolean", Description="")
    send_sms_confirmation: bool = False
    """
    
    """

    # @ApiMember(DataType="string", Description="Message text field that could be used inside message templates using [MessageText].")
    message_text: Optional[str] = None
    """
    Message text field that could be used inside message templates using [MessageText].
    """


    # @ApiMember(DataType="int", Description="")
    email_reminder_time: int = 0
    """
    
    """

    # @ApiMember(DataType="int", Description="")
    sms_reminder_time: int = 0
    """
    
    """

    # @ApiMember(DataType="int", Description="")
    max_active_bookings: int = 0
    """
    
    """

    # @ApiMember(DataType="boolean", Description="")
    send_notifications: bool = False
    """
    
    """

    # @ApiMember(DataType="string", Description="")
    send_notifications_email: Optional[str] = None
    """
    
    """

    # @ApiMember(DataType="boolean", Description="")
    enable_mobile_app: bool = False
    """
    
    """

    # @ApiMember(Description="")
    schedule_start_time: Optional[datetime.timedelta] = None
    """
    
    """

    # @ApiMember(DataType="boolean", Description="")
    schedule_end_time: Optional[datetime.timedelta] = None
    """
    
    """

    # @ApiMember(DataType="boolean", Description="The admin scheduler if each resources should be shown in a seperate group")
    schedule_group_resources: bool = False
    """
    The admin scheduler if each resources should be shown in a seperate group
    """


    # @ApiMember(DataType="boolean", Description="The admin scheduler if the horizontal scrolling should be turned off")
    scheduler_disable_horizontal_scrolling: bool = False
    """
    The admin scheduler if the horizontal scrolling should be turned off
    """


    # @ApiMember(DataType="string", Description="")
    receipt_template: Optional[str] = None
    """
    
    """

    # @ApiMember(DataType="int", Description="")
    schedule_time_slot_minutes: int = 0
    """
    
    """

    # @ApiMember(DataType="boolean", Description="")
    show_free_times_left: bool = False
    """
    
    """

    # @ApiMember(DataType="int", Description="")
    free_spot_texts_id: int = 0
    """
    
    """

    # @ApiMember(DataType="boolean", Description="")
    enable_i_cal_group_bookings: bool = False
    """
    
    """

    # @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#")
    agreement_template: Optional[str] = None
    """
    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="boolean", Description="")
    schedule_show_time_exeptions: bool = False
    """
    
    """

    # @ApiMember(DataType="boolean", Description="")
    enable_bookings_on_same_time: bool = False
    """
    
    """

    # @ApiMember(DataType="int", Description="")
    show_week_number_setting_id: int = 0
    """
    
    """

    # @ApiMember(DataType="boolean", Description="")
    enable_show_booked_times: bool = False
    """
    
    """

    # @ApiMember(DataType="", Description="")
    book_spot_user_response_minutes: Optional[int] = None
    """
    
    """

    # @ApiMember(DataType="", Description="")
    is_book_spot_directly: bool = False
    """
    
    """

    # @ApiMember(DataType="", Description="")
    book_spot_directly_time_left_minutes: int = 0
    """
    
    """

    # @ApiMember(DataType="", Description="")
    send_email_notification_queue: Optional[bool] = None
    """
    
    """

    # @ApiMember(DataType="", Description="")
    send_s_m_s_notification_queue: Optional[bool] = None
    """
    
    """

    # @ApiMember(Description="")
    enable_send_follow_up_message: bool = False
    """
    
    """

    # @ApiMember(Description="When follow up message should be sent in hours after the booking.")
    follow_up_message_time: int = 0
    """
    When follow up message should be sent in hours after the booking.
    """


    # @ApiMember(DataType="boolean", Description="If it's only allowed for existing customers to book")
    book_only_on_existing_customers: bool = False
    """
    If it's only allowed for existing customers to book
    """


    # @ApiMember(DataType="boolean", Description="If a unique pin code should be generated for the customer")
    auto_generate_unique_pin_code: bool = False
    """
    If a unique pin code should be generated for the customer
    """


    # @ApiMember(DataType="boolean", Description="If a user profile should be created when customer is booking time. With the property customer can login.")
    auto_create_user_profile: bool = False
    """
    If a user profile should be created when customer is booking time. With the property customer can login.
    """


    # @ApiMember(Description="The available schedule view options to choose from")
    schedule_view_options: Optional[List[ScheduleViewResponse]] = None
    """
    The available schedule view options to choose from
    """


    # @ApiMember(Description="The available week number options to choose from")
    week_number_options: Optional[List[WeekNumberSettingResponse]] = None
    """
    The available week number options to choose from
    """


    # @ApiMember(Description="The booking template options to choose from")
    booking_template_options: Optional[List[BookingTemplateResponse]] = None
    """
    The booking template options to choose from
    """


    # @ApiMember(Description="The calendar type options to choose from")
    calendar_type_options: Optional[List[CalendarTypeResponse]] = None
    """
    The calendar type options to choose from
    """


    # @ApiMember(Description="The booking status options to choose from")
    booking_status_options: Optional[List[BookingStatusOptions]] = None
    """
    The booking status options to choose from
    """


    # @ApiMember(Description="The free spot text options to choose from")
    free_spot_text_options: Optional[List[FreeSpotTextsResponse]] = None
    """
    The free spot text options to choose from
    """


    # @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.")
    weighted_prices: bool = False
    """
    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="")
    show_multi_day_as_time: bool = False
    """
    
    """

    # @ApiMember(DataType="boolean", Description="")
    show_multiple_resources_as_one: bool = False
    """
    
    """


# @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")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class UpdateSetting(ICompany):
    # @ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.")
    company_id: Optional[str] = None
    """
    The company id, if empty will use the company id for the user you are logged in with.
    """


    # @ApiMember(DataType="int", Description="")
    booking_status_id: Optional[int] = None
    """
    
    """

    # @ApiMember(DataType="int", Description="")
    schedule_view_id: Optional[int] = None
    """
    
    """

    # @ApiMember(DataType="int", Description="")
    booking_template_id: Optional[int] = None
    """
    
    """

    # @ApiMember(DataType="int", Description="")
    calendar_type_id: Optional[int] = None
    """
    
    """

    # @ApiMember(DataType="bool", Description="")
    allow_booking_on_unbooked_times: Optional[bool] = None
    """
    
    """

    # @ApiMember(DataType="boolean", Description="")
    send_email_reminder: Optional[bool] = None
    """
    
    """

    # @ApiMember(DataType="boolean", Description="")
    send_sms_reminder: Optional[bool] = None
    """
    
    """

    # @ApiMember(DataType="boolean", Description="")
    send_email_confirmation: Optional[bool] = None
    """
    
    """

    # @ApiMember(DataType="boolean", Description="")
    send_sms_confirmation: Optional[bool] = None
    """
    
    """

    # @ApiMember(DataType="int", Description="")
    email_reminder_time: Optional[int] = None
    """
    
    """

    # @ApiMember(DataType="int", Description="")
    sms_reminder_time: Optional[int] = None
    """
    
    """

    # @ApiMember(DataType="int", Description="")
    max_active_bookings: Optional[int] = None
    """
    
    """

    # @ApiMember(DataType="bool", Description="")
    send_notifications: Optional[bool] = None
    """
    
    """

    # @ApiMember(DataType="string", Description="")
    send_notifications_email: Optional[str] = None
    """
    
    """

    # @ApiMember(DataType="string", Description="Message text field that could be used inside message templates using [MessageText].")
    message_text: Optional[str] = None
    """
    Message text field that could be used inside message templates using [MessageText].
    """


    # @ApiMember(DataType="bool", Description="")
    enable_mobile_app: Optional[bool] = None
    """
    
    """

    # @ApiMember(Description="The admin scheduler start time to show as default")
    schedule_start_time: Optional[datetime.timedelta] = None
    """
    The admin scheduler start time to show as default
    """


    # @ApiMember(Description="The admin scheduler end time to show as default")
    schedule_end_time: Optional[datetime.timedelta] = None
    """
    The admin scheduler end time to show as default
    """


    # @ApiMember(DataType="string", Description="Booking receipt text.")
    receipt_template: Optional[str] = None
    """
    Booking receipt text.
    """


    # @ApiMember(Description="The admin scheduler minutes of each timeslot")
    schedule_time_slot_minutes: Optional[int] = None
    """
    The admin scheduler minutes of each timeslot
    """


    # @ApiMember(Description="The admin scheduler if each resources should be shown in a seperate group")
    schedule_group_resources: Optional[bool] = None
    """
    The admin scheduler if each resources should be shown in a seperate group
    """


    # @ApiMember(DataType="boolean", Description="The admin scheduler if the horizontal scrolling should be turned off")
    scheduler_disable_horizontal_scrolling: Optional[bool] = None
    """
    The admin scheduler if the horizontal scrolling should be turned off
    """


    # @ApiMember(DataType="boolean", Description="If it's only allowed for existing customers to book")
    book_only_on_existing_customers: Optional[bool] = None
    """
    If it's only allowed for existing customers to book
    """


    # @ApiMember(DataType="boolean", Description="If a unique pin code should be generated for the customer")
    auto_generate_unique_pin_code: Optional[bool] = None
    """
    If a unique pin code should be generated for the customer
    """


    # @ApiMember(DataType="boolean", Description="If a user profile should be created when customer is booking time. With the property customer can login.")
    auto_create_user_profile: Optional[bool] = None
    """
    If a user profile should be created when customer is booking time. With the property customer can login.
    """


    # @ApiMember(Description="When follow up message should be sent in hours after the booking.")
    follow_up_message_time: Optional[int] = None
    """
    When follow up message should be sent in hours after the booking.
    """


    # @ApiMember(Description="")
    show_free_times_left: Optional[bool] = None
    """
    
    """

    # @ApiMember(Description="")
    free_spot_texts_id: Optional[int] = None
    """
    
    """

    # @ApiMember(Description="")
    enable_i_cal_group_bookings: Optional[bool] = None
    """
    
    """

    # @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#")
    agreement_template: Optional[str] = None
    """
    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(Description="")
    schedule_show_time_exeptions: Optional[bool] = None
    """
    
    """

    # @ApiMember(Description="")
    enable_bookings_on_same_time: Optional[bool] = None
    """
    
    """

    # @ApiMember(Description="")
    show_week_number_setting_id: Optional[int] = None
    """
    
    """

    # @ApiMember(Description="")
    enable_show_booked_times: Optional[bool] = None
    """
    
    """

    # @ApiMember(Description="")
    enable_send_follow_up_message: Optional[bool] = None
    """
    
    """

    # @ApiMember(DataType="int", Description="")
    book_spot_user_response_minutes: Optional[int] = None
    """
    
    """

    # @ApiMember(DataType="boolean", Description="")
    is_book_spot_directly: Optional[bool] = None
    """
    
    """

    # @ApiMember(DataType="int", Description="")
    book_spot_directly_time_left_minutes: Optional[int] = None
    """
    
    """

    # @ApiMember(DataType="int", Description="")
    send_email_notification_queue: Optional[bool] = None
    """
    
    """

    # @ApiMember(DataType="boolean", Description="")
    send_s_m_s_notification_queue: Optional[bool] = None
    """
    
    """

    # @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.")
    weighted_prices: Optional[bool] = None
    """
    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="")
    show_multi_day_as_time: Optional[bool] = None
    """
    
    """

    # @ApiMember(DataType="boolean", Description="")
    show_multiple_resources_as_one: Optional[bool] = None
    """
    
    """

Python 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: testapi.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>