ClubReady Api

<back to all web services

CreateClassScheduleRequest

The following routes are available for this service:
POST/scheduling/class-scheduleCreate a Class Schedule
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

Namespace Global

    Namespace ClubReady.Core.Api.Models

        Public Partial Class ApiDtoBase
            Public Overridable Property ChainId As Nullable(Of Integer)
            Public Overridable Property ApiKey As String
            Public Overridable Property StoreId 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 CreateClassScheduleRequestDto
            Inherits ApiDtoBase
            Public Overridable Property ClassId As Integer
            Public Overridable Property ClassDateTime As Date
            Public Overridable Property TrainerId As Nullable(Of Integer)
            Public Overridable Property AlternateClassName As String
        End Class

        Public Partial Class CreateClassScheduleResponseDto
            Inherits ApiResponseBase
            Public Overridable Property ClassScheduleId As Nullable(Of Integer)
        End Class
    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 CreateClassScheduleRequest
            Inherits CreateClassScheduleRequestDto
            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
            '''</Summary>
            <ApiMember(DataType:="integer", Description:="Store ID", IsRequired:=true, Name:="StoreId", ParameterType:="query")>
            Public Overridable Property StoreId As Nullable(Of Integer)

            '''<Summary>
            '''Class ID
            '''</Summary>
            <ApiMember(DataType:="integer", Description:="Class ID", IsRequired:=true, Name:="ClassId", ParameterType:="query")>
            Public Overridable Property ClassId As Integer

            '''<Summary>
            '''Date and Time for Class
            '''</Summary>
            <ApiMember(DataType:="date-time", Description:="Date and Time for Class", IsRequired:=true, Name:="ClassDateTime", ParameterType:="query")>
            Public Overridable Property ClassDateTime As Date

            '''<Summary>
            '''Trainer ID
            '''</Summary>
            <ApiMember(DataType:="integer", Description:="Trainer ID", Name:="TrainerId", ParameterType:="query")>
            Public Overridable Property TrainerId As Nullable(Of Integer)

            '''<Summary>
            '''Alternate Class Name
            '''</Summary>
            <ApiMember(DataType:="string", Description:="Alternate Class Name", Name:="AlternateClassName", ParameterType:="query")>
            Public Overridable Property AlternateClassName As String

            Public Overridable Property RestrictedId As Nullable(Of Integer)
            Public Overridable Property RestrictedResourceType As RestrictedResourceType
        End Class

        Public Partial Class CreateClassScheduleResponse
            Inherits CreateClassScheduleResponseDto
            Public Overridable Property Success As Boolean
            Public Overridable Property ClassScheduleId As Nullable(Of Integer)
            Public Overridable Property Message As String
        End Class
    End Namespace
End Namespace

VB.NET CreateClassScheduleRequest 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.

POST /scheduling/class-schedule HTTP/1.1 
Host: www.clubready.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<CreateClassScheduleRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Web.Api.Scheduling.Model">
  <ApiKey xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</ApiKey>
  <ChainId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</ChainId>
  <StoreId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</StoreId>
  <AlternateClassName xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</AlternateClassName>
  <ClassDateTime xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0001-01-01T00:00:00</ClassDateTime>
  <ClassId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</ClassId>
  <TrainerId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</TrainerId>
</CreateClassScheduleRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<CreateClassScheduleResponse 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>
  <ClassScheduleId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</ClassScheduleId>
</CreateClassScheduleResponse>