Member API - How to Edit Member Data with API Calls

Link: https://support.brilliantdirectories.com/support/solutions/articles/12000091105-member-api-how-to-edit-member-data-with-api-calls

Now that our connection is all set and our Zap is published, we can update the spreadsheet created and this will create members on the site dynamically.


How to Connect to the API: Google Sheets Example


The examples shown in this article are completed using https://www.postman.com/.

 


Updating Member Data


The API's main function is to add members to the database, it does not trigger a welcome emails because the member did not actually sign up on the site.


We have created a parameter that can be sent with the API request to trigger the email being sent, based on the settings of the membership plan. The idea is not to always trigger the signup email to be sent, only when the parameter is sent with the request.


The parameter:


send_email_notifications


Is set to 1 so the system will now trigger the emails after a successful create user request:






When updating a members information using the api, only one member can be updated at a time.


Using the following URL: 


/api/v2/user/update




Make sure that the member data that is to be updated keeps the original user_id of the member, this is important because the id is tied to the member in the database.


With the same user_id you can then add the fields and the new information.




Items to take in consideration with the user UPDATE

  • In order to add new services (sub and sub-sub level categories) for the current top level category add the parameter: 
    create_new_categories = 1
  • Sub and sub-sub categories have to match the parent top category and sub-subs have to match the parent sub.
  • Email can only be a duplicate is allowed in the site settings: allow_duplicate_member_emails
  • Combo of email + password can never be the same for 2 members.
  • Token can't be a duplicate and needs to follow the correct format, it needs to be alphanumerical and 32 characters.
  • All of the values passed for all fields have to be an accepted value. Use our member import template as a guide for accepted default values: How To Import Members Via CSV File


The subscription_id and profession_id have to created within the site before they can be used or updated via spreadsheet. This means the membership plan and categories must already exist within the site in order for the api call to work properly.


>> Finance ยป Membership Plans Overview

>> How To Import Categories Via CSV File



Verify User Credentials Action


This API endpoint is used to verify user credentials. It is easy and cost-effective for websites that provide support for SSO directly.


  • api/v2/user/login