POST,GET | /api/Member/GetMembersForAccessControl |
---|
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
class MembershipState(str, Enum):
PROSPECT = 'Prospect'
ACTIVE = 'Active'
EXPIRED = 'Expired'
CANCELLED = 'Cancelled'
PAYMENT_REQUIRED = 'PaymentRequired'
SUSPENDED = 'Suspended'
class ExternalStatus(str, Enum):
OFF = 'Off'
ACTIVE = 'Active'
PENDING = 'Pending'
CANCELLED_INSIDE_CONTRACT = 'CancelledInsideContract'
CANCELLED_OUTSIDE_CONTRACT = 'CancelledOutsideContract'
WITH_DEBT_RECOVERY = 'WithDebtRecovery'
SUSPENDED = 'Suspended'
class MemberAccess(IntEnum):
ACCESS_ALLOWED = 1
NO_ACCESS = 2
NO_MULTI_SITE_ACCESS = 3
NO_SESSIONS = 4
NO_SCHEDULE_ACCESS = 5
NO_ACCESS_TIME_LIMIT_EXCEEDED = 6
SUSPENDED = 7
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class AccessControlMember:
member_id: Optional[int] = None
enrolment_id: Optional[int] = None
branch_id: Optional[int] = None
membership_state: Optional[MembershipState] = None
membership_number: Optional[str] = None
card_number: Optional[str] = None
forenames: Optional[str] = None
surname: Optional[str] = None
multi_site_access: Optional[bool] = None
use_external_status: Optional[bool] = None
external_status: Optional[ExternalStatus] = None
membership_type_name: Optional[str] = None
start_date: Optional[datetime.datetime] = None
end_date: Optional[datetime.datetime] = None
schedule_id: Optional[int] = None
sessions_remaining: Optional[int] = None
last_attendance: Optional[datetime.datetime] = None
member_access: Optional[MemberAccess] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Schedule:
schedule_id: Optional[int] = None
name: Optional[str] = None
description: Optional[str] = None
monday_from: Optional[datetime.timedelta] = None
monday_to: Optional[datetime.timedelta] = None
tuesday_from: Optional[datetime.timedelta] = None
tuesday_to: Optional[datetime.timedelta] = None
wednesday_from: Optional[datetime.timedelta] = None
wednesday_to: Optional[datetime.timedelta] = None
thursday_from: Optional[datetime.timedelta] = None
thursday_to: Optional[datetime.timedelta] = None
friday_from: Optional[datetime.timedelta] = None
friday_to: Optional[datetime.timedelta] = None
saturday_from: Optional[datetime.timedelta] = None
saturday_to: Optional[datetime.timedelta] = None
sunday_from: Optional[datetime.timedelta] = None
sunday_to: Optional[datetime.timedelta] = None
schedule_type: Optional[int] = None
branch_id: Optional[int] = None
deleted: Optional[bool] = None
demo: Optional[bool] = None
monday: Optional[bool] = None
tuesday: Optional[bool] = None
wednesday: Optional[bool] = None
thursday: Optional[bool] = None
friday: Optional[bool] = None
saturday: Optional[bool] = None
sunday: Optional[bool] = None
monday_total_time: Optional[datetime.timedelta] = None
tuesday_total_time: Optional[datetime.timedelta] = None
wednesday_total_time: Optional[datetime.timedelta] = None
thursday_total_time: Optional[datetime.timedelta] = None
friday_total_time: Optional[datetime.timedelta] = None
saturday_total_time: Optional[datetime.timedelta] = None
sunday_total_time: Optional[datetime.timedelta] = None
total_time: Optional[datetime.timedelta] = None
class BranchType(str, Enum):
DEBIT_FINANCE = 'DebitFinance'
SMART_DEBIT = 'SmartDebit'
STANDARD = 'Standard'
ROOT = 'Root'
RESELLER = 'Reseller'
REFERRER = 'Referrer'
# @Flags()
class Module(IntEnum):
STANDARD = 0
BOOKINGS = 1
class ApplicationType(IntEnum):
GYM = 1
GOLF = 2
DANCE = 3
SOCCER = 4
VANILLA = 5
ASSOCIATION = 6
MARTIAL_ARTS = 7
GYMNASTICS = 8
SWIMMING = 9
NURSERIES = 10
RACQUET = 11
SUBSCRIPTION_BOX = 12
CLINIC = 13
WELLNESS = 14
HEALTH_AND_BEAUTY = 15
CLIMBING = 16
AFTER_SCHOOL_CLUB = 17
PERSONAL_TRAINER = 18
# @Flags()
class Feature(IntEnum):
NONE = 0
STANDARD = 1
BOOKINGS = 2
ROTA = 4
GO_CARDLESS = 8
HOME_SCREEN = 16
E_POS = 32
ATTENDANCE = 64
SALES = 128
PAYMENT_COLLECTIONS = 256
MAIL_CHIMP = 512
MULTI_SITE = 1024
ACCOUNTING_DASHBOARD = 2048
OTHER_DASHBOARDS = 4096
REPORTS = 8192
ADVANCED_ACCOUNTING = 16384
MEMBER_LICENSE_DATES = 32768
FACE_RECOGNITION = 65536
MEMBER_ACCOUNT_CREATION = 131072
AUTOMATION = 262144
FACEBOOK_MARKETING = 524288
GRADES = 1048576
ZOOM_INTEGRATION = 2097152
SALES_TARGET_CHART = 4194304
CUSTOM_APP = 8388608
CUSTOM_ATTRIBUTES_ON_PORTAL = 16777216
NO_EXPORT = 33554432
ENTERPRISE_CLUB_PERFORMANCE_DASHBOARDS = 67108864
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Iso3166Country:
name: Optional[str] = None
two_letter_code: Optional[str] = None
three_letter_code: Optional[str] = None
numeric_code: Optional[int] = None
phone_prefix: Optional[List[str]] = None
class BranchMinimiser(str, Enum):
NONE = 'None'
CM_GO = 'CMGo'
BASIC_PORTAL = 'BasicPortal'
class ReportFormat(IntEnum):
PDF = 1
WORD = 2
EXCEL = 3
PNG = 4
XPS = 5
CSV = 6
HTML5 = 7
# @Flags()
class AppFeature(IntEnum):
NONE = 0
JOIN_ONLINE = 1
TODAYS_CLASSES = 2
REGISTRATION_FORM = 4
FORTHCOMING_BOOKINGS = 8
WEEKLY_TIMETABLE = 16
SESSION_TIMETABLE = 32
FACILITY_TIMETABLE = 64
TASTER_SESSIONS = 128
HOW_TO_FIND_US = 256
ATTENDANCE_LEADERBOARD = 512
MEMBER_MESSAGES = 1024
ACHIEVEMENT_GALLERY = 2048
FREE_TEXT = 4096
QR_CODE = 8192
SHARE_AND_INVITE_A_FRIEND = 16384
RENEWAL_PROMPT = 32768
CURRENT_CAPACITY = 65536
JOIN_FRIEND = 131072
MEMBER_POINTS = 262144
PROMO_MEMBERSHIP = 524288
SHOP = 1048576
SHOW_FACEBOOK = 2097152
SHOW_TWITTER = 4194304
SHOW_INSTAGRAM = 8388608
SHOW_YOU_TUBE = 16777216
SHOW_TIK_TOK = 33554432
SHOW_SHOPIFY = 67108864
ATTENDANCE_STREAK = 134217728
BOOKING_CATEGORIES = 268435456
SHOW_SESSIONS_REMAINING = 536870912
# @Flags()
class SignInScreenFeature(IntEnum):
NONE = 0
SIGN_IN_NUM_PAD = 1
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Branch:
branch_id: Optional[int] = None
branch_type: Optional[BranchType] = None
name: Optional[str] = None
prefix: Optional[str] = None
company_name: Optional[str] = None
company_address: Optional[str] = None
company_official_name: Optional[str] = None
direct_debit_reference: Optional[str] = None
fast_d_d_reference: Optional[str] = None
fast_d_d_platinum_ref: Optional[str] = None
style: Optional[str] = None
public_key: Optional[str] = None
private_key: Optional[str] = None
trial_start: Optional[datetime.datetime] = None
trial_end: Optional[datetime.datetime] = None
payment_start_date: Optional[datetime.datetime] = None
in_trial: Optional[bool] = None
use_free_text: Optional[bool] = None
free_text_title: Optional[str] = None
use_membership_types: Optional[bool] = None
dd_user_name: Optional[str] = None
dd_password: Optional[str] = None
dd_service_user: Optional[str] = None
dfc_user_name: Optional[str] = None
dfc_password: Optional[str] = None
dfc_club_number: Optional[str] = None
company_email: Optional[str] = None
sms_originator: Optional[str] = None
language_id: Optional[int] = None
vat_rate: Optional[Decimal] = None
swipe_action: Optional[int] = None
modules: Optional[Module] = None
use_credit_balance: Optional[bool] = None
allow_negative_balance: Optional[bool] = None
default_credit_limit: Optional[Decimal] = None
application_type: Optional[ApplicationType] = None
external_provider_warning: Optional[str] = None
domain: Optional[str] = None
mobile_domain: Optional[str] = None
online_booking_timetable_limit: Optional[int] = None
online_booking_cancellation_limit: Optional[int] = None
online_booking_limit: Optional[int] = None
feature: Optional[Feature] = None
time_zone: Optional[str] = None
culture: Optional[str] = None
country: Optional[str] = None
iso3166_country: Optional[Iso3166Country] = None
currency_culture: Optional[str] = None
show_go_cardless_ad: Optional[bool] = None
go_cardless_saving: Optional[Decimal] = None
sro_address: Optional[str] = None
mca_club_no: Optional[str] = None
mca_club_ref: Optional[str] = None
twilio_number: Optional[str] = None
telephone: Optional[str] = None
transferred: Optional[bool] = None
online_booking_allow_non_actives: Optional[bool] = None
member_limit: Optional[int] = None
sort_code: Optional[str] = None
account_number: Optional[str] = None
website: Optional[str] = None
send_s_m_s_appointment_reminders_default: Optional[bool] = None
send_s_m_s_booking_reminders: Optional[bool] = None
gift_aid: Optional[bool] = None
global_booking_start_time: Optional[datetime.timedelta] = None
global_booking_end_time: Optional[datetime.timedelta] = None
booking_minute_increments: Optional[int] = None
cancel_reason: Optional[str] = None
cancel_further: Optional[str] = None
cancel_date: Optional[datetime.datetime] = None
direct_debit_fee: Optional[Decimal] = None
credit_card_fee: Optional[Decimal] = None
sms_price_adjustment: Optional[Decimal] = None
bookings_pay_link_on_track: Optional[bool] = None
access_control_time_limit: Optional[int] = None
minimiser: Optional[BranchMinimiser] = None
auto_generate_licenses: Optional[bool] = None
terms: Optional[str] = None
fingerprint_threshold: Optional[int] = None
fingerprint_matcher_threshold: Optional[int] = None
auto_shutoff: Optional[bool] = None
primary_colors: Optional[str] = None
has_colors: Optional[bool] = None
primary_color: Optional[str] = None
secondary_color: Optional[str] = None
background_color: Optional[str] = None
header_top_color: Optional[str] = None
header_bottom_color: Optional[str] = None
side_left_color: Optional[str] = None
side_right_color: Optional[str] = None
side_font_color: Optional[str] = None
side_font_active_color: Optional[str] = None
ext_web_background_color: Optional[str] = None
ext_web_text_color: Optional[str] = None
ext_web_tint_back_color: Optional[str] = None
ext_web_highlight_back_color: Optional[str] = None
ext_web_tab_back_color: Optional[str] = None
heading_color: Optional[str] = None
report_format: Optional[ReportFormat] = None
fix_payments: Optional[bool] = None
fix_payment_schedle: Optional[str] = None
app_feature: Optional[AppFeature] = None
sign_in_screen_feature: Optional[SignInScreenFeature] = None
app_options: Optional[str] = None
company_description: Optional[str] = None
capacity: Optional[int] = None
monthly_sales_target: Optional[int] = None
booking_access_time_limit: Optional[int] = None
facebook: Optional[str] = None
twitter: Optional[str] = None
instagram: Optional[str] = None
you_tube: Optional[str] = None
tik_tok: Optional[str] = None
shopify: Optional[str] = None
minimum_member_age: Optional[int] = None
terms_and_conditions_version_date: Optional[datetime.datetime] = None
terms_and_conditions_accepted_date: Optional[datetime.datetime] = None
terms_and_conditions_accepted: Optional[bool] = None
site_url: Optional[str] = None
is_using_smart_debit: Optional[bool] = None
is_using_dfc: Optional[bool] = None
is_south_africa: Optional[bool] = None
smart_debit_configured: Optional[bool] = None
dfc_configured: Optional[bool] = None
using_payment_methods: Optional[bool] = None
sms_prefix: Optional[str] = None
logo: Optional[str] = None
logo_thumbnail: Optional[str] = None
logo_hash: Optional[str] = None
send_marketing_invite_when_member_added: Optional[bool] = None
send_marketing_invite_when_member_joined_online: Optional[bool] = None
marketing_compliance_managed_externally: Optional[bool] = None
online_booking_allow_waiting_list: Optional[bool] = None
online_multi_site_enabled: Optional[bool] = None
can_book_online: Optional[bool] = None
public_membership_types: Optional[int] = None
trusted_branches: Optional[int] = None
is_adding_prospects: Optional[bool] = None
is_selling_memberships: Optional[bool] = None
is_creating_tasks: Optional[bool] = None
is_creating_appointments: Optional[bool] = None
is_booking_classes: Optional[bool] = None
is_registering_attendance: Optional[bool] = None
is_selling_products: Optional[bool] = None
is_sending_emails: Optional[bool] = None
is_sending_s_m_s: Optional[bool] = None
is_using_automation: Optional[bool] = None
deduct_sessions_on_booking: Optional[bool] = None
show_trusted_branch_bookings: Optional[bool] = None
score: Optional[int] = None
application_id: Optional[str] = None
i_o_s_app_link: Optional[str] = None
android_app_link: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class AccessControlMembers:
members: Optional[List[AccessControlMember]] = None
schedules: Optional[List[Schedule]] = None
branch: Optional[Branch] = None
Python MemberService.GetMembersForAccessControlRequest 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
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /api/Member/GetMembersForAccessControl HTTP/1.1
Host: api.clubmanagercentral.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"MemberId":0,"Date":"0001-01-01T00:00:00.0000000"}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"Members":[{"MemberId":0,"EnrolmentId":0,"BranchId":0,"MembershipState":"Prospect","MembershipNumber":"String","CardNumber":"String","Forenames":"String","Surname":"String","MultiSiteAccess":false,"UseExternalStatus":false,"ExternalStatus":"Off","MembershipTypeName":"String","StartDate":"0001-01-01T00:00:00.0000000","EndDate":"0001-01-01T00:00:00.0000000","ScheduleId":0,"SessionsRemaining":0,"LastAttendance":"0001-01-01T00:00:00.0000000","MemberAccess":"AccessAllowed"}],"Schedules":[{"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,"BranchId":0,"Deleted":false,"Demo":false,"Monday":true,"Tuesday":true,"Wednesday":true,"Thursday":true,"Friday":true,"Saturday":true,"Sunday":true,"MondayTotalTime":"P1D","TuesdayTotalTime":"P1D","WednesdayTotalTime":"P1D","ThursdayTotalTime":"P1D","FridayTotalTime":"P1D","SaturdayTotalTime":"P1D","SundayTotalTime":"P1D","TotalTime":"P7D"}],"Branch":{"BranchId":0,"BranchType":"DebitFinance","Name":"String","Prefix":"String","CompanyName":"String","CompanyAddress":"String","CompanyOfficialName":"String","DirectDebitReference":"String","FastDDReference":"String","FastDDPlatinumRef":"String","Style":"String","PublicKey":"00000000000000000000000000000000","PrivateKey":"00000000000000000000000000000000","TrialStart":"0001-01-01T00:00:00.0000000","TrialEnd":"0001-01-01T00:00:00.0000000","PaymentStartDate":"0001-01-01T00:00:00.0000000","InTrial":false,"UseFreeText":false,"FreeTextTitle":"String","UseMembershipTypes":false,"DDUserName":"String","DDPassword":"String","DDServiceUser":"String","DfcUserName":"String","DfcPassword":"String","DfcClubNumber":"String","CompanyEmail":"String","SmsOriginator":"String","LanguageId":0,"VatRate":0,"SwipeAction":0,"Modules":0,"UseCreditBalance":false,"AllowNegativeBalance":false,"DefaultCreditLimit":0,"ApplicationType":"Gym","ExternalProviderWarning":"String","Domain":"String","MobileDomain":"String","OnlineBookingTimetableLimit":0,"OnlineBookingCancellationLimit":0,"OnlineBookingLimit":0,"Feature":0,"TimeZone":"String","Culture":"String","Country":"String","Iso3166Country":null,"CurrencyCulture":"String","ShowGoCardlessAd":false,"GoCardlessSaving":0,"SROAddress":"String","MCAClubNo":"String","MCAClubRef":"String","TwilioNumber":"String","Telephone":"String","Transferred":false,"OnlineBookingAllowNonActives":false,"MemberLimit":0,"SortCode":"String","AccountNumber":"String","Website":"String","SendSMSAppointmentRemindersDefault":false,"SendSMSBookingReminders":false,"GiftAid":false,"GlobalBookingStartTime":"PT0S","GlobalBookingEndTime":"PT0S","BookingMinuteIncrements":0,"CancelReason":"String","CancelFurther":"String","CancelDate":"0001-01-01T00:00:00.0000000","DirectDebitFee":0,"CreditCardFee":0,"SMSPriceAdjustment":0,"BookingsPayLinkOnTrack":false,"AccessControlTimeLimit":0,"Minimiser":"None","AutoGenerateLicenses":false,"Terms":"String","FingerprintThreshold":0,"FingerprintMatcherThreshold":0,"AutoShutoff":false,"PrimaryColors":"String","HasColors":false,"PrimaryColor":"String","SecondaryColor":"#FF0C67","BackgroundColor":"#ffffff","HeaderTopColor":"#d4fd04","HeaderBottomColor":"#d4fd04","SideLeftColor":"#F0F0F0","SideRightColor":"#F0F0F0","SideFontColor":"#555555","SideFontActiveColor":"#808080","ExtWebBackgroundColor":"#FFFFFF","ExtWebTextColor":"#404040","ExtWebTintBackColor":"#B9DE00","ExtWebHighlightBackColor":"#FF0C67","ExtWebTabBackColor":"#e8e8e8","HeadingColor":"#000000","ReportFormat":"PDF","FixPayments":false,"FixPaymentSchedle":"String","AppFeature":0,"SignInScreenFeature":0,"AppOptions":"String","CompanyDescription":"String","Capacity":0,"MonthlySalesTarget":0,"BookingAccessTimeLimit":0,"Facebook":"String","Twitter":"String","Instagram":"String","YouTube":"String","TikTok":"String","Shopify":"String","MinimumMemberAge":0,"TermsAndConditionsVersionDate":"0001-01-01T00:00:00.0000000","TermsAndConditionsAcceptedDate":"0001-01-01T00:00:00.0000000","TermsAndConditionsAccepted":false,"SiteUrl":"https://string","IsUsingSmartDebit":false,"IsUsingDfc":true,"IsSouthAfrica":false,"SmartDebitConfigured":true,"DfcConfigured":true,"UsingPaymentMethods":false,"SmsPrefix":"String","Logo":"https:///Template.mvc/GetImage?id=UgByAHUAeQBNAHMAZABmADQASQBMAFEAZwBIAGMAcgArADAAQgBoADEAQQA9AD0A","LogoThumbnail":"https:///Template.mvc/GetThumbnail?id=UgByAHUAeQBNAHMAZABmADQASQBMAFEAZwBIAGMAcgArADAAQgBoADEAQQA9AD0A","LogoHash":"String","SendMarketingInviteWhenMemberAdded":false,"SendMarketingInviteWhenMemberJoinedOnline":false,"MarketingComplianceManagedExternally":false,"OnlineBookingAllowWaitingList":false,"OnlineMultiSiteEnabled":false,"CanBookOnline":false,"PublicMembershipTypes":0,"TrustedBranches":0,"IsAddingProspects":false,"IsSellingMemberships":false,"IsCreatingTasks":false,"IsCreatingAppointments":false,"IsBookingClasses":false,"IsRegisteringAttendance":false,"IsSellingProducts":false,"IsSendingEmails":false,"IsSendingSMS":false,"IsUsingAutomation":false,"DeductSessionsOnBooking":false,"ShowTrustedBranchBookings":false,"Score":0,"ApplicationId":"com.clubmanagercentral.clublink","iOSAppLink":"String","AndroidAppLink":"String"}}