BokaMera.API.Host

<back to all web services

SettingQuery

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin, bookingsupplier-administrator-read
The following routes are available for this service:
GET/settingsGet settings for the currently logged in userGet settings for 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 SettingQuery:
    # @ApiMember(DataType="boolean", Description="If you want to include the schedule views to select from", ParameterType="query")
    include_schedule_view_options: bool = False
    """
    If you want to include the schedule views to select from
    """


    # @ApiMember(DataType="boolean", Description="If you want to include the week number settings to select from", ParameterType="query")
    include_week_number_options: bool = False
    """
    If you want to include the week number settings to select from
    """


    # @ApiMember(DataType="boolean", Description="If you want to include the booking template options to select from", ParameterType="query")
    include_booking_template_options: bool = False
    """
    If you want to include the booking template options to select from
    """


    # @ApiMember(DataType="boolean", Description="If you want to include the calendar type options to select from", ParameterType="query")
    include_calendar_type_options: bool = False
    """
    If you want to include the calendar type options to select from
    """


    # @ApiMember(DataType="boolean", Description="If you want to include the booking status options to select from", ParameterType="query")
    include_booking_status_options: bool = False
    """
    If you want to include the booking status options to select from
    """


    # @ApiMember(DataType="boolean", Description="If you want to include the Free spot text options to select from", ParameterType="query")
    include_free_spot_text_options: bool = False
    """
    If you want to include the Free spot text options to select from
    """

Python SettingQuery 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.

GET /settings HTTP/1.1 
Host: api.bokamera.se 
Accept: application/xml
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>