GET | /scheduling/class-roster | Get booked and waitlisted users for a class. |
---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports ClubReady.Web.Api.Scheduling.Model
Imports ClubReady.Core.Api.Models
Imports ClubReady.Web.Api
Imports ClubReady.Core.Api.Models.Enums
Namespace Global
Namespace ClubReady.Core.Api.Models
Public Partial Class ApiDtoBase
Public Overridable Property ApiKey As String
Public Overridable Property StoreId As Nullable(Of Integer)
Public Overridable Property ChainId As Nullable(Of Integer)
End Class
Public Partial Class ApiResponseBase
Public Overridable Property Success As Boolean
Public Overridable Property Message As String
End Class
Public Partial Class ClassRosterItem
Public Overridable Property BookingId As Integer
Public Overridable Property UserId As Integer
Public Overridable Property FirstName As String
Public Overridable Property LastName As String
Public Overridable Property Email As String
Public Overridable Property Phone As String
Public Overridable Property BookingMade As Date
Public Overridable Property FirstTimeBooking As Boolean
Public Overridable Property PackageName As String
Public Overridable Property PackageId As Nullable(Of Integer)
Public Overridable Property LeadTypeName As String
Public Overridable Property LeadTypeId As Nullable(Of Integer)
Public Overridable Property IsMember As Boolean
Public Overridable Property MemberExpiration As Nullable(Of Date)
Public Overridable Property CreditType As ClassRosterCreditType
Public Overridable Property CreditsRemaining As Integer
Public Overridable Property NextCreditExpiration As Nullable(Of Date)
Public Overridable Property BookingStatusId As Nullable(Of Short)
Public Overridable Property BookingStatusDescription As String
End Class
Public Partial Class ClassRosterRequestDto
Inherits ApiDtoBase
Public Overridable Property ClassScheduleId As Integer
End Class
Public Partial Class ClassRosterResponseDto
Inherits ApiResponseBase
Public Sub New()
ClassRoster = New List(Of ClassRosterItem)
WaitList = New List(Of ClassRosterItem)
End Sub
Public Overridable Property ClassRoster As List(Of ClassRosterItem)
Public Overridable Property WaitList As List(Of ClassRosterItem)
End Class
End Namespace
Namespace ClubReady.Core.Api.Models.Enums
Public Enum ClassRosterCreditType
Uninitialized = 0
PaidCredit = 1
FreeCredit = 2
AmenityCredit = 3
MembershipTypeCredit = 4
ClassPassCredit = 5
[Error] = -1
End Enum
End Namespace
Namespace ClubReady.Web.Api
Public Enum RestrictedResourceType
Store
Chain
User
Undefined
End Enum
End Namespace
Namespace ClubReady.Web.Api.Scheduling.Model
Public Partial Class ClassRosterRequest
Inherits ClassRosterRequestDto
Implements IRestrictedApiRequest
'''<Summary>
'''Api Key - grants access to resources
'''</Summary>
<ApiMember(DataType:="string", Description:="Api Key - grants access to resources", IsRequired:=true, Name:="ApiKey", ParameterType:="query")>
Public Overridable Property ApiKey As String
'''<Summary>
'''Store Id or Chain Id is required
'''</Summary>
<ApiMember(DataType:="integer", Description:="Store Id or Chain Id is required", Name:="StoreId", ParameterType:="query")>
Public Overridable Property StoreId As Nullable(Of Integer)
'''<Summary>
'''Store Id or Chain Id is required
'''</Summary>
<ApiMember(DataType:="integer", Description:="Store Id or Chain Id is required", Name:="ChainId", ParameterType:="query")>
Public Overridable Property ChainId As Nullable(Of Integer)
'''<Summary>
'''Class Schedule ID
'''</Summary>
<ApiMember(DataType:="integer", Description:="Class Schedule ID", IsRequired:=true, Name:="ClassScheduleId", ParameterType:="query")>
Public Overridable Property ClassScheduleId As Integer
Public Overridable Property RestrictedId As Nullable(Of Integer)
Public Overridable Property RestrictedResourceType As RestrictedResourceType
End Class
Public Partial Class ClassRosterResponse
Inherits ClassRosterResponseDto
Public Sub New()
ClassRoster = New List(Of ClassRosterItem)
WaitList = New List(Of ClassRosterItem)
End Sub
Public Overridable Property Success As Boolean
Public Overridable Property Message As String
Public Overridable Property ClassDate As Date
Public Overridable Property FreeSpots As Integer
Public Overridable Property MaxSpots As Integer
Public Overridable Property TotalBooked As Integer
Public Overridable Property LocationType As String
Public Overridable Property VirtualLink As String
Public Overridable Property ClassRoster As List(Of ClassRosterItem)
Public Overridable Property WaitList As List(Of ClassRosterItem)
End Class
End Namespace
End Namespace
VB.NET ClassRosterRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /scheduling/class-roster HTTP/1.1 Host: clubready.com Accept: text/csv
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"Success":false,"Message":"String","ClassDate":"0001-01-01T00:00:00.0000000","FreeSpots":0,"MaxSpots":0,"TotalBooked":0,"LocationType":"String","VirtualLink":"String","ClassRoster":[{"BookingId":0,"UserId":0,"FirstName":"String","LastName":"String","Email":"String","Phone":"String","BookingMade":"0001-01-01T00:00:00.0000000","FirstTimeBooking":false,"PackageName":"String","PackageId":0,"LeadTypeName":"String","LeadTypeId":0,"IsMember":false,"MemberExpiration":"0001-01-01T00:00:00.0000000","CreditType":"Uninitialized","CreditsRemaining":0,"NextCreditExpiration":"0001-01-01T00:00:00.0000000","BookingStatusId":0,"BookingStatusDescription":"String"}],"WaitList":[{"BookingId":0,"UserId":0,"FirstName":"String","LastName":"String","Email":"String","Phone":"String","BookingMade":"0001-01-01T00:00:00.0000000","FirstTimeBooking":false,"PackageName":"String","PackageId":0,"LeadTypeName":"String","LeadTypeId":0,"IsMember":false,"MemberExpiration":"0001-01-01T00:00:00.0000000","CreditType":"Uninitialized","CreditsRemaining":0,"NextCreditExpiration":"0001-01-01T00:00:00.0000000","BookingStatusId":0,"BookingStatusDescription":"String"}]}