GET | /scheduling/booking-status-events | List of booking status changes in a time frame. |
---|
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 BookingStatusEventsRequestDto extends ApiDtoBase
{
public FromDate: string;
public ToDate: string;
public BookingTypeFilter: number;
public ConsultFilter: number;
public StatusFilter?: number;
public constructor(init?: Partial<BookingStatusEventsRequestDto>) { super(init); (Object as any).assign(this, init); }
}
export enum RestrictedResourceType
{
Store = 'Store',
Chain = 'Chain',
User = 'User',
Undefined = 'Undefined',
}
export class BookingStatusEventsRequest extends BookingStatusEventsRequestDto 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;
/**
* Chain ID
*/
// @ApiMember(DataType="integer", Description="Chain ID", Name="ChainId", ParameterType="query")
public ChainId?: number;
/**
* Store ID
*/
// @ApiMember(DataType="integer", Description="Store ID", Name="StoreId", ParameterType="query")
public StoreId?: number;
/**
* UTC Format
*/
// @ApiMember(DataType="date", Description="UTC Format", IsRequired=true, Name="FromDate", ParameterType="query")
public FromDate: string;
/**
* Max 24 Hours (UTC Format)
*/
// @ApiMember(DataType="date", Description="Max 24 Hours (UTC Format)", IsRequired=true, Name="ToDate", ParameterType="query")
public ToDate: string;
/**
* 0 = All, 1 = Classes, 2 = Services
*/
// @ApiMember(DataType="integer", Description="0 = All, 1 = Classes, 2 = Services", IsRequired=true, Name="BookingTypeFilter", ParameterType="query")
public BookingTypeFilter: number;
/**
* 0 = Any, 1 = Only Consults, 2 = Exclude Consults
*/
// @ApiMember(DataType="integer", Description="0 = Any, 1 = Only Consults, 2 = Exclude Consults", IsRequired=true, Name="ConsultFilter", ParameterType="query")
public ConsultFilter: number;
/**
* Leave blank for any, otherwise use ClubReady BookingStatus enum
*/
// @ApiMember(DataType="integer", Description="Leave blank for any, otherwise use ClubReady BookingStatus enum", Name="StatusFilter", ParameterType="query")
public StatusFilter?: number;
public RestrictedId?: number;
public RestrictedResourceType: RestrictedResourceType;
public constructor(init?: Partial<BookingStatusEventsRequest>) { 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 BookingStatus
{
Undefined = 0,
Unavailable = 1,
Open = 2,
CancelledWithinPolicy = 3,
CancelledOutsidePolicy = 4,
Completed = 5,
NoShow = 6,
RescheduledWithinPolicy = 8,
RescheduledByAdmin = 9,
CancelledByAdminNotCustomerFault = 10,
Pending = 11,
WaitListed = 12,
Error = -1,
}
export class BookingStatusEventItem
{
public ChainId?: number;
public StoreId?: number;
public UserId: number;
public BookingId: number;
public ClassScheduleId?: number;
public ServiceId?: number;
public SessionSizeId?: number;
public BookingDateTime: string;
public Status: BookingStatus;
public StatusId: number;
public StatusChanged: string;
public Consult: boolean;
public BookedFromWaitList: boolean;
public constructor(init?: Partial<BookingStatusEventItem>) { (Object as any).assign(this, init); }
}
export class BookingStatusEventsResponseDto extends ApiResponseBase
{
public BookingStatusEvents: BookingStatusEventItem[];
public constructor(init?: Partial<BookingStatusEventsResponseDto>) { super(init); (Object as any).assign(this, init); }
}
export class BookingStatusEventsResponse extends BookingStatusEventsResponseDto
{
public Success: boolean;
public Message: string;
public BookingStatusEvents: BookingStatusEventItem[];
public constructor(init?: Partial<BookingStatusEventsResponse>) { super(init); (Object as any).assign(this, init); }
}
TypeScript BookingStatusEventsRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /scheduling/booking-status-events HTTP/1.1 Host: clubready.com Accept: application/json
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"Success":false,"Message":"String","BookingStatusEvents":[{"ChainId":0,"StoreId":0,"UserId":0,"BookingId":0,"ClassScheduleId":0,"ServiceId":0,"SessionSizeId":0,"BookingDateTime":"0001-01-01T00:00:00.0000000","Status":"Undefined","StatusId":0,"StatusChanged":"0001-01-01T00:00:00.0000000","Consult":false,"BookedFromWaitList":false}]}