POST | /scheduling/class-booking | Create a Class Booking | |
---|---|---|---|
POST | /v2/{ApiKey}/club/{StoreId}/booking | (obsolete) Create a Class Booking | |
POST | /v2/{ApiKey}/club/{StoreId}/class-booking | (obsolete) Create a Class Booking |
namespace ClubReady.Core.Api.Models
open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<AllowNullLiteral>]
type ApiDtoBase() =
member val ApiKey:String = null with get,set
member val StoreId:Nullable<Int32> = new Nullable<Int32>() with get,set
member val ChainId:Nullable<Int32> = new Nullable<Int32>() with get,set
[<AllowNullLiteral>]
type CreateClassBookingRequestDto() =
inherit ApiDtoBase()
member val UserId:Int32 = new Int32() with get,set
member val ScheduleId:Int32 = new Int32() with get,set
member val AllowWaitList:Boolean = new Boolean() with get,set
type RestrictedResourceType =
| Store = 0
| Chain = 1
| User = 2
| Undefined = 3
[<AllowNullLiteral>]
type CreateClassBookingRequest() =
inherit CreateClassBookingRequestDto()
///<summary>
///Api Key - grants access to resources
///</summary>
[<ApiMember(DataType="string", Description="Api Key - grants access to resources", IsRequired=true, Name="ApiKey", ParameterType="query")>]
member val ApiKey:String = null with get,set
///<summary>
///UserID
///</summary>
[<ApiMember(DataType="string", Description="UserID", IsRequired=true, Name="UserId", ParameterType="query")>]
member val UserId:Int32 = new Int32() with get,set
///<summary>
///Store ID
///</summary>
[<ApiMember(DataType="integer", Description="Store ID", IsRequired=true, Name="StoreId", ParameterType="query")>]
member val StoreId:Nullable<Int32> = new Nullable<Int32>() with get,set
///<summary>
///Class Schedule ID
///</summary>
[<ApiMember(DataType="integer", Description="Class Schedule ID", IsRequired=true, Name="ScheduleId", ParameterType="query")>]
member val ScheduleId:Int32 = new Int32() with get,set
///<summary>
///Put user in wait list when possible
///</summary>
[<ApiMember(DataType="bool", Description="Put user in wait list when possible", Name="AllowWaitList", ParameterType="query")>]
member val AllowWaitList:Boolean = new Boolean() with get,set
member val RestrictedId:Nullable<Int32> = new Nullable<Int32>() with get,set
member val RestrictedResourceType:RestrictedResourceType = new RestrictedResourceType() with get,set
[<AllowNullLiteral>]
type CreateClassBookingResponseDto() =
member val BookingId:Nullable<Int32> = new Nullable<Int32>() with get,set
member val Message:String = null with get,set
[<AllowNullLiteral>]
type CreateClassBookingResponse() =
inherit CreateClassBookingResponseDto()
member val BookingId:Nullable<Int32> = new Nullable<Int32>() with get,set
member val Message:String = null with get,set
F# CreateClassBookingRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /scheduling/class-booking HTTP/1.1
Host: clubready.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
ApiKey: String,
UserId: 0,
StoreId: 0,
ScheduleId: 0,
AllowWaitList: False,
RestrictedId: 0,
RestrictedResourceType: Store,
ChainId: 0
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { BookingId: 0, Message: String }