/external-memberships/-actions/upsert-with-customer

Atomically find or create a customer and upsert an external membership in one call. Matches on first_name + last_name + birthdate (+ email if provided). 0 matches → creates customer + membership (201). 1 match → upserts membership for existing customer (200 or 201). 2+ matches → 422 with list of matching customer IDs for manual resolution. If external_id is already assigned to a different customer → 422 with existing_customer_id. Status is automatically derived from expires_at: null/future → active, past → expired. Every save is recorded in the audit log (objectType = SIT_ExternalMembership).

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Atomically find or create a customer and upsert an external membership in one call. Matches on first_name + last_name + birthdate (+ email if provided). 0 matches → creates customer + membership (201). 1 match → upserts membership for existing customer (200 or 201). 2+ matches → 422 with list of matching customer IDs for manual resolution. If external_id is already assigned to a different customer → 422 with existing_customer_id. Status is automatically derived from expires_at: null/future → active, past → expired. Every save is recorded in the audit log (objectType = SIT_ExternalMembership).

string
required
length ≤ 50

Customer's first name.

string
required
length ≤ 50

Customer's last name.

date
required

Customer's date of birth (YYYY-MM-DD).

string | null
enum

Customer's gender: m = male, f = female, o = non-binary. Optional — defaults to blank if not provided.

Allowed:
string | null

Customer's email address. Optional but recommended — used as an additional matching signal to reduce false duplicates.

string | null

Customer's daytime phone number.

string | null

Customer's mobile phone number.

string
required

Bay Club's member ID.

string
enum
required

Provider type. Currently only "bayclub" is accepted.

Allowed:
date-time | null

UTC ISO-8601 datetime when the membership expires. Omit or send null for no expiry (treated as active).

Responses
200

Existing customer found, membership upserted successfully.

201

New customer and/or membership created successfully.

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/vnd.api+json