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 .jsv suffix or ?format=jsv

HTTP + JSV

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: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
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: PT0S,
	ScheduleEndTime: PT0S,
	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
}