| Requires any of the roles: | bookingsupplier-administrator-write, superadmin | 
| PUT | /codelock/settings | Update settings for the code locks of the company of the currently logged in user | Update settings for code lock of the company of the currently logged in user. | 
|---|
| Name | Parameter | Data Type | Required | Description | 
|---|---|---|---|---|
| CompanyId | body | Guid? | No | The company id, if empty will use the company id for the user you are logged in with. | 
| Active | body | bool | No | If code lock sync is active | 
| CodeLockSystemsId | body | int | No | The system type of the code lock | 
| ValidBeforeMinutes | body | int | No | Number of minutes the access should be valid before booking starts. | 
| ValidAfterMinutes | body | int | No | Number of minutes the access should be valid after booking ends. | 
| DeleteOldBySchedule | body | boolean | No | If it should clean up old bookings after they have passed. | 
| SendEmailNotification | body | boolean | No | If a notification should be sent by Email | 
| SendSMSNotification | body | boolean | No | If a notification should be sent by SMS | 
| EmailNotificationTime | body | int | No | How long before the booking starts in minutes the notification should be sent | 
| SMSNotificationTime | body | int | No | How long before the booking starts in minutes the notification should be sent | 
| Name | Parameter | Data Type | Required | Description | 
|---|---|---|---|---|
| CompanyId | form | Guid | No | |
| CodeLockSystemsId | form | int | No | The system type of the code lock | 
| Active | form | bool | No | If code lock sync is active | 
| ValidBeforeMinutes | form | int | No | Number of minutes the access should be valid before booking starts. | 
| ValidAfterMinutes | form | int | No | Number of minutes the access should be valid after booking ends. | 
| DeleteOldBySchedule | form | boolean | No | If it should clean up old bookings after they have passed | 
| SendEmailNotification | form | boolean | No | If a notification should be sent by Email | 
| SendSMSNotification | form | boolean | No | If a notification should be sent by SMS | 
| EmailNotificationTime | form | int | No | How long before the booking starts in minutes the notification should be sent | 
| SMSNotificationTime | form | int | No | How long before the booking starts in minutes the notification should be sent | 
| Created | form | datetime | No | When settings was created | 
| Updated | form | datetime | No | When settings were updated | 
| CodeLockSystemOptions | form | List<CodeLockSystemResponse> | Yes | The available code lock systems to choose from | 
| Name | Parameter | Data Type | Required | Description | 
|---|---|---|---|---|
| Id | form | int | No | The system type of the code lock | 
| Name | form | string | Yes | The name of the code lock system | 
| Description | form | string | Yes | The description of the code lock system | 
| LogoType | form | Uri | Yes | The logotype of the code lock system | 
| Supplier | form | string | Yes | The supplier name of the code lock system | 
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=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"}]}