ClubManager.Api

<back to all web services

FindMembership

Requires Authentication
Required role:API
The following routes are available for this service:
All Verbs/api/Query/Membership
import Foundation
import ServiceStack

// @AutoQueryViewer(Description="", IconUrl="octicon:database", Title="Membership")
public class FindMembership : QueryDb<MembershipInstance>
{
    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 MembershipInstance : Codable
{
    public var membershipId:Int?
    public var startDate:Date?
    public var endDate:Date?
    public var contractEndDate:Date?
    public var name:String?
    public var enrolmentFee:Double?
    public var inductionFee:Double?
    public var membershipFee:Double?
    public var directDebitPayment:Double?
    public var directDebitDate:Date?
    public var member:MemberInstance?
    // @References(typeof(MemberInstance))
    public var memberId:Int?

    public var refererMemberId:Int?
    public var promotionId:Int?
    public var payment1Fee:Double?
    public var payment1Date:Date?
    public var payment2Fee:Double?
    public var payment2Date:Date?
    public var payment1Type:Int?
    public var payment1Method:Int?
    public var payment2Type:Int?
    public var payment2Method:Int?
    public var payment3Type:Int?
    public var payment3Method:Int?
    public var payment3Fee:Double?
    public var payment3Date:Date?
    public var membershipType:MembershipTypeInstance?
    // @References(typeof(MembershipTypeInstance))
    public var membershipTypeId:Int?

    public var providerId:Int?
    public var definition:String?
    public var hasRecurringPayments:Bool?
    public var deleted:Bool?
    public var demo:Bool?
    public var membershipKey:String?
    public var sessionsRemaining:Int?
    public var classesRemaining:Int?
    public var cancelled:Date?
    public var apiCreated:Date?
    public var suspensionStart:Date?
    public var suspensionEnd:Date?
    public var ipAddress:String?

    required public init(){}
}

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(){}
}

public class MembershipTypeInstance : Codable
{
    public var membershipTypeId:Int?
    public var name:String?
    public var Description:String?
    public var definition:String?
    public var schedule:ScheduleInstance?
    // @References(typeof(ScheduleInstance))
    public var scheduleId:Int?

    public var deleted:Bool?
    public var demo:Bool?
    public var `public`:Bool?
    public var sessionsRemaining:Int?
    public var classesRemaining:Int?
    public var sortOrder:Int?
    public var special:Bool?
    public var multiSiteAccess:Bool?
    public var memberLimit:Int?
    public var promotionCode:String?
    public var promotionStart:Date?
    public var promotionEnd:Date?
    public var licensesRemaining:Int?
    public var bookingAccessOnly:Bool?
    public var sessionsPeriod:Int?
    public var sessionsFrequency:Int?
    public var startsOn:Date?
    public var allowSelectionAfterStartsOn:Bool?

    required public init(){}
}

public class ScheduleInstance : Codable
{
    public var scheduleId:Int?
    public var name:String?
    public var Description:String?
    @TimeSpan public var mondayFrom:TimeInterval?
    @TimeSpan public var mondayTo:TimeInterval?
    @TimeSpan public var tuesdayFrom:TimeInterval?
    @TimeSpan public var tuesdayTo:TimeInterval?
    @TimeSpan public var wednesdayFrom:TimeInterval?
    @TimeSpan public var wednesdayTo:TimeInterval?
    @TimeSpan public var thursdayFrom:TimeInterval?
    @TimeSpan public var thursdayTo:TimeInterval?
    @TimeSpan public var fridayFrom:TimeInterval?
    @TimeSpan public var fridayTo:TimeInterval?
    @TimeSpan public var saturdayFrom:TimeInterval?
    @TimeSpan public var saturdayTo:TimeInterval?
    @TimeSpan public var sundayFrom:TimeInterval?
    @TimeSpan public var sundayTo:TimeInterval?
    public var scheduleType:Int?
    public var deleted:Bool?
    public var demo:Bool?

    required public init(){}
}


Swift FindMembership DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

POST /api/Query/Membership HTTP/1.1 
Host: api.clubmanagercentral.com 
Accept: application/json
Content-Type: application/json
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: application/json
Content-Length: length

{"Offset":0,"Total":0,"Results":[{"MembershipId":0,"StartDate":"0001-01-01T00:00:00.0000000","EndDate":"0001-01-01T00:00:00.0000000","ContractEndDate":"0001-01-01T00:00:00.0000000","Name":"String","EnrolmentFee":0,"InductionFee":0,"MembershipFee":0,"DirectDebitPayment":0,"DirectDebitDate":"0001-01-01T00:00:00.0000000","Member":{"MemberId":0,"MemberType":0,"MembershipNumber":"String","CardNumber":"String","CompanyName":"String","Surname":"String","Forenames":"String","Title":"String","Gender":0,"DateOfBirth":"0001-01-01T00:00:00.0000000","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-01T00:00:00.0000000","DirectDebitBankAddress":"String","FullName":"String","ExternalReference":"String","Photo":"AA==","PhotoModifiedDate":"0001-01-01T00:00:00.0000000","Notes":"String","Deleted":false,"Demo":false,"UseExternalStatus":false,"ExternalStatus":0,"FreeText":"String","MemberKey":"00000000000000000000000000000000","Balance":0,"CreditLimit":0,"CreatedDate":"0001-01-01T00:00:00.0000000","ModifiedDate":"0001-01-01T00:00:00.0000000","DeletedDate":"0001-01-01T00:00:00.0000000","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-01T00:00:00.0000000","GiftAidPermission":false,"PhotoPermission":false,"FirstAidPermission":false,"EmergencyContact":"String","WonOrLostByUser":{"UserId":0,"UserName":"String","Name":"String","Email":"String","MobilePhone":"String","Enabled":false,"LastLogin":"0001-01-01T00:00:00.0000000","Created":"0001-01-01T00:00:00.0000000","Training":false,"Deleted":false,"CoursesCompleted":0,"DisplayHomeNotification":false,"TwoFactorEnabled":false,"EmailConfirmed":false,"MobilePhoneConfirmed":false,"Notifications":false,"ChangePassword":"0001-01-01T00:00:00.0000000","Activated":"0001-01-01T00:00:00.0000000"},"WonOrLostByUserId":0,"AgreedToTerms":"0001-01-01T00:00:00.0000000","OnlineBookingBanned":false,"Country":"String","FingerprintEnrolled":"0001-01-01T00:00:00.0000000","LastPaymentAmount":0,"Pin":"String","ProspectingPoints":0,"AchievementPoints":0,"ParentForenames":"String","ParentSurname":"String"},"MemberId":0,"RefererMemberId":0,"PromotionId":0,"Payment1Fee":0,"Payment1Date":"0001-01-01T00:00:00.0000000","Payment2Fee":0,"Payment2Date":"0001-01-01T00:00:00.0000000","Payment1Type":0,"Payment1Method":0,"Payment2Type":0,"Payment2Method":0,"Payment3Type":0,"Payment3Method":0,"Payment3Fee":0,"Payment3Date":"0001-01-01T00:00:00.0000000","MembershipType":{"MembershipTypeId":0,"Name":"String","Description":"String","Definition":"String","Schedule":{"ScheduleId":0,"Name":"String","Description":"String","MondayFrom":"PT0S","MondayTo":"PT0S","TuesdayFrom":"PT0S","TuesdayTo":"PT0S","WednesdayFrom":"PT0S","WednesdayTo":"PT0S","ThursdayFrom":"PT0S","ThursdayTo":"PT0S","FridayFrom":"PT0S","FridayTo":"PT0S","SaturdayFrom":"PT0S","SaturdayTo":"PT0S","SundayFrom":"PT0S","SundayTo":"PT0S","ScheduleType":0,"Deleted":false,"Demo":false},"ScheduleId":0,"Deleted":false,"Demo":false,"Public":false,"SessionsRemaining":0,"ClassesRemaining":0,"SortOrder":0,"Special":false,"MultiSiteAccess":false,"MemberLimit":0,"PromotionCode":"String","PromotionStart":"0001-01-01T00:00:00.0000000","PromotionEnd":"0001-01-01T00:00:00.0000000","LicensesRemaining":0,"BookingAccessOnly":false,"SessionsPeriod":0,"SessionsFrequency":0,"StartsOn":"0001-01-01T00:00:00.0000000","AllowSelectionAfterStartsOn":false},"MembershipTypeId":0,"ProviderId":0,"Definition":"String","HasRecurringPayments":false,"Deleted":false,"Demo":false,"MembershipKey":"00000000000000000000000000000000","SessionsRemaining":0,"ClassesRemaining":0,"Cancelled":"0001-01-01T00:00:00.0000000","APICreated":"0001-01-01T00:00:00.0000000","SuspensionStart":"0001-01-01T00:00:00.0000000","SuspensionEnd":"0001-01-01T00:00:00.0000000","IpAddress":"String"}],"Meta":{"String":"String"},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}