Skip to main content
Member management is server-side. These calls use the secret Org-API-Key on your backend only - never ship it in an app or client code. A request with a member token is rejected with 403. See Authentication and Server-side API.
A member is one of your users as Expys knows them, keyed by your own stable externalUserID. From your backend you upsert a member’s profile and tier, read a full summary of their wallet and redemption activity, and remove them when needed.

Upsert a member

setMember(externalUserID, {...}) calls PUT /v1/members/{externalUserID} and creates the member if they do not exist or updates them if they do. PUT is idempotent by HTTP semantics, so replaying the same body is safe.
string
Optional display name stored on the member profile.
string
A free-form tier string you define (for example gold, vip). It flows into member-mode eligibility to gate offers.
object
Free-form JSON for your own metadata. Stored as-is and returned on getMember.
curl
The response is a SetMemberResponse:
tier is a string you define - Expys does not enforce a fixed set. Keep tier names consistent with the conditions you check in eligibility.

Read a member summary

getMember(externalUserID) calls GET /v1/members/{externalUserID} and returns a MemberSummary: the profile plus the member’s wallet and a per-status count of their redemptions.
curl
string
required
Your stable identifier for the member.
string
The stored display name, or null if unset.
string
required
The member’s tier.
object
Your free-form metadata, or null if unset.
Wallet
required
The member’s points wallet.
RedemptionCounts
required
A map of redemption status to count for this member.

Wallet

Redemption counts

redemptionCounts is a per-status count of the member’s redemptions across the booking lifecycle: All values are numbers.

List members

listMembers({ tier?, limit?, cursor? }) calls GET /v1/members and returns a page of the same MemberSummary records, newest-first.
curl
string
Return only members whose tier matches this value exactly.
number
Members per page, 1-100. Defaults to 20.
string
The nextCursor from a previous response.
The response is { members, nextCursor }. Keep passing nextCursor back as cursor until it comes back null, which means the list is exhausted:
curl
The list only includes members provisioned through the SDK — those with an external identity in your org. Archived members are excluded.

Remove a member

removeMember(externalUserID, { retainBalance? }) calls DELETE /v1/members/{externalUserID} and archives the member. The optional retainBalance query parameter controls whether the points balance is kept.
boolean
When true, the member’s points balance is retained on the archived record. When omitted or false, the balance is not retained.
curl
The response is a RemoveMemberResponse:
Removal archives rather than hard-deletes the member, so historical redemptions and analytics remain consistent.

In code

The server client is constructed with the Org-API-Key. The example below upserts a member; getMember, listMembers and removeMember are called the same way.

Next steps

Eligibility

How a member’s tier gates which offers they can redeem in member mode.

Points and wallet

Mint and credit points into the wallet returned by getMember.