User Tools

Site Tools


member

This is an old revision of the document!


Member.AddMember

Method: member/AddMember

Adds a new member without any subscription

      /// <param name="token"></param>
      /// <param name="firstname"></param>
      /// <param name="lastname"></param>
      /// <param name="addressline"></param>
      /// <param name="city"></param>
      /// <param name="zip"></param>
      /// <param name="email"></param>
      /// <param name="mobile"></param>
      /// <param name="dayofbirth"></param>
      /// <param name="owner"></param>
      /// <param name="iban"></param>
      /// <param name="bic"></param>
      /// <param name="info1"></param>
      /// 1..20
      /// <param name="info20"></param>
      /// <param name="statusid"></param>
      /// <param name="parentmemberid">id of the parent member, leave empty for no link</param>
      /// <param name="gender">M for Male, F for Female, U for unkown, O for others</param>
      /// <param name="note">memo field</param>       

Example: https://demo.clubplanner.be/api/member/addmember?token=DEMOTOKEN&firstname=John&lastname=Peterson

Result:

{“Id”:123456817,“OwnerId”:1,“OwnerName”:“Demo”,“FullName”:“John Peterson”,“CheckInStatus”:“No valid subscription found”}

Member.UpdateMember

Method: member/UpdateMember

Updates an existing member

      /// <param name="token"></param>
      /// <param name="memberid"></param>
      /// <param name="firstname"></param>
      /// <param name="lastname"></param>
      /// <param name="addressline"></param>
      /// <param name="city"></param>
      /// <param name="zip"></param>
      /// <param name="email"></param>
      /// <param name="mobile"></param>
      /// <param name="dayofbirth"></param>
      /// <param name="owner">id of the club</param>
      /// <param name="iban"></param>
      /// <param name="bic"></param>
      /// <param name="info1"></param>
      /// 1..20
      /// <param name="info20"></param>
      /// <param name="statusid">id of the status</param>
      /// <param name="parentmemberid">id of the parent member, set to -1 to clear link, leave empty for no changes</param>
      /// <param name="newsletter">0 or 1</param>
      /// <param name="from"></param>

Example, update the newsletter-flag to FALSE:

https://demo.clubplanner.be/api/member/UpdateMember?token=DEMOTOKEN&memberid=1&newsletter=0

Example, update the newsletter-flag to TRUE:

https://demo.clubplanner.be/api/member/UpdateMember?token=DEMOTOKEN&memberid=0&newsletter=1

Member.GetMember

Method: member/GetMember

Get a member via MemberId, put in the ID OR email

      /// <param name="token"></param>
      /// <param name="id"></param> 
      /// <param name="email"></param>

Example’s: https://demo.clubplanner.be/api/member/getmember?token=DEMOTOKEN&id=1

or

https://demo.clubplanner.be/api/member/getmember?token=DEMOTOKEN&email=jane.johanson%40mail.com

Result:

{“Id”:1,“UId”:“GMOL1”,“OwnerId”:1,“OwnerName”:“Demo Brussels”,“FirstName”:“Jane”,“LastName”:“Johanson”,“CheckInStatus”:“20 turns left valid until 7 maart Remainder 60,00 €”,“CheckInStatusId”:“HasRemainderLeft”,“EmailAddress”:“jane.johanson@mail.com”,“MobileNumber”:“04812121340”,“City”:“Bruxelles”,“Zip”:“1000”,“Address”:“Streetroad 1”,“BirthDate”:“14/07/1963”,“LastVisit”:“08/08/2016 17:53”,“NumberOfVisits”:8476,“Password”:“0LlHgtVlYrxx3y1ch/lfGFmADSENw1wSK67fxRMQWZjE45FFWta1IrHTIM0oOgr5Q33MbfW7jR7vblHz+uLs”,“LanguageId”:“EN”}

Member.AddSubscription

Method: member/AddSubscription

Add a subscription to a given member, use GetSubscriptions to get the list of subscription types. The parameter subid defines the subscription type.

      /// <param name="token"></param>
      /// <param name="memberid"></param>
      /// <param name="subid"></param>
      /// <param name="startdate"></param>
      /// <param name="option1">optional</param>
      /// <param name="option2">optional</param>
      /// <param name="option3">optional</param>
      /// <param name="option1_amount">optional</param>
      /// <param name="option2_amount">optional</param>
      /// <param name="option3_amount">optional</param>
      /// <param name="reference">optional</param>
      /// <param name="enddate">optional</param>
      /// <param name="autoenddate">optional, empty when no end of auto. extend</param>
      /// <param name="amount">optional</param>
      /// <param name="prorata">optional</param>
      /// <param name="paymethod">optional</param>
      /// <param name="visitsleft">optional, number of visits left in case of turncard</param>
      /// <param name="note">optional</param>
      /// <param name="from">optional</param>

Note : you can’t have 2 subscriptions active on the same date, in that case the API will return a 400 badrequest.

Examples: Example to add subscription: https://demo.clubplanner.be/api/member/AddSubscription?token=DEMOTOKEN&memberid=1&subid=1&startdate=01/01/2018&reference=mollie_tx_1234534789

Example to add subscription with 1 option: https://demo.clubplanner.be/api/member/AddSubscription?token=DEMOTOKEN&memberid=1&subid=2&startdate=01/01/2017&option1=1

Example to add subscription with 3 options: https://demo.clubplanner.be/api/member/AddSubscription?token=DEMOTOKEN&memberid=2&subid=2&startdate=20/12/2017&option1=1&option2=2&option3=3&reference=mollie_tx_1234534789

Example to add subscription with 3 options and overrule option1 amount: https://demo.clubplanner.be/api/member/AddSubscription?token=DEMOTOKEN&memberid=2&subid=2&startdate=20/07/2018&option1=1&option2=2&option3=3&reference=mollie_tx_1234534789&option1_amount=3

Member.PaySubscription

Adds a payment to given membersubscription, you cannot add an amount > remainder, else you will get a badrequest.

      /// <param name="token"></param>
      /// <param name="id">the id of the member subscription</param>
      /// <param name="amount"></param>
      /// <param name="couponid">optional, id of the coupon, in this case amount can be set to 0, it will automatically use the coupon until empty</param>
      /// <param name="reference">optional, example: id of the webshop transaction</param>
      /// <param name="paymethod">optional, the id of the paymethod</param>
      /// <param name="from">text, can be "vendingmachine"</param>
      

Member.UpdateSubscription

Update a given membersubscription.

      /// <param name="token"></param>
      /// <param name="id"></param>
      /// <param name="startdate">optional</param>
      /// <param name="reference">optional</param>
      /// <param name="enddate">optional</param>
      /// <param name="autoenddate">optional, auto. end of extend</param>
      /// <param name="paymethod">optional</param>
      /// <param name="amount">optional decimal</param>
      /// <param name="option1">optional integer with the id of the option to be added</param>
      /// <param name="option2">optional integer with the id of the option to be added</param>
      /// <param name="option3">optional integer with the id of the option to be added</param>
      /// <param name="option1_amount">optional decimal with the amount of option1</param>
      /// <param name="option2_amount">optional decimal with the amount of option2</param>
      /// <param name="option3_amount">optional decimal with the amount of option3</param>
      /// <param name="removeoptions">optional integer, set to 1 to remove all existing options</param>
      /// <param name="note">optional</param>
      /// <param name="from">optional</param>

Member.DeleteSubscription

Removes a given membersubscription.

      /// <param name="token"></param>
      /// <param name="id"></param>
      /// <param name="from"></param>

Note : you can only delete unpaid membersubscriptions via the API.

Member.GetMemberSubscriptions

Returns the subscriptions and options of each subscription of a given member

      /// <param name="token"></param>
      /// <param name="memberid"></param>
      

Get the list of membersubscriptions and options for each subscription for a given member. Note : only items with begindate < today + 30 days will be returned.

Example : https://demo.clubplanner.be/api/member/GetMemberSubscriptions?token=DEMOTOKEN&memberid=1

Member.GetMemberSubscriptions (II)

Returns the subscriptions of a given subscription type

      /// <param name="token">mandatory</param>
      /// <param name="fromdate">mandatory</param>
      /// <param name="todate">mandatory</param>
      /// <param name="subscriptionid">optional</param>
      /// <param name="owner">optional</param>
      

Get the list of membersubscriptions for a given timespan (filters on startdate membersubscription), owner-id and subscription type id is optional.

Examples: https://demo.clubplanner.be/api/member/GetMemberSubscriptions?token=DEMOTOKEN&fromdate=1-1-2018&todate=1-10-2018

https://demo.clubplanner.be/api/member/GetMemberSubscriptions?token=DEMOTOKEN&subscriptionid=1&fromdate=1-1-2018&todate=1-10-2018

https://demo.clubplanner.be/api/member/GetMemberSubscriptions?token=DEMOTOKEN&subscriptionid=1&fromdate=1-1-2018&todate=1-10-2018&owner=1

Retun: [{“MemberSubscriptionId”:37816,“SubscriptionId”:1,“MemberId”:57,“Description”:“Keepfit 3M”,“SubscriptionAmount”:150.0000,“ProRataAmount”:0.0000,“OptionsAmount”:0.0000,“Remainder”:150.0000,“SubType”:“Subscription”,“StartDate”:“01/01/2018”,“EndDate”:“31/03/2018”,“Note”:“”,“Reference”:“mollie_tx_1234534789”,“OwnerId”:1},{“MemberSubscriptionId”:37817,“SubscriptionId”:1,“MemberId”:58,“Description”:“Keepfit 3M”,“SubscriptionAmount”:150.0000,“ProRataAmount”:0.0000,“OptionsAmount”:0.0000,“Remainder”:150.0000,“SubType”:“Subscription”,“StartDate”:“01/01/2018”,“EndDate”:“31/03/2018”,“Note”:“”,“Reference”:“mollie_tx_1234534789”,“OwnerId”:1},{“MemberSubscriptionId”:37818,“SubscriptionId”:1,“MemberId”:59,“Description”:“Keepfit 3M”,“SubscriptionAmount”:150.0000,“ProRataAmount”:0.0000,“OptionsAmount”:0.0000,“Remainder”:150.0000,“SubType”:“Subscription”,“StartDate”:“01/01/2018”,“EndDate”:“31/03/2018”,“Note”:“”,“Reference”:“mollie_tx_1234534789”,“OwnerId”:1}]

Member.ForgotPassword

Send an e-mail as configured in the settings

      /// <param name="token"></param>
      /// <param name="memberid"></param>
      /// <param name="email"></param>
      

Sends an e-mail to the member with the memberid and password. This email can be configured using an email template. You need to provide memberid or email. Can be used in a forgot password screen on a website .

Return Ok when password was sent, or BadRequest when member was not found.

Member.GetSubscriptionOptions

Method: member/GetSubscriptionOptions

Get the options for a given subscription.

      /// <param name="token"></param>
      /// <param name="subid"></param>
      /// <param name="ownerid"></param>

Example's:

https://demo.clubplanner.be/api/member/GetSubscriptionOptions?token=DEMOTOKEN&subid=1&ownerid=1

https://demo.clubplanner.be/api/member/GetSubscriptionOptions?token=DEMOTOKEN&subid=2&ownerid=1

Member.GetStatusses

Get a list of all configured statustypes.

      /// <param name="token"></param>

Example:

https://demo.clubplanner.be/api/member/GetStatusses?token=DEMOTOKEN

Member.UpdateStatus

Update the status of a member.

      /// <param name="token"></param>
      /// <param name="memberid"></param>
      /// <param name="statusid"></param>
      /// <param name="from"></param>

Member.UpdateBlocked

Update blocking of a member.

      /// <param name="token"></param>
      /// <param name="memberid"></param>
      /// <param name="blocked">0 or 1</param>
      /// <param name="message">optionaly you can provide a text shown to both member and employee</param>
      /// <param name="from"></param>

Member.GetSubscriptions

Get the configured subscriptiontypes of a given club

      /// <param name="token"></param>
      /// <param name="owner">optional</param>

Note: when owner is used the API will only return the subscriptions that can be sold in that club.

Examples:

https://demo.clubplanner.be/api/member/getsubscriptions?token=DEMOTOKEN&owner=1

https://demo.clubplanner.be/api/member/getsubscriptions?token=DEMOTOKEN

Member.SubstractCredit

Substract credit from a member for a given id or uid or email, returns BadRequest when not enough credit. Is used in vending machines.

      /// <param name="token"></param>
      /// <param name="credit">amount</param>
      /// <param name="id">Member Id</param>
      /// <param name="email">Email Address</param>
      /// <param name="uid">unique card ID</param>
      /// <param name="from">Example: Icemachine</param>

Example:

https://demo.clubplanner.be/api/member/substractcredit?token=DEMOTOKEN&id=1&credit=1&from=mymilkshakemachine

You can also use UID (could barcode or mifare UID): https://demo.clubplanner.be/api/member/substractcredit?token=DEMOTOKEN&uid=A1B2C3D4&credit=1&from=mymilkshakemachine

Member.AddCredit

Add credit of a member for a given id or uid or email, returns BadRequest when credit = 0.

      /// <param name="token"></param>
      /// <param name="credit">amount</param>
      /// <param name="id">Member Id</param>
      /// <param name="email">Email Address</param>
      /// <param name="uid">unique card ID</param>
      /// <param name="from">Example: Icemachine</param>

Example:

https://demo.clubplanner.be/api/member/AddCredit?token=DEMOTOKEN&id=5&credit=5&from=bankterminal1

You can also use UID (could barcode or mifare UID): https://demo.clubplanner.be/api/member/AddCredit?token=DEMOTOKEN&uid=A1B2C3D4&credit=5&from=bankterminal1

Member.GetCountvisits

Get the number of unique checkin's, can be used for realtime visit tracking on websites.

      /// <param name="token"></param>
      /// <param name="fromdate"></param>
      /// <param name="todate"></param>
      /// <param name="owner"></param>

Example:

https://demo.clubplanner.be/api/member/getcountvisits?token=DEMOTOKEN&fromdate=13-01-2018%2013:42

Member.GetCountvisits

Get the number of unique checkin's, taken checkout's into account, can be used for realtime visit tracking on websites.

      /// <param name="token"></param>
      /// <param name="owner"></param>

Example:

https://demo.clubplanner.be/api/member/getcountvisits?token=DEMOTOKEN&owner=1

Member.GetOptions

get the list of all options

      /// <param name="token"></param>
      

Example:

https://demo.clubplanner.be/api/Member/GetOptions?token=DEMOTOKEN

Result: [{“Id”:1,“Description”:“Douche-Shower”},{“Id”:2,“Description”:“Yanga Drinks”},{“Id”:3,“Description”:“App”},{“Id”:4,“Description”:“Courses”}]

Member.GetVisits

Returns the checkin's

      /// <param name="token"></param>
      /// <param name="fromdate"></param>
      /// <param name="todate">leave empty for no to date</param>
      /// <param name="owner">leave empty for all clubs</param>
      /// <param name="memberid">leave empty when no filter on memberid</param>
      

Examples:

https://demo.clubplanner.be/api/member/getvisits?token=DEMOTOKEN&fromdate=1-01-2017&todate=10-01-2017

https://demo.clubplanner.be/api/member/getvisits?token=DEMOTOKEN&fromdate=1-01-2017

https://demo.clubplanner.be/api/member/getvisits?token=DEMOTOKEN&fromdate=1-01-2017&owner=1

Result: [{“Id”:189381,“MemberId”:2,“OwnerId”:2,“CheckInStatus”:“Abonnement nog 362 dagen geldig tot 31 december.”,“CheckInStatusId”:0,“CheckInDate”:“03/01/2017 09:14:04”,“CheckOutDate”:null,“CheckInPointName”:“Tourniquet”,“CheckInPointId”:“1”,“Subscription”:“Fitness 12M”},{“Id”:189382,“MemberId”:2,“OwnerId”:2,“CheckInStatus”:“Abonnement nog 362 dagen geldig tot 31 december.”,“CheckInStatusId”:0,“CheckInDate”:“03/01/2017 16:44:19”,“CheckOutDate”:null,“CheckInPointName”:“Tourniquet”,“CheckInPointId”:“1”,“Subscription”:“Fitness 12M”},{“Id”:189383,“MemberId”:2,“OwnerId”:2,“CheckInStatus”:“Abonnement nog 361 dagen geldig tot 31 december.”,“CheckInStatusId”:0,“CheckInDate”:“04/01/2017 13:37:11”,“CheckOutDate”:null,“CheckInPointName”:“Tourniquet”,“CheckInPointId”:“1”,“Subscription”:“Fitness 12M”}]

Member.GetMembers

Return list of member

      /// <param name="token"></param>
      /// <param name="filter"></param>
      

Note:

there is maximum of 1000 members that can be retrieved per call

Examples:

https://demo.clubplanner.be/api/Member/GetMembers?token=DEMOTOKEN&filter=member_id%3E0%20and%20member_id%3C10

https://demo.clubplanner.be/api/Member/GetMembers?token=DEMOTOKEN&filter=created_on>%272018/04/01%27

https://demo.clubplanner.be/api/Member/GetMembers?token=DEMOTOKEN&filter=created_on>%272018/04/01%27%20and%20newsletter=1

https://demo.clubplanner.be/api/Member/GetMembers?token=DEMOTOKEN&filter=created_on>%272018/04/01%27%20and%20newsletter=1

Filter on NAME (LIKE filter) https://demo.clubplanner.be/api/Member/GetMembers?token=DEMOTOKEN&filter=name%20like%20%27%verstr%%27

Filter on FIRSTNAME (LIKE filter) https://demo.clubplanner.be/api/Member/GetMembers?token=DEMOTOKEN&filter=firstname%20like%20%27%jan%%27

Filter on EMAIL (LIKE filter) https://demo.clubplanner.be/api/Member/GetMembers?token=DEMOTOKEN&filter=email_address%20like%20%27%gmail%%27

Result: [{“Id”:2,“UId”:“CD360159”,“OwnerId”:1,“OwnerName”:null,“FirstName”:“Bjorn”,“LastName”:“Bjorn”,“CheckInStatus”:null,“CheckInMultiMessage”:null,“CheckInStatusId”:null,“EmailAddress”:“kristofcoolsaet@hotmail.com”,“MobileNumber”:“0473943498”,“City”:null,“Zip”:null,“Address”:null,“BirthDate”:“14/01/1971”,“LastVisit”:“05/03/2018 20:07”,“NumberOfVisits”:98,“Password”:null,“LanguageId”:null,“StatusId”:0,“Points”:0,“CurrentSubscription”:null,“Credit”:0.0,“CreatedOn”:null,“Guid”:null}]

Member.GetSubscriptionGroups

get the list of all subscription groups

      /// <param name="token"></param>
      

Example:

https://demo.clubplanner.be/api/Member/GetSubscriptionGroups?token=DEMOTOKEN

Member.SendSMS

Sends an SMS to a given member

      /// <param name="token"></param>
      /// <param name="memberid">ID of member</param>
      /// <param name="message">content of SMS</param>
      /// <param name="from"></param>
      

Examples:

https://demo.clubplanner.be/api/member/SendSMS?token=DEMOTOKEN&memberid=1&message=ABCDEF

Member.SendEmail

Sends an Email to a given member, note: this is using HTTP post! When address is left empty it will use the email address of the given member.

{ “token”: “DEMOTOKEN”, “memberid”: “0”, “message”: “My Email subject”, “subject”: “My email body”, “from”: “website”, “address”: “info@clubplanner.be” }

Example:

https://demo.clubplanner.be/api/member/SendEmail

Member.VerifyPassword

Check's the password of the given member

      /// <param name="token"></param>
      /// <param name="memberid">optional: memberid</param>
      /// <param name="email">optional: e-Mail instead of memberid</param>
      /// <param name="password">password to be checked</param>
      /// <param name="from"></param>
      

Examples:

https://demo.clubplanner.be/api/member/VerifyPassword?token=DEMOTOKEN&memberid=1&password=demo

When password matches it will return HTTP OK, else Badrequest.

Member.GetContract (GET)

Get the HTML of the contract for a given member subscription. If no contract has been configured on the subscription type a badrequest is returned.

      /// <param name="token"></param>
      /// <param name="id">id of membersubscription</param>
      /// <param name="from"></param>
      

Examples:

https://demo.clubplanner.be/api/member/GetContract?token=DEMOTOKEN&id=72580

Returns:

  {
      public int subscriptionid
      public int memberid
      public string contract
  }
  

Member.UploadContract (POST)

Uploads a signed contract (pdf) and stores in the given membersubscription. If no contract has been configured on the subscription type a badrequest is returned. An error is returned when the pdf is empty or the memberid is not the owner of the membersubscription.

      /// <param name="token"></param>
      /// <param name="id">id of membersubscription</param>
      /// <param name="memberid">id of the member</param>
      /// <param name="pdf">byte array of the pdf</param>
      /// <param name="from"></param>

Returns:

  {
      public int subscriptionid
      public int memberid
      public int contractid
  }
  

Member.ValidateEmailAddress

Set this email address as a validated email address, this action is logged. Calling updatemember with a new email address will remove the validated timestamp for this field.

      /// <param name="token"></param>
      /// <param name="memberid">id of the member</param>
      /// <param name="email"></param>

returns:

  {
      public string Message
      public bool Failed
  }
         

Member.ValidateMobileNumber

Set the given mobile number as a validated mobile number, this action is logged Calling updatemember with a new email address will remove the validated timestamp for this field.

      /// <param name="token"></param>
      /// <param name="memberid">id of the member</param>
      /// <param name="mobile"></param>
      

returns:

  {
      public string Message
      public bool Failed
  }
member.1651237000.txt.gz · Last modified: 2022/04/29 14:56 by clubadmin