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.
"use strict";
export class HomepageSchedulerServiceResponse {
    /** @param {{Id?:number,Name?:string,Description?:string,ImageUrl?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {number}
     * @description The service id. */
    Id;
    /**
     * @type {string}
     * @description The service name. */
    Name;
    /**
     * @type {string}
     * @description The service description. */
    Description;
    /**
     * @type {string}
     * @description The service image url. */
    ImageUrl;
}
export class HomepageSchedulerResourceResponse {
    /** @param {{Id?:number,Name?:string,Description?:string,ImageUrl?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {number}
     * @description The resource id. */
    Id;
    /**
     * @type {string}
     * @description The resource name. */
    Name;
    /**
     * @type {string}
     * @description The resource description. */
    Description;
    /**
     * @type {string}
     * @description The resource image url. */
    ImageUrl;
}
export class HomepageSchedulerFieldResponse {
    /** @param {{Id?:number,ShowOnBooking?:boolean,ShowOnTooltip?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {number}
     * @description The field id. */
    Id;
    /**
     * @type {boolean}
     * @description If the field should be shown on booking. */
    ShowOnBooking;
    /**
     * @type {boolean}
     * @description If the field should be shown on tooltip. */
    ShowOnTooltip;
}
export class HomepageSchedulerFieldOptionsResponse {
    /** @param {{Id?:number,Name?:string,Description?:string,SortOrder?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {number}
     * @description The field id. */
    Id;
    /**
     * @type {string}
     * @description The field name. */
    Name;
    /**
     * @type {string}
     * @description The field description. */
    Description;
    /**
     * @type {number}
     * @description The field sort order when listing. */
    SortOrder;
}
export class ScheduleViewResponse {
    /** @param {{Id?:number,Name?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    Id;
    /** @type {string} */
    Name;
}
export class HomepageSchedulerSettingsQueryResponse {
    /** @param {{CompanyId?:string,Active?:boolean,ScheduleViewId?:number,ScheduleTimeSlotMinutes?:number,StartTime?:string,EndTime?:string,ShowTimeExceptions?:boolean,EnableBooking?:boolean,Services?:HomepageSchedulerServiceResponse[],Resources?:HomepageSchedulerResourceResponse[],Fields?:HomepageSchedulerFieldResponse[],FieldOptions?:HomepageSchedulerFieldOptionsResponse[],ScheduleViewOptions?:ScheduleViewResponse[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description The company id. */
    CompanyId;
    /**
     * @type {boolean}
     * @description If the user schedule is activated. */
    Active;
    /**
     * @type {number}
     * @description If the user schedule views id. */
    ScheduleViewId;
    /**
     * @type {number}
     * @description If the user schedule time slots in minutes. */
    ScheduleTimeSlotMinutes;
    /**
     * @type {?string}
     * @description If the user schedule time start time. */
    StartTime;
    /**
     * @type {?string}
     * @description If the user schedule time end time. */
    EndTime;
    /**
     * @type {boolean}
     * @description If the user schedule should contain time exceptions. */
    ShowTimeExceptions;
    /**
     * @type {boolean}
     * @description If allow booking in the scheduler. */
    EnableBooking;
    /**
     * @type {HomepageSchedulerServiceResponse[]}
     * @description The homepage schedule services that are selected */
    Services;
    /**
     * @type {HomepageSchedulerResourceResponse[]}
     * @description The homepage schedule resources that are selected */
    Resources;
    /**
     * @type {HomepageSchedulerFieldResponse[]}
     * @description The homepage schedule fields that are selected */
    Fields;
    /**
     * @type {HomepageSchedulerFieldOptionsResponse[]}
     * @description The homepage schedule fields select from */
    FieldOptions;
    /**
     * @type {ScheduleViewResponse[]}
     * @description The available schedule view options to choose from */
    ScheduleViewOptions;
}
export class HomepageSchedulerResource {
    /** @param {{Id?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {number}
     * @description The resource id. */
    Id;
}
export class HomepageSchedulerService {
    /** @param {{Id?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {number}
     * @description The service id. */
    Id;
}
export class HomepageScheduleField {
    /** @param {{Id?:number,ShowOnBooking?:boolean,ShowOnTooltip?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {number}
     * @description The field id. */
    Id;
    /**
     * @type {boolean}
     * @description If the field showed on the booking. */
    ShowOnBooking;
    /**
     * @type {boolean}
     * @description If the field showed on the bookings tooltip. */
    ShowOnTooltip;
}
export class UpdateHomepageSchedulerSettings {
    /** @param {{CompanyId?:string,Active?:boolean,ScheduleViewId?:number,ScheduleTimeSlotMinutes?:number,StartTime?:string,EndTime?:string,ShowTimeExceptions?:boolean,EnableBooking?:boolean,Resources?:HomepageSchedulerResource[],Services?:HomepageSchedulerService[],Fields?:HomepageScheduleField[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {?string}
     * @description The company id, if empty will use the company id for the user you are logged in with. */
    CompanyId;
    /**
     * @type {?boolean}
     * @description If the user schedule is activated. */
    Active;
    /**
     * @type {?number}
     * @description If the user schedule views id. */
    ScheduleViewId;
    /**
     * @type {?number}
     * @description If the user schedule time slots in minutes. */
    ScheduleTimeSlotMinutes;
    /**
     * @type {?string}
     * @description If the user schedule time start time. */
    StartTime;
    /**
     * @type {?string}
     * @description If the user schedule time end time. */
    EndTime;
    /**
     * @type {?boolean}
     * @description If the user schedule should contain time exceptions. */
    ShowTimeExceptions;
    /**
     * @type {?boolean}
     * @description If allow booking in the scheduler. */
    EnableBooking;
    /**
     * @type {HomepageSchedulerResource[]}
     * @description What resources you want to be shown in scheduler. */
    Resources;
    /**
     * @type {HomepageSchedulerService[]}
     * @description What services you want to be shown in scheduler. */
    Services;
    /**
     * @type {HomepageScheduleField[]}
     * @description What fields you want to be shown in scheduler. */
    Fields;
}

JavaScript UpdateHomepageSchedulerSettings 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 /homepage/scheduler/settings HTTP/1.1 
Host: testapi.bokamera.se 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<UpdateHomepageSchedulerSettings xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <Active>false</Active>
  <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
  <EnableBooking>false</EnableBooking>
  <EndTime>PT0S</EndTime>
  <Fields>
    <HomepageScheduleField>
      <Id>0</Id>
      <ShowOnBooking>false</ShowOnBooking>
      <ShowOnTooltip>false</ShowOnTooltip>
    </HomepageScheduleField>
  </Fields>
  <Resources>
    <HomepageSchedulerResource>
      <Id>0</Id>
    </HomepageSchedulerResource>
  </Resources>
  <ScheduleTimeSlotMinutes>0</ScheduleTimeSlotMinutes>
  <ScheduleViewId>0</ScheduleViewId>
  <Services>
    <HomepageSchedulerService>
      <Id>0</Id>
    </HomepageSchedulerService>
  </Services>
  <ShowTimeExceptions>false</ShowTimeExceptions>
  <StartTime>PT0S</StartTime>
</UpdateHomepageSchedulerSettings>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<HomepageSchedulerSettingsQueryResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <Active>false</Active>
  <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
  <EnableBooking>false</EnableBooking>
  <EndTime>PT0S</EndTime>
  <FieldOptions>
    <HomepageSchedulerFieldOptionsResponse>
      <Description>String</Description>
      <Id>0</Id>
      <Name>String</Name>
      <SortOrder>0</SortOrder>
    </HomepageSchedulerFieldOptionsResponse>
  </FieldOptions>
  <Fields>
    <HomepageSchedulerFieldResponse>
      <Id>0</Id>
      <ShowOnBooking>false</ShowOnBooking>
      <ShowOnTooltip>false</ShowOnTooltip>
    </HomepageSchedulerFieldResponse>
  </Fields>
  <Resources>
    <HomepageSchedulerResourceResponse>
      <Description>String</Description>
      <Id>0</Id>
      <ImageUrl i:nil="true" />
      <Name>String</Name>
    </HomepageSchedulerResourceResponse>
  </Resources>
  <ScheduleTimeSlotMinutes>0</ScheduleTimeSlotMinutes>
  <ScheduleViewId>0</ScheduleViewId>
  <ScheduleViewOptions>
    <ScheduleViewResponse>
      <Id>0</Id>
      <Name>String</Name>
    </ScheduleViewResponse>
  </ScheduleViewOptions>
  <Services>
    <HomepageSchedulerServiceResponse>
      <Description>String</Description>
      <Id>0</Id>
      <ImageUrl i:nil="true" />
      <Name>String</Name>
    </HomepageSchedulerServiceResponse>
  </Services>
  <ShowTimeExceptions>false</ShowTimeExceptions>
  <StartTime>PT0S</StartTime>
</HomepageSchedulerSettingsQueryResponse>