ClubReady Api

<back to all web services

ClassRosterRequest

The following routes are available for this service:
GET/scheduling/class-rosterGet 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 .xml suffix or ?format=xml

HTTP + XML

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: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ClassRosterResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Web.Api.Scheduling.Model">
  <Message xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</Message>
  <Success xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">false</Success>
  <ClassRoster xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">
    <ClassRosterItem>
      <BookingId>0</BookingId>
      <BookingMade>0001-01-01T00:00:00</BookingMade>
      <BookingStatusDescription>String</BookingStatusDescription>
      <BookingStatusId>0</BookingStatusId>
      <CreditType>Uninitialized</CreditType>
      <CreditsRemaining>0</CreditsRemaining>
      <Email>String</Email>
      <FirstName>String</FirstName>
      <FirstTimeBooking>false</FirstTimeBooking>
      <IsMember>false</IsMember>
      <IsWaitList>false</IsWaitList>
      <LastName>String</LastName>
      <LeadTypeId>0</LeadTypeId>
      <LeadTypeName>String</LeadTypeName>
      <MemberExpiration>0001-01-01T00:00:00</MemberExpiration>
      <NextCreditExpiration>0001-01-01T00:00:00</NextCreditExpiration>
      <PackageId>0</PackageId>
      <PackageName>String</PackageName>
      <Phone>String</Phone>
      <UserId>0</UserId>
    </ClassRosterItem>
  </ClassRoster>
  <WaitList xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">
    <ClassRosterItem>
      <BookingId>0</BookingId>
      <BookingMade>0001-01-01T00:00:00</BookingMade>
      <BookingStatusDescription>String</BookingStatusDescription>
      <BookingStatusId>0</BookingStatusId>
      <CreditType>Uninitialized</CreditType>
      <CreditsRemaining>0</CreditsRemaining>
      <Email>String</Email>
      <FirstName>String</FirstName>
      <FirstTimeBooking>false</FirstTimeBooking>
      <IsMember>false</IsMember>
      <IsWaitList>false</IsWaitList>
      <LastName>String</LastName>
      <LeadTypeId>0</LeadTypeId>
      <LeadTypeName>String</LeadTypeName>
      <MemberExpiration>0001-01-01T00:00:00</MemberExpiration>
      <NextCreditExpiration>0001-01-01T00:00:00</NextCreditExpiration>
      <PackageId>0</PackageId>
      <PackageName>String</PackageName>
      <Phone>String</Phone>
      <UserId>0</UserId>
    </ClassRosterItem>
  </WaitList>
  <ClassDate>0001-01-01T00:00:00</ClassDate>
  <FreeSpots>0</FreeSpots>
  <LocationType>String</LocationType>
  <MaxSpots>0</MaxSpots>
  <TotalBooked>0</TotalBooked>
  <VirtualLink>String</VirtualLink>
</ClassRosterResponse>