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 .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 /codelock/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,"CodeLockSystemsId":0,"ValidBeforeMinutes":0,"ValidAfterMinutes":0,"DeleteOldBySchedule":false,"SendEmailNotification":false,"SendSMSNotification":false,"EmailNotificationTime":0,"SMSNotificationTime":0}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"CodeLockSystemsId":0,"Active":false,"ValidBeforeMinutes":0,"ValidAfterMinutes":0,"DeleteOldBySchedule":false,"SendEmailNotification":false,"SendSMSNotification":false,"EmailNotificationTime":0,"SMSNotificationTime":0,"CodeLockSystemOptions":[{"Id":0,"Name":"String","Description":"String","Supplier":"String"}]}