ClubManager.Api

<back to all web services

FindMember

Requires Authentication
Required role:API
The following routes are available for this service:
All Verbs/api/Query/Member
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using ClubManager.Api.Services.Query;

namespace ClubManager.Api.Services.Query
{
    [AutoQueryViewer(Description="", IconUrl="octicon:database", Title="Member")]
    public partial class FindMember
        : QueryDb<MemberInstance>
    {
    }

    public partial class LossReasonInstance
    {
        public virtual int LossReasonId { get; set; }
        public virtual string Reason { get; set; }
        public virtual bool Deleted { get; set; }
        public virtual bool Demo { get; set; }
        public virtual bool Selectable { get; set; }
    }

    public partial class MemberInstance
    {
        public MemberInstance()
        {
            Photo = new byte[]{};
        }

        public virtual int MemberId { get; set; }
        public virtual int MemberType { get; set; }
        public virtual string MembershipNumber { get; set; }
        public virtual string CardNumber { get; set; }
        public virtual string CompanyName { get; set; }
        public virtual string Surname { get; set; }
        public virtual string Forenames { get; set; }
        public virtual string Title { get; set; }
        public virtual int Gender { get; set; }
        public virtual DateTime? DateOfBirth { get; set; }
        public virtual string Address1 { get; set; }
        public virtual string Address2 { get; set; }
        public virtual string City { get; set; }
        public virtual string County { get; set; }
        public virtual string Postcode { get; set; }
        public virtual string HomePhone { get; set; }
        public virtual string MobilePhone { get; set; }
        public virtual string EmailAddress { get; set; }
        public virtual bool EmailOptOut { get; set; }
        public virtual bool SmsOptOut { get; set; }
        public virtual bool PhoneOptOut { get; set; }
        public virtual bool LetterOptOut { get; set; }
        public virtual string DirectDebitAccountHolder { get; set; }
        public virtual string DirectDebitAccountNumber { get; set; }
        public virtual string DirectDebitSortCode { get; set; }
        public virtual DateTime? JoinedDate { get; set; }
        public virtual string DirectDebitBankAddress { get; set; }
        public virtual string FullName { get; set; }
        public virtual string ExternalReference { get; set; }
        public virtual byte[] Photo { get; set; }
        public virtual DateTime? PhotoModifiedDate { get; set; }
        public virtual string Notes { get; set; }
        public virtual bool Deleted { get; set; }
        public virtual bool Demo { get; set; }
        public virtual bool UseExternalStatus { get; set; }
        public virtual int ExternalStatus { get; set; }
        public virtual string FreeText { get; set; }
        public virtual Guid? MemberKey { get; set; }
        public virtual decimal Balance { get; set; }
        public virtual decimal CreditLimit { get; set; }
        public virtual DateTime CreatedDate { get; set; }
        public virtual DateTime? ModifiedDate { get; set; }
        public virtual DateTime? DeletedDate { get; set; }
        public virtual int ExternalSource { get; set; }
        public virtual decimal? RetentionMetric { get; set; }
        public virtual decimal? MonthlyAttendanceFrequency { get; set; }
        public virtual int? AssignedToUserId { get; set; }
        public virtual int? CreatedByUserId { get; set; }
        public virtual int? DeletedByUserId { get; set; }
        public virtual LossReasonInstance LossReason { get; set; }
        [References(typeof(ClubManager.Api.Services.Query.LossReasonInstance))]
        public virtual int? LossReasonId { get; set; }

        public virtual int? WonOrLost { get; set; }
        public virtual DateTime? WonOrLostDate { get; set; }
        public virtual bool GiftAidPermission { get; set; }
        public virtual bool? PhotoPermission { get; set; }
        public virtual bool? FirstAidPermission { get; set; }
        public virtual string EmergencyContact { get; set; }
        public virtual UserInstance WonOrLostByUser { get; set; }
        [References(typeof(ClubManager.Api.Services.Query.UserInstance))]
        public virtual int? WonOrLostByUserId { get; set; }

        public virtual DateTime? AgreedToTerms { get; set; }
        public virtual bool OnlineBookingBanned { get; set; }
        public virtual string Country { get; set; }
        public virtual DateTime? FingerprintEnrolled { get; set; }
        public virtual decimal? LastPaymentAmount { get; set; }
        public virtual string Pin { get; set; }
        public virtual int ProspectingPoints { get; set; }
        public virtual int AchievementPoints { get; set; }
        public virtual string ParentForenames { get; set; }
        public virtual string ParentSurname { get; set; }
    }

    public partial class UserInstance
    {
        public virtual int UserId { get; set; }
        public virtual string UserName { get; set; }
        public virtual string Name { get; set; }
        public virtual string Email { get; set; }
        public virtual string MobilePhone { get; set; }
        public virtual bool Enabled { get; set; }
        public virtual DateTime? LastLogin { get; set; }
        public virtual DateTime Created { get; set; }
        public virtual bool Training { get; set; }
        public virtual bool Deleted { get; set; }
        public virtual int CoursesCompleted { get; set; }
        public virtual bool? DisplayHomeNotification { get; set; }
        public virtual bool TwoFactorEnabled { get; set; }
        public virtual bool EmailConfirmed { get; set; }
        public virtual bool MobilePhoneConfirmed { get; set; }
        public virtual bool Notifications { get; set; }
        public virtual DateTime? ChangePassword { get; set; }
        public virtual DateTime? Activated { get; set; }
    }

}

namespace ServiceStack
{
    [DataContract]
    public partial class QueryBase
    {
        public QueryBase()
        {
            Meta = new Dictionary<string, string>{};
        }

        [DataMember(Order=1)]
        public virtual int? Skip { get; set; }

        [DataMember(Order=2)]
        public virtual int? Take { get; set; }

        [DataMember(Order=3)]
        public virtual string OrderBy { get; set; }

        [DataMember(Order=4)]
        public virtual string OrderByDesc { get; set; }

        [DataMember(Order=5)]
        public virtual string Include { get; set; }

        [DataMember(Order=6)]
        public virtual string Fields { get; set; }

        [DataMember(Order=7)]
        public virtual Dictionary<string, string> Meta { get; set; }
    }

    public partial class QueryDb<T>
        : QueryBase
    {
    }

    [DataContract]
    public partial class QueryResponse<T>
    {
        public QueryResponse()
        {
            Results = new List<T>{};
            Meta = new Dictionary<string, string>{};
        }

        [DataMember(Order=1)]
        public virtual int Offset { get; set; }

        [DataMember(Order=2)]
        public virtual int Total { get; set; }

        [DataMember(Order=3)]
        public virtual List<T> Results { get; set; }

        [DataMember(Order=4)]
        public virtual Dictionary<string, string> Meta { get; set; }

        [DataMember(Order=5)]
        public virtual ResponseStatus ResponseStatus { get; set; }
    }

}

C# FindMember 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 /api/Query/Member HTTP/1.1 
Host: api.clubmanagercentral.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Skip: 0,
	Take: 0,
	OrderBy: String,
	OrderByDesc: String,
	Include: String,
	Fields: String,
	Meta: 
	{
		String: String
	}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Offset: 0,
	Total: 0,
	Results: 
	[
		{
			MemberId: 0,
			MemberType: 0,
			MembershipNumber: String,
			CardNumber: String,
			CompanyName: String,
			Surname: String,
			Forenames: String,
			Title: String,
			Gender: 0,
			DateOfBirth: 0001-01-01,
			Address1: String,
			Address2: String,
			City: String,
			County: String,
			Postcode: String,
			HomePhone: String,
			MobilePhone: String,
			EmailAddress: String,
			EmailOptOut: False,
			SmsOptOut: False,
			PhoneOptOut: False,
			LetterOptOut: False,
			DirectDebitAccountHolder: String,
			DirectDebitAccountNumber: String,
			DirectDebitSortCode: String,
			JoinedDate: 0001-01-01,
			DirectDebitBankAddress: String,
			FullName: String,
			ExternalReference: String,
			Photo: AA==,
			PhotoModifiedDate: 0001-01-01,
			Notes: String,
			Deleted: False,
			Demo: False,
			UseExternalStatus: False,
			ExternalStatus: 0,
			FreeText: String,
			MemberKey: 00000000000000000000000000000000,
			Balance: 0,
			CreditLimit: 0,
			CreatedDate: 0001-01-01,
			ModifiedDate: 0001-01-01,
			DeletedDate: 0001-01-01,
			ExternalSource: 0,
			RetentionMetric: 0,
			MonthlyAttendanceFrequency: 0,
			AssignedToUserId: 0,
			CreatedByUserId: 0,
			DeletedByUserId: 0,
			LossReason: 
			{
				LossReasonId: 0,
				Reason: String,
				Deleted: False,
				Demo: False,
				Selectable: False
			},
			LossReasonId: 0,
			WonOrLost: 0,
			WonOrLostDate: 0001-01-01,
			GiftAidPermission: False,
			PhotoPermission: False,
			FirstAidPermission: False,
			EmergencyContact: String,
			WonOrLostByUser: 
			{
				UserId: 0,
				UserName: String,
				Name: String,
				Email: String,
				MobilePhone: String,
				Enabled: False,
				LastLogin: 0001-01-01,
				Created: 0001-01-01,
				Training: False,
				Deleted: False,
				CoursesCompleted: 0,
				DisplayHomeNotification: False,
				TwoFactorEnabled: False,
				EmailConfirmed: False,
				MobilePhoneConfirmed: False,
				Notifications: False,
				ChangePassword: 0001-01-01,
				Activated: 0001-01-01
			},
			WonOrLostByUserId: 0,
			AgreedToTerms: 0001-01-01,
			OnlineBookingBanned: False,
			Country: String,
			FingerprintEnrolled: 0001-01-01,
			LastPaymentAmount: 0,
			Pin: String,
			ProspectingPoints: 0,
			AchievementPoints: 0,
			ParentForenames: String,
			ParentSurname: String
		}
	],
	Meta: 
	{
		String: String
	},
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}