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
import Foundation
import ServiceStack

// @AutoQueryViewer(Description="", IconUrl="octicon:database", Title="Member")
public class FindMember : QueryDb<MemberInstance>
{
    required public init(){ super.init() }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
    }
}

public class MemberInstance : Codable
{
    public var memberId:Int?
    public var memberType:Int?
    public var membershipNumber:String?
    public var cardNumber:String?
    public var companyName:String?
    public var surname:String?
    public var forenames:String?
    public var title:String?
    public var gender:Int?
    public var dateOfBirth:Date?
    public var address1:String?
    public var address2:String?
    public var city:String?
    public var county:String?
    public var postcode:String?
    public var homePhone:String?
    public var mobilePhone:String?
    public var emailAddress:String?
    public var emailOptOut:Bool?
    public var smsOptOut:Bool?
    public var phoneOptOut:Bool?
    public var letterOptOut:Bool?
    public var directDebitAccountHolder:String?
    public var directDebitAccountNumber:String?
    public var directDebitSortCode:String?
    public var joinedDate:Date?
    public var directDebitBankAddress:String?
    public var fullName:String?
    public var externalReference:String?
    public var photo:[UInt8] = []
    public var photoModifiedDate:Date?
    public var notes:String?
    public var deleted:Bool?
    public var demo:Bool?
    public var useExternalStatus:Bool?
    public var externalStatus:Int?
    public var freeText:String?
    public var memberKey:String?
    public var balance:Double?
    public var creditLimit:Double?
    public var createdDate:Date?
    public var modifiedDate:Date?
    public var deletedDate:Date?
    public var externalSource:Int?
    public var retentionMetric:Double?
    public var monthlyAttendanceFrequency:Double?
    public var assignedToUserId:Int?
    public var createdByUserId:Int?
    public var deletedByUserId:Int?
    public var lossReason:LossReasonInstance?
    // @References(typeof(LossReasonInstance))
    public var lossReasonId:Int?

    public var wonOrLost:Int?
    public var wonOrLostDate:Date?
    public var giftAidPermission:Bool?
    public var photoPermission:Bool?
    public var firstAidPermission:Bool?
    public var emergencyContact:String?
    public var wonOrLostByUser:UserInstance?
    // @References(typeof(UserInstance))
    public var wonOrLostByUserId:Int?

    public var agreedToTerms:Date?
    public var onlineBookingBanned:Bool?
    public var country:String?
    public var fingerprintEnrolled:Date?
    public var lastPaymentAmount:Double?
    public var pin:String?
    public var prospectingPoints:Int?
    public var achievementPoints:Int?
    public var parentForenames:String?
    public var parentSurname:String?

    required public init(){}
}

public class LossReasonInstance : Codable
{
    public var lossReasonId:Int?
    public var reason:String?
    public var deleted:Bool?
    public var demo:Bool?
    public var selectable:Bool?

    required public init(){}
}

public class UserInstance : Codable
{
    public var userId:Int?
    public var userName:String?
    public var name:String?
    public var email:String?
    public var mobilePhone:String?
    public var enabled:Bool?
    public var lastLogin:Date?
    public var created:Date?
    public var training:Bool?
    public var deleted:Bool?
    public var coursesCompleted:Int?
    public var displayHomeNotification:Bool?
    public var twoFactorEnabled:Bool?
    public var emailConfirmed:Bool?
    public var mobilePhoneConfirmed:Bool?
    public var notifications:Bool?
    public var changePassword:Date?
    public var activated:Date?

    required public init(){}
}


Swift 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
		}
	}
}