BokaMera.API.Host

<back to all web services

UpdateCodeLockSetting

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
PUT/codelock/settingsUpdate settings for the code locks of the company of the currently logged in userUpdate settings for code lock of the company of the currently logged in user.
"use strict";
export class CodeLockSystemResponse {
    /** @param {{Id?:number,Name?:string,Description?:string,LogoType?:string,Supplier?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {number}
     * @description The system type of the code lock */
    Id;
    /**
     * @type {string}
     * @description The name of the code lock system */
    Name;
    /**
     * @type {string}
     * @description The description of the code lock system */
    Description;
    /**
     * @type {string}
     * @description The logotype of the code lock system */
    LogoType;
    /**
     * @type {string}
     * @description The supplier name of the code lock system */
    Supplier;
}
export class CodeLockSettingResponse {
    /** @param {{CompanyId?:string,CodeLockSystemsId?:number,Active?:boolean,ValidBeforeMinutes?:number,ValidAfterMinutes?:number,DeleteOldBySchedule?:boolean,SendEmailNotification?:boolean,SendSMSNotification?:boolean,EmailNotificationTime?:number,SMSNotificationTime?:number,Created?:string,Updated?:string,CodeLockSystemOptions?:CodeLockSystemResponse[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    CompanyId;
    /**
     * @type {number}
     * @description The system type of the code lock */
    CodeLockSystemsId;
    /**
     * @type {boolean}
     * @description If code lock sync is active */
    Active;
    /**
     * @type {number}
     * @description Number of minutes the access should be valid before booking starts. */
    ValidBeforeMinutes;
    /**
     * @type {number}
     * @description Number of minutes the access should be valid after booking ends. */
    ValidAfterMinutes;
    /**
     * @type {boolean}
     * @description If it should clean up old bookings after the passed */
    DeleteOldBySchedule;
    /**
     * @type {boolean}
     * @description If a notification should be sent by Email */
    SendEmailNotification;
    /**
     * @type {boolean}
     * @description If a notification should be sent by SMS */
    SendSMSNotification;
    /**
     * @type {number}
     * @description How long before the booking starts in minutes the notification should be sent */
    EmailNotificationTime;
    /**
     * @type {number}
     * @description How long before the booking starts in minutes the notification should be sent */
    SMSNotificationTime;
    /**
     * @type {string}
     * @description When settings was created */
    Created;
    /**
     * @type {string}
     * @description When settings was updated */
    Updated;
    /**
     * @type {CodeLockSystemResponse[]}
     * @description The available code lock systems to choose from */
    CodeLockSystemOptions;
}
export class UpdateCodeLockSetting {
    /** @param {{CompanyId?:string,Active?:boolean,CodeLockSystemsId?:number,ValidBeforeMinutes?:number,ValidAfterMinutes?:number,DeleteOldBySchedule?:boolean,SendEmailNotification?:boolean,SendSMSNotification?:boolean,EmailNotificationTime?:number,SMSNotificationTime?:number}} [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 code lock sync is active */
    Active;
    /**
     * @type {?number}
     * @description The system type of the code lock */
    CodeLockSystemsId;
    /**
     * @type {?number}
     * @description Number of minutes the access should be valid before booking starts. */
    ValidBeforeMinutes;
    /**
     * @type {?number}
     * @description Number of minutes the access should be valid after booking ends. */
    ValidAfterMinutes;
    /**
     * @type {?boolean}
     * @description If it should clean up old bookings after the passed */
    DeleteOldBySchedule;
    /**
     * @type {?boolean}
     * @description If a notification should be sent by Email */
    SendEmailNotification;
    /**
     * @type {?boolean}
     * @description If a notification should be sent by SMS */
    SendSMSNotification;
    /**
     * @type {?number}
     * @description How long before the booking starts in minutes the notification should be sent */
    EmailNotificationTime;
    /**
     * @type {?number}
     * @description How long before the booking starts in minutes the notification should be sent */
    SMSNotificationTime;
}

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

<UpdateCodeLockSetting xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <Active>false</Active>
  <CodeLockSystemsId>0</CodeLockSystemsId>
  <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
  <DeleteOldBySchedule>false</DeleteOldBySchedule>
  <EmailNotificationTime>0</EmailNotificationTime>
  <SMSNotificationTime>0</SMSNotificationTime>
  <SendEmailNotification>false</SendEmailNotification>
  <SendSMSNotification>false</SendSMSNotification>
  <ValidAfterMinutes>0</ValidAfterMinutes>
  <ValidBeforeMinutes>0</ValidBeforeMinutes>
</UpdateCodeLockSetting>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<CodeLockSettingResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <Active>false</Active>
  <CodeLockSystemOptions>
    <CodeLockSystemResponse>
      <Description>String</Description>
      <Id>0</Id>
      <LogoType i:nil="true" />
      <Name>String</Name>
      <Supplier>String</Supplier>
    </CodeLockSystemResponse>
  </CodeLockSystemOptions>
  <CodeLockSystemsId>0</CodeLockSystemsId>
  <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
  <Created>0001-01-01T00:00:00</Created>
  <DeleteOldBySchedule>false</DeleteOldBySchedule>
  <EmailNotificationTime>0</EmailNotificationTime>
  <SMSNotificationTime>0</SMSNotificationTime>
  <SendEmailNotification>false</SendEmailNotification>
  <SendSMSNotification>false</SendSMSNotification>
  <Updated>0001-01-01T00:00:00</Updated>
  <ValidAfterMinutes>0</ValidAfterMinutes>
  <ValidBeforeMinutes>0</ValidBeforeMinutes>
</CodeLockSettingResponse>