BokaMera.API.Host

<back to all web services

CodeLockSettingQuery

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin, bookingsupplier-administrator-read
The following routes are available for this service:
GET/codelock/settingsGet code lock settings for the currently logged in userGet code lock settings for the currently logged in user.
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports BokaMera.API.ServiceModel.Dtos

Namespace Global

    Namespace BokaMera.API.ServiceModel.Dtos

        <ValidateRequest(Validator:="IsAuthenticated")>
        <ApiResponse(Description:="You were unauthorized to call this service", StatusCode:=401)>
        <ApiResponse(Description:="You have too low privileges to call this service", StatusCode:=403)>
        Public Partial Class CodeLockSettingQuery
            Implements ICompany
            '''<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 Overridable Property CompanyId As Nullable(Of Guid)

            '''<Summary>
            '''If you want to include code locks that is supported.
            '''</Summary>
            <ApiMember(DataType:="boolean", Description:="If you want to include code locks that is supported.", ParameterType:="query")>
            Public Overridable Property IncludeCodeLockSystemOptions As Boolean
        End Class

        Public Partial Class CodeLockSettingResponse
            Public Sub New()
                CodeLockSystemOptions = New List(Of CodeLockSystemResponse)
            End Sub

            Public Overridable Property CompanyId As Guid
            '''<Summary>
            '''The system type of the code lock
            '''</Summary>
            <ApiMember(DataType:="int", Description:="The system type of the code lock")>
            Public Overridable Property CodeLockSystemsId As Integer

            '''<Summary>
            '''If code lock sync is active
            '''</Summary>
            <ApiMember(DataType:="bool", Description:="If code lock sync is active")>
            Public Overridable Property Active As Boolean

            '''<Summary>
            '''Number of minutes the access should be valid before booking starts.
            '''</Summary>
            <ApiMember(DataType:="int", Description:="Number of minutes the access should be valid before booking starts.")>
            Public Overridable Property ValidBeforeMinutes As Integer

            '''<Summary>
            '''Number of minutes the access should be valid after booking ends.
            '''</Summary>
            <ApiMember(DataType:="int", Description:="Number of minutes the access should be valid after booking ends.")>
            Public Overridable Property ValidAfterMinutes As Integer

            '''<Summary>
            '''If it should clean up old bookings after the passed
            '''</Summary>
            <ApiMember(DataType:="boolean", Description:="If it should clean up old bookings after the passed")>
            Public Overridable Property DeleteOldBySchedule As Boolean

            '''<Summary>
            '''If a notification should be sent by Email
            '''</Summary>
            <ApiMember(DataType:="boolean", Description:="If a notification should be sent by Email")>
            Public Overridable Property SendEmailNotification As Boolean

            '''<Summary>
            '''If a notification should be sent by SMS
            '''</Summary>
            <ApiMember(DataType:="boolean", Description:="If a notification should be sent by SMS")>
            Public Overridable Property SendSMSNotification As Boolean

            '''<Summary>
            '''How long before the booking starts in minutes the notification should be sent
            '''</Summary>
            <ApiMember(DataType:="int", Description:="How long before the booking starts in minutes the notification should be sent")>
            Public Overridable Property EmailNotificationTime As Integer

            '''<Summary>
            '''How long before the booking starts in minutes the notification should be sent
            '''</Summary>
            <ApiMember(DataType:="int", Description:="How long before the booking starts in minutes the notification should be sent")>
            Public Overridable Property SMSNotificationTime As Integer

            '''<Summary>
            '''When settings was created
            '''</Summary>
            <ApiMember(DataType:="datetime", Description:="When settings was created")>
            Public Overridable Property Created As Date

            '''<Summary>
            '''When settings was updated
            '''</Summary>
            <ApiMember(DataType:="datetime", Description:="When settings was updated")>
            Public Overridable Property Updated As Date

            '''<Summary>
            '''The available code lock systems to choose from
            '''</Summary>
            <ApiMember(Description:="The available code lock systems to choose from")>
            Public Overridable Property CodeLockSystemOptions As List(Of CodeLockSystemResponse)
        End Class

        Public Partial Class CodeLockSystemResponse
            '''<Summary>
            '''The system type of the code lock
            '''</Summary>
            <ApiMember(DataType:="int", Description:="The system type of the code lock")>
            Public Overridable Property Id As Integer

            '''<Summary>
            '''The name of the code lock system
            '''</Summary>
            <ApiMember(DataType:="string", Description:="The name of the code lock system")>
            Public Overridable Property Name As String

            '''<Summary>
            '''The description of the code lock system
            '''</Summary>
            <ApiMember(DataType:="string", Description:="The description of the code lock system")>
            Public Overridable Property Description As String

            '''<Summary>
            '''The logotype of the code lock system
            '''</Summary>
            <ApiMember(Description:="The logotype of the code lock system")>
            Public Overridable Property LogoType As Uri

            '''<Summary>
            '''The supplier name of the code lock system
            '''</Summary>
            <ApiMember(Description:="The supplier name of the code lock system")>
            Public Overridable Property Supplier As String
        End Class
    End Namespace
End Namespace

VB.NET CodeLockSettingQuery DTOs

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

HTTP + CSV

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

GET /codelock/settings HTTP/1.1 
Host: testapi.bokamera.se 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
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"}]}