BokaMera.API.Host

<back to all web services

UpdateHomepageSchedulerSettings

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
PUT/homepage/scheduler/settingsUpdate homepage scheduler settingsUpdate homepage scheduler settings on the company of the currently logged in user, only administrators are allowed to update homepage menu.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using BokaMera.API.ServiceModel.Dtos;

namespace BokaMera.API.ServiceModel.Dtos
{
    public partial class HomepageScheduleField
    {
        ///<summary>
        ///The field id.
        ///</summary>
        [ApiMember(Description="The field id.", IsRequired=true)]
        public virtual int Id { get; set; }

        ///<summary>
        ///If the field showed on the booking.
        ///</summary>
        [ApiMember(Description="If the field showed on the booking.", IsRequired=true)]
        public virtual bool ShowOnBooking { get; set; }

        ///<summary>
        ///If the field showed on the bookings tooltip.
        ///</summary>
        [ApiMember(Description="If the field showed on the bookings tooltip.", IsRequired=true)]
        public virtual bool ShowOnTooltip { get; set; }
    }

    public partial class HomepageSchedulerFieldOptionsResponse
    {
        ///<summary>
        ///The field id.
        ///</summary>
        [ApiMember(Description="The field id.")]
        public virtual int Id { get; set; }

        ///<summary>
        ///The field name.
        ///</summary>
        [ApiMember(Description="The field name.")]
        public virtual string Name { get; set; }

        ///<summary>
        ///The field description.
        ///</summary>
        [ApiMember(Description="The field description.")]
        public virtual string Description { get; set; }

        ///<summary>
        ///The field sort order when listing.
        ///</summary>
        [ApiMember(Description="The field sort order when listing.")]
        public virtual int SortOrder { get; set; }
    }

    public partial class HomepageSchedulerFieldResponse
    {
        ///<summary>
        ///The field id.
        ///</summary>
        [ApiMember(Description="The field id.")]
        public virtual int Id { get; set; }

        ///<summary>
        ///If the field should be shown on booking.
        ///</summary>
        [ApiMember(Description="If the field should be shown on booking.")]
        public virtual bool ShowOnBooking { get; set; }

        ///<summary>
        ///If the field should be shown on tooltip.
        ///</summary>
        [ApiMember(Description="If the field should be shown on tooltip.")]
        public virtual bool ShowOnTooltip { get; set; }
    }

    public partial class HomepageSchedulerResource
    {
        ///<summary>
        ///The resource id.
        ///</summary>
        [ApiMember(Description="The resource id.")]
        public virtual int Id { get; set; }
    }

    public partial class HomepageSchedulerResourceResponse
    {
        ///<summary>
        ///The resource id.
        ///</summary>
        [ApiMember(Description="The resource id.")]
        public virtual int Id { get; set; }

        ///<summary>
        ///The resource name.
        ///</summary>
        [ApiMember(Description="The resource name.")]
        public virtual string Name { get; set; }

        ///<summary>
        ///The resource description.
        ///</summary>
        [ApiMember(Description="The resource description.")]
        public virtual string Description { get; set; }

        ///<summary>
        ///The resource image url.
        ///</summary>
        [ApiMember(Description="The resource image url.")]
        public virtual Uri ImageUrl { get; set; }
    }

    public partial class HomepageSchedulerService
    {
        ///<summary>
        ///The service id.
        ///</summary>
        [ApiMember(Description="The service id.")]
        public virtual int Id { get; set; }
    }

    public partial class HomepageSchedulerServiceResponse
    {
        ///<summary>
        ///The service id.
        ///</summary>
        [ApiMember(Description="The service id.")]
        public virtual int Id { get; set; }

        ///<summary>
        ///The service name.
        ///</summary>
        [ApiMember(Description="The service name.")]
        public virtual string Name { get; set; }

        ///<summary>
        ///The service description.
        ///</summary>
        [ApiMember(Description="The service description.")]
        public virtual string Description { get; set; }

        ///<summary>
        ///The service image url.
        ///</summary>
        [ApiMember(Description="The service image url.")]
        public virtual Uri ImageUrl { get; set; }
    }

    public partial class HomepageSchedulerSettingsQueryResponse
    {
        public HomepageSchedulerSettingsQueryResponse()
        {
            Services = new List<HomepageSchedulerServiceResponse>{};
            Resources = new List<HomepageSchedulerResourceResponse>{};
            Fields = new List<HomepageSchedulerFieldResponse>{};
            FieldOptions = new List<HomepageSchedulerFieldOptionsResponse>{};
            ScheduleViewOptions = new List<ScheduleViewResponse>{};
        }

        ///<summary>
        ///The company id.
        ///</summary>
        [ApiMember(Description="The company id.")]
        public virtual Guid CompanyId { get; set; }

        ///<summary>
        ///If the user schedule is activated.
        ///</summary>
        [ApiMember(Description="If the user schedule is activated.")]
        public virtual bool Active { get; set; }

        ///<summary>
        ///If the user schedule views id.
        ///</summary>
        [ApiMember(Description="If the user schedule views id.")]
        public virtual int ScheduleViewId { get; set; }

        ///<summary>
        ///If the user schedule time slots in minutes.
        ///</summary>
        [ApiMember(Description="If the user schedule time slots in minutes.")]
        public virtual int ScheduleTimeSlotMinutes { get; set; }

        ///<summary>
        ///If the user schedule time start time.
        ///</summary>
        [ApiMember(Description="If the user schedule time start time.")]
        public virtual TimeSpan? StartTime { get; set; }

        ///<summary>
        ///If the user schedule time end time.
        ///</summary>
        [ApiMember(Description="If the user schedule time end time.")]
        public virtual TimeSpan? EndTime { get; set; }

        ///<summary>
        ///If the user schedule should contain time exceptions.
        ///</summary>
        [ApiMember(Description="If the user schedule should contain time exceptions.")]
        public virtual bool ShowTimeExceptions { get; set; }

        ///<summary>
        ///If allow booking in the scheduler.
        ///</summary>
        [ApiMember(Description="If allow booking in the scheduler.")]
        public virtual bool EnableBooking { get; set; }

        ///<summary>
        ///The homepage schedule services that are selected
        ///</summary>
        [ApiMember(Description="The homepage schedule services that are selected")]
        public virtual List<HomepageSchedulerServiceResponse> Services { get; set; }

        ///<summary>
        ///The homepage schedule resources that are selected
        ///</summary>
        [ApiMember(Description="The homepage schedule resources that are selected")]
        public virtual List<HomepageSchedulerResourceResponse> Resources { get; set; }

        ///<summary>
        ///The homepage schedule fields that are selected
        ///</summary>
        [ApiMember(Description="The homepage schedule fields that are selected")]
        public virtual List<HomepageSchedulerFieldResponse> Fields { get; set; }

        ///<summary>
        ///The homepage schedule fields select from
        ///</summary>
        [ApiMember(Description="The homepage schedule fields select from")]
        public virtual List<HomepageSchedulerFieldOptionsResponse> FieldOptions { 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; }
    }

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

    [ValidateRequest("IsAuthenticated")]
    public partial class UpdateHomepageSchedulerSettings
        : ICompany
    {
        public UpdateHomepageSchedulerSettings()
        {
            Resources = new List<HomepageSchedulerResource>{};
            Services = new List<HomepageSchedulerService>{};
            Fields = new List<HomepageScheduleField>{};
        }

        ///<summary>
        ///The company id, if empty will use the company id for the user you are logged in with.
        ///</summary>
        [ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.")]
        public virtual Guid? CompanyId { get; set; }

        ///<summary>
        ///If the user schedule is activated.
        ///</summary>
        [ApiMember(Description="If the user schedule is activated.")]
        public virtual bool? Active { get; set; }

        ///<summary>
        ///If the user schedule views id.
        ///</summary>
        [ApiMember(Description="If the user schedule views id.")]
        public virtual int? ScheduleViewId { get; set; }

        ///<summary>
        ///If the user schedule time slots in minutes.
        ///</summary>
        [ApiMember(Description="If the user schedule time slots in minutes.")]
        public virtual int? ScheduleTimeSlotMinutes { get; set; }

        ///<summary>
        ///If the user schedule time start time.
        ///</summary>
        [ApiMember(Description="If the user schedule time start time.")]
        public virtual TimeSpan? StartTime { get; set; }

        ///<summary>
        ///If the user schedule time end time.
        ///</summary>
        [ApiMember(Description="If the user schedule time end time.")]
        public virtual TimeSpan? EndTime { get; set; }

        ///<summary>
        ///If the user schedule should contain time exceptions.
        ///</summary>
        [ApiMember(Description="If the user schedule should contain time exceptions.")]
        public virtual bool? ShowTimeExceptions { get; set; }

        ///<summary>
        ///If allow booking in the scheduler.
        ///</summary>
        [ApiMember(Description="If allow booking in the scheduler.")]
        public virtual bool? EnableBooking { get; set; }

        ///<summary>
        ///What resources you want to be shown in scheduler.
        ///</summary>
        [ApiMember(Description="What resources you want to be shown in scheduler.")]
        public virtual List<HomepageSchedulerResource> Resources { get; set; }

        ///<summary>
        ///What services you want to be shown in scheduler.
        ///</summary>
        [ApiMember(Description="What services you want to be shown in scheduler.")]
        public virtual List<HomepageSchedulerService> Services { get; set; }

        ///<summary>
        ///What fields you want to be shown in scheduler.
        ///</summary>
        [ApiMember(Description="What fields you want to be shown in scheduler.")]
        public virtual List<HomepageScheduleField> Fields { get; set; }
    }

}

C# UpdateHomepageSchedulerSettings DTOs

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

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

PUT /homepage/scheduler/settings HTTP/1.1 
Host: testapi.bokamera.se 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"CompanyId":"00000000-0000-0000-0000-000000000000","Active":false,"ScheduleViewId":0,"ScheduleTimeSlotMinutes":0,"StartTime":"00:00:00","EndTime":"00:00:00","ShowTimeExceptions":false,"EnableBooking":false,"Resources":[{"Id":0}],"Services":[{"Id":0}],"Fields":[{"Id":0,"ShowOnBooking":false,"ShowOnTooltip":false}]}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"Active":false,"ScheduleViewId":0,"ScheduleTimeSlotMinutes":0,"StartTime":"00:00:00","EndTime":"00:00:00","ShowTimeExceptions":false,"EnableBooking":false,"Services":[{"Id":0,"Name":"String","Description":"String"}],"Resources":[{"Id":0,"Name":"String","Description":"String"}],"Fields":[{"Id":0,"ShowOnBooking":false,"ShowOnTooltip":false}],"FieldOptions":[{"Id":0,"Name":"String","Description":"String","SortOrder":0}],"ScheduleViewOptions":[{"Id":0,"Name":"String"}]}