Cochrane+ App API

<back to all web services

AttendanceSessionStatusChangeRequest

Requires Authentication
The following routes are available for this service:
POST/attendance/sessionstatus
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports WebService.ServiceModel
Imports WebService.ServiceModel.Base
Imports BusinessLogic.Entities
Imports CommonService.Api.Models.Base

Namespace Global

    Namespace BusinessLogic.Entities

        Public Enum AttendanceEventType
            ClockOut = 0
            ClockIn = 1
            StartLunch = 2
            EndLunch = 3
            StartBreak = 4
            EndBreak = 5
        End Enum
    End Namespace

    Namespace CommonService.Api.Models.Base

        Public Partial Class ApiServiceResponse
            Implements IServiceResponse
            Public Overridable Property Description As String
            Public Overridable Property Heading As String
            Public Overridable Property WasSuccessful As Boolean
            Public Overridable Property ModelState As Object
        End Class
    End Namespace

    Namespace WebService.ServiceModel

        Public Partial Class AttendanceEventData
            Public Overridable Property Type As AttendanceEventType
            Public Overridable Property Time As String
            Public Overridable Property Location As String
        End Class

        Public Partial Class AttendanceSessionInfo
            Public Sub New()
                AttendanceEvents = New List(Of AttendanceEventData)
            End Sub

            Public Overridable Property AttendanceSessionId As Integer
            Public Overridable Property AttendanceGoalTime As Double
            Public Overridable Property AttendanceGoalTimeValue As String
            Public Overridable Property AttendanceEvents As List(Of AttendanceEventData)
            Public Overridable Property StartDate As String
            Public Overridable Property EndDate As String
            Public Overridable Property IsClockedIn As Boolean
            Public Overridable Property TimeElapsed As Double
            Public Overridable Property LatestEventType As AttendanceEventType
            Public Overridable Property TotalBreakTime As Double
            Public Overridable Property TotalLunchTime As Double
            Public Overridable Property IsNew As Boolean
        End Class

        Public Partial Class AttendanceSessionStatusChangeRequest
            Inherits ApiServiceRequest
            Public Overridable Property AttendanceSessionId As Integer
            Public Overridable Property EventType As AttendanceEventType
            Public Overridable Property TimeZoneName As String
        End Class

        Public Partial Class GetAttendanceSessionInfoResponse
            Inherits ApiServiceResponse
            Public Overridable Property SessionInfo As AttendanceSessionInfo
        End Class
    End Namespace

    Namespace WebService.ServiceModel.Base

        Public Partial Class ApiServiceRequest
            Implements IServiceRequest
            Implements IHasApiKey
            Implements IHasDeviceInfo
            '''<Summary>
            '''The API Key required for authentication
            '''</Summary>
            <ApiMember(DataType:="string", Description:="The API Key required for authentication", IsRequired:=true)>
            Public Overridable Property ApiKey As String

            '''<Summary>
            '''Latitude of the user making this request
            '''</Summary>
            <ApiMember(DataType:="double", Description:="Latitude of the user making this request")>
            Public Overridable Property Latitude As Double

            '''<Summary>
            '''Longitude of the user making this request
            '''</Summary>
            <ApiMember(DataType:="double", Description:="Longitude of the user making this request")>
            Public Overridable Property Longitude As Double
        End Class
    End Namespace
End Namespace

VB.NET AttendanceSessionStatusChangeRequest 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.

POST /attendance/sessionstatus HTTP/1.1 
Host: cochraneplus-api-dev.happen.zone 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"attendanceSessionId":0,"eventType":0,"timeZoneName":"String","apiKey":"String","latitude":0,"longitude":0}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"sessionInfo":{"attendanceSessionId":0,"attendanceGoalTime":0,"attendanceGoalTimeValue":"00:00:00","attendanceEvents":[{}],"startDate":"String","endDate":"String","isClockedIn":false,"timeElapsed":0,"latestEventType":0,"totalBreakTime":0,"totalLunchTime":0,"isNew":false},"description":"String","heading":"String","wasSuccessful":false,"modelState":{}}