All Collections
API / Customization / Advanced
Working with the PeopleVine API
Integrate Your Hardware to Verify Members as they Arrive
Integrate Your Hardware to Verify Members as they Arrive

his step by step tutorial will show you how to verify a membership card and check them in via our API.

Updated over a week ago

his step by step tutorial will show you how to verify a membership card and check them in via our API.

Now that you or your vendor are looking to integrate their keycard/ID card solution with our digital and existing ecosystem, there are a few things to keep our environments in sync.

To preface this article, these are some common use cases this can enable:

  • Member is approaching the space, notify staff they are arriving.

  • Member has lingered around a certain area for too long, send them a message.

  • When you become a member, you immediately gain access.

  • When your membership is no longer active, you immediately gain access.

  • Add a paywall to physical spaces.

    The integration is going to be a two-way integration between Peoplevine and your platform. The best part is, you have full access to build this directly in Peoplevine without the need to modify your markup to accommodate our data. In this integration, we're going to first notify your platform when a new member is activated (and/or canceled) so you can update your records to enable/disable access. This will ensure our databases are in sync. Then you will need to develop an integration to send us the member data as they check in. When doing this, not only will we track visit history on the member's profile, but staff will be immediately notified, systems like Sevenrooms will be notified upon arrival and an infinite amount of automation that you can configure.

Member is Activated Member is set to Inactive (or cancels) Member Scans in At Door Control We send webhook with data We send webhook With data Sends data to PeopleV ine Member is reg istered in Security System Member is removed from Security System Activity stored in PeopleVine via ve rifyMe mbe hip API call Response includes Send confirm ation extemal ID for To PeopleVlne tracking We need the external ID we received when added along with location.

Get Notified/Data When a New Member is Activated (or Cancelled) to Activate in your System

First, we'll get started with setting up the webhooks so you can get new members and member changes to update your system. Start by going to the Automate suite in Peoplevine and click on Setup New Webhook. Please note, if you have an expiring token, you will need to setup a new Webhook Auth.

A Webhook Auth enables you to enter the initiation URL, get the token URL, and refresh the URL in an effort for our system to automatically generate that token when it expires. Please note that your response should have an expires_in field with an integer in minutes. We will then set this to expire at that time and once expired we will request a new token.

Once you have set this up, you can access the access token by including {@access_token@} in your header or body request.

Now that your Webhook Auth is in place, you will need to setup a webhook to leverage this (and test it out). Start by clicking on Automate then New Webhook.

When setting up the webhook, you will need to first select the action that will trigger this. In this case, you are going to setup at least 2 triggers. You want to setup 1) when a member is set to active - so you either register on your side and/or activate if was disabled. 2) when the membership is set to canceled to disable their access and 3) when the membership changed (to get new membership ID). You can setup additional as needed (but it's done one at a time).

After you selected which memberships (or all) to process this on, you will then need to setup the webhook to share the data. Start by adding the URL and then attaching the credentials you created. Once attached you can then reference the generated token by entering {@access_token@} in the header or body object.

Then select the fields you need in your call. We currently pull available fields associated with the membership. Some key fields that identify the member back in our system would be customer_no, membership_id, and membership_card_no. Please note the membership_id can change, while the customer_no will never change and the membership_card_no only changes when they have a new membership (not if their membership_id or something else changes).

Once the webhook is saved (and set to active), any time a member is set to active (or canceled) we will send you the requested member's data to your API endpoint using your API credentials.

Once these are in place, any time a new member is activated (or existing switched back to activated), you will get a webhook with their info. Then once they cancel, you'll be notified to deactivate. Now that these are in place, let's focus on syncing member check-ins with our platform.

Sync Member Check-Ins with Peoplevine

When a member checks in to your hardware, you can leverage our verifyMembership API to confirm if they are an active member along with logging this data into the member's profile. To do this, follow these steps:

  • View the verifyMembership API under the Membership Methods

  • Here's a sample object to pass to the API
    { "business_location_no": 0, "membership_card_no": 442838, "customer_no": 2760499, "membership_id": "", "location": "Location of Scan", "verified_by": "device", "verified_id": "Device ID", "scanner_type": "Your System Name"}

  • Alternatively, you can pass in the membership_id instead of the customer_no and membership_card_no.

You will then receive a response that the membership was verified or if it failed for some reason. This will be returned to you in a response object with isError = true or false and the details in returnObject.

Did this answer your question?