GET | /scheduling/class-roster | Get booked and waitlisted users for a class. |
---|
export class ApiDtoBase
{
public ApiKey: string;
public StoreId?: number;
public ChainId?: number;
public constructor(init?: Partial<ApiDtoBase>) { (Object as any).assign(this, init); }
}
export class ClassRosterRequestDto extends ApiDtoBase
{
public ClassScheduleId: number;
public constructor(init?: Partial<ClassRosterRequestDto>) { super(init); (Object as any).assign(this, init); }
}
export enum RestrictedResourceType
{
Store = 'Store',
Chain = 'Chain',
User = 'User',
Undefined = 'Undefined',
}
export class ClassRosterRequest extends ClassRosterRequestDto implements IRestrictedApiRequest
{
/**
* Api Key - grants access to resources
*/
// @ApiMember(DataType="string", Description="Api Key - grants access to resources", IsRequired=true, Name="ApiKey", ParameterType="query")
public ApiKey: string;
/**
* Store Id or Chain Id is required
*/
// @ApiMember(DataType="integer", Description="Store Id or Chain Id is required", Name="StoreId", ParameterType="query")
public StoreId?: number;
/**
* Store Id or Chain Id is required
*/
// @ApiMember(DataType="integer", Description="Store Id or Chain Id is required", Name="ChainId", ParameterType="query")
public ChainId?: number;
/**
* Class Schedule ID
*/
// @ApiMember(DataType="integer", Description="Class Schedule ID", IsRequired=true, Name="ClassScheduleId", ParameterType="query")
public ClassScheduleId: number;
public RestrictedId?: number;
public RestrictedResourceType: RestrictedResourceType;
public constructor(init?: Partial<ClassRosterRequest>) { super(init); (Object as any).assign(this, init); }
}
export class ApiResponseBase
{
public Success: boolean;
public Message: string;
public constructor(init?: Partial<ApiResponseBase>) { (Object as any).assign(this, init); }
}
export enum ClassRosterCreditType
{
Uninitialized = 0,
PaidCredit = 1,
FreeCredit = 2,
AmenityCredit = 3,
MembershipTypeCredit = 4,
ClassPassCredit = 5,
Error = -1,
}
export class ClassRosterItem
{
public BookingId: number;
public UserId: number;
public FirstName: string;
public LastName: string;
public Email: string;
public Phone: string;
public BookingMade: string;
public FirstTimeBooking: boolean;
public PackageName: string;
public PackageId?: number;
public LeadTypeName: string;
public LeadTypeId?: number;
public IsMember: boolean;
public MemberExpiration?: string;
public CreditType: ClassRosterCreditType;
public CreditsRemaining: number;
public NextCreditExpiration?: string;
public BookingStatusId?: number;
public BookingStatusDescription: string;
public constructor(init?: Partial<ClassRosterItem>) { (Object as any).assign(this, init); }
}
export class ClassRosterResponseDto extends ApiResponseBase
{
public ClassRoster: ClassRosterItem[];
public WaitList: ClassRosterItem[];
public constructor(init?: Partial<ClassRosterResponseDto>) { super(init); (Object as any).assign(this, init); }
}
export class ClassRosterResponse extends ClassRosterResponseDto
{
public Success: boolean;
public Message: string;
public ClassDate: string;
public FreeSpots: number;
public MaxSpots: number;
public TotalBooked: number;
public LocationType: string;
public VirtualLink: string;
public ClassRoster: ClassRosterItem[];
public WaitList: ClassRosterItem[];
public constructor(init?: Partial<ClassRosterResponse>) { super(init); (Object as any).assign(this, init); }
}
TypeScript ClassRosterRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=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>