ClubReady Api

<back to all web services

CheckUsernameRequest

The following routes are available for this service:
POST/users/checkusernameCheck username availability
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports ClubReady.Web.Api.Members.Model
Imports ClubReady.Core.Api.Models
Imports ClubReady.Web.Api

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
    End Namespace

    Namespace ClubReady.Web.Api

        Public Enum RestrictedResourceType
            Store
            Chain
            User
            Undefined
        End Enum
    End Namespace

    Namespace ClubReady.Web.Api.Members.Model

        Public Partial Class CheckUsernameRequest
            Inherits ApiDtoBase
            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>
            '''StoreId OR ChainId is required
            '''</Summary>
            <ApiMember(DataType:="integer", Description:="StoreId OR ChainId is required", Name:="StoreId", ParameterType:="query")>
            Public Overridable Property StoreId As Nullable(Of Integer)

            '''<Summary>
            '''StoreId OR ChainId is required
            '''</Summary>
            <ApiMember(DataType:="integer", Description:="StoreId OR ChainId is required", Name:="ChainId", ParameterType:="query")>
            Public Overridable Property ChainId As Nullable(Of Integer)

            '''<Summary>
            '''Username should be between 4 and 255 characters long
            '''</Summary>
            <ApiMember(DataType:="string", Description:="Username should be between 4 and 255 characters long", IsRequired:=true, Name:="Username", ParameterType:="query")>
            Public Overridable Property Username As String

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

        Public Partial Class CheckUsernameResponse
            Implements IApiResponse
            Public Overridable Property Valid As Boolean
            Public Overridable Property StatusCode As Integer
            Public Overridable Property Message As String
        End Class
    End Namespace
End Namespace

VB.NET CheckUsernameRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /users/checkusername HTTP/1.1 
Host: www.clubready.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	ApiKey: String,
	StoreId: 0,
	ChainId: 0,
	Username: String,
	RestrictedId: 0,
	RestrictedResourceType: Chain
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Valid: False,
	StatusCode: 0,
	Message: String
}