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.
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; }
    }

    [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 SettingQuery
    {
        ///<summary>
        ///If you want to include the schedule views to select from
        ///</summary>
        [ApiMember(DataType="boolean", Description="If you want to include the schedule views to select from", ParameterType="query")]
        public virtual bool IncludeScheduleViewOptions { get; set; }

        ///<summary>
        ///If you want to include the week number settings to select from
        ///</summary>
        [ApiMember(DataType="boolean", Description="If you want to include the week number settings to select from", ParameterType="query")]
        public virtual bool IncludeWeekNumberOptions { get; set; }

        ///<summary>
        ///If you want to include the booking template options to select from
        ///</summary>
        [ApiMember(DataType="boolean", Description="If you want to include the booking template options to select from", ParameterType="query")]
        public virtual bool IncludeBookingTemplateOptions { get; set; }

        ///<summary>
        ///If you want to include the calendar type options to select from
        ///</summary>
        [ApiMember(DataType="boolean", Description="If you want to include the calendar type options to select from", ParameterType="query")]
        public virtual bool IncludeCalendarTypeOptions { get; set; }

        ///<summary>
        ///If you want to include the booking status options to select from
        ///</summary>
        [ApiMember(DataType="boolean", Description="If you want to include the booking status options to select from", ParameterType="query")]
        public virtual bool IncludeBookingStatusOptions { get; set; }

        ///<summary>
        ///If you want to include the Free spot text options to select from
        ///</summary>
        [ApiMember(DataType="boolean", Description="If you want to include the Free spot text options to select from", ParameterType="query")]
        public virtual bool IncludeFreeSpotTextOptions { 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; }
    }

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

}

C# 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
}