GET/customers
List and filter customers
Scopes: customers:read
Parameters
limit querystarting_after queryq queryemail queryphone queryexternal_id querytag querystatus query
Responses: 200 Success · 400 Invalid request (validation_failed, invalid_json, missing_idempotency_key) · 401 Missing, invalid or expired credentials · 403 Insufficient scope, IP not allowed or tenant suspended · 404 Resource not found (also returned for other tenants’ ids) · 409 Conflict (idempotency_in_progress, duplicate_transaction, already_reversed) · 422 Business rule violation (insufficient_balance, idempotency_key_reused, …) · 429 Rate limited — see Retry-After
POST/customers
Create a customer
Returns 409 customer_exists with details.existing_id if the email, phone or external_id is taken.
Scopes: customers:write
Parameters
Idempotency-Key headerUnique key per logical operation (retries must reuse it). Stored for 24 hours.
Request body
external_id stringemail string (email)phone stringfirst_name stringlast_name stringbirth_month integerbirth_day integerlocale stringmarketing_email booleanmarketing_sms booleantags string[]metadata object
Responses: 201 Success · 400 Invalid request (validation_failed, invalid_json, missing_idempotency_key) · 401 Missing, invalid or expired credentials · 403 Insufficient scope, IP not allowed or tenant suspended · 404 Resource not found (also returned for other tenants’ ids) · 409 Conflict (idempotency_in_progress, duplicate_transaction, already_reversed) · 422 Business rule violation (insufficient_balance, idempotency_key_reused, …) · 429 Rate limited — see Retry-After
POST/customers/upsert
Create or update a customer (match on external_id → email → phone)
Scopes: customers:write
Parameters
Idempotency-Key headerUnique key per logical operation (retries must reuse it). Stored for 24 hours.
Request body
external_id stringemail string (email)phone stringfirst_name stringlast_name stringbirth_month integerbirth_day integerlocale stringmarketing_email booleanmarketing_sms booleantags string[]metadata object
Responses: 200 Success · 400 Invalid request (validation_failed, invalid_json, missing_idempotency_key) · 401 Missing, invalid or expired credentials · 403 Insufficient scope, IP not allowed or tenant suspended · 404 Resource not found (also returned for other tenants’ ids) · 409 Conflict (idempotency_in_progress, duplicate_transaction, already_reversed) · 422 Business rule violation (insufficient_balance, idempotency_key_reused, …) · 429 Rate limited — see Retry-After
GET/customers/lookup
Find a customer by scanned barcode, member number, phone, email or external id
Scopes: customers:read
Parameters
barcode querymember_number queryphone queryemail queryexternal_id query
Responses: 200 Success · 400 Invalid request (validation_failed, invalid_json, missing_idempotency_key) · 401 Missing, invalid or expired credentials · 403 Insufficient scope, IP not allowed or tenant suspended · 404 Resource not found (also returned for other tenants’ ids) · 409 Conflict (idempotency_in_progress, duplicate_transaction, already_reversed) · 422 Business rule violation (insufficient_balance, idempotency_key_reused, …) · 429 Rate limited — see Retry-After
GET/customers/{id}
Retrieve a customer with loyalty accounts
Scopes: customers:read
Responses: 200 Success · 400 Invalid request (validation_failed, invalid_json, missing_idempotency_key) · 401 Missing, invalid or expired credentials · 403 Insufficient scope, IP not allowed or tenant suspended · 404 Resource not found (also returned for other tenants’ ids) · 409 Conflict (idempotency_in_progress, duplicate_transaction, already_reversed) · 422 Business rule violation (insufficient_balance, idempotency_key_reused, …) · 429 Rate limited — see Retry-After
PATCH/customers/{id}
Update a customer
Scopes: customers:write
Parameters
id pathrequiredIdempotency-Key headerUnique key per logical operation (retries must reuse it). Stored for 24 hours.
Request body
external_id stringemail objectphone objectfirst_name stringlast_name stringbirth_month integerbirth_day integerlocale stringmarketing_email booleanmarketing_sms booleantags string[]metadata object
Responses: 200 Success · 400 Invalid request (validation_failed, invalid_json, missing_idempotency_key) · 401 Missing, invalid or expired credentials · 403 Insufficient scope, IP not allowed or tenant suspended · 404 Resource not found (also returned for other tenants’ ids) · 409 Conflict (idempotency_in_progress, duplicate_transaction, already_reversed) · 422 Business rule violation (insufficient_balance, idempotency_key_reused, …) · 429 Rate limited — see Retry-After
DELETE/customers/{id}
Erase a customer (GDPR/CCPA anonymization)
Irreversibly removes personal data, voids wallet passes and closes accounts. Ledger history is kept with the pseudonymous member number.
Scopes: customers:write
Parameters
id pathrequiredIdempotency-Key headerUnique key per logical operation (retries must reuse it). Stored for 24 hours.
Responses: 200 Success · 400 Invalid request (validation_failed, invalid_json, missing_idempotency_key) · 401 Missing, invalid or expired credentials · 403 Insufficient scope, IP not allowed or tenant suspended · 404 Resource not found (also returned for other tenants’ ids) · 409 Conflict (idempotency_in_progress, duplicate_transaction, already_reversed) · 422 Business rule violation (insufficient_balance, idempotency_key_reused, …) · 429 Rate limited — see Retry-After
GET/customers/{id}/consents
Consent evidence log (append-only)
Scopes: customers:read
Responses: 200 Success · 400 Invalid request (validation_failed, invalid_json, missing_idempotency_key) · 401 Missing, invalid or expired credentials · 403 Insufficient scope, IP not allowed or tenant suspended · 404 Resource not found (also returned for other tenants’ ids) · 409 Conflict (idempotency_in_progress, duplicate_transaction, already_reversed) · 422 Business rule violation (insufficient_balance, idempotency_key_reused, …) · 429 Rate limited — see Retry-After
POST/customers/{id}/consents
Record a consent decision
Scopes: customers:write
Parameters
id pathrequiredIdempotency-Key headerUnique key per logical operation (retries must reuse it). Stored for 24 hours.
Request body
purpose "marketing_email" | "marketing_sms" | "wallet_notifications" | "terms" | "privacy"requiredgranted booleanrequiredtext_version string
Responses: 201 Success · 400 Invalid request (validation_failed, invalid_json, missing_idempotency_key) · 401 Missing, invalid or expired credentials · 403 Insufficient scope, IP not allowed or tenant suspended · 404 Resource not found (also returned for other tenants’ ids) · 409 Conflict (idempotency_in_progress, duplicate_transaction, already_reversed) · 422 Business rule violation (insufficient_balance, idempotency_key_reused, …) · 429 Rate limited — see Retry-After
POST/enrollments
Enroll a customer in a program and issue a wallet pass
Creates the customer if `customer` is given, opens the loyalty account (welcome/referral bonuses apply) and returns Apple/Google install links.
Scopes: customers:write
Parameters
Idempotency-Key headerUnique key per logical operation (retries must reuse it). Stored for 24 hours.
Request body
program_id stringcustomer_id stringcustomer objectexternal_id stringemail string (email)phone stringfirst_name stringlast_name stringbirth_month integerbirth_day integerlocale stringmarketing_email booleanmarketing_sms booleantags string[]metadata object
referral_code string
Responses: 201 Success · 400 Invalid request (validation_failed, invalid_json, missing_idempotency_key) · 401 Missing, invalid or expired credentials · 403 Insufficient scope, IP not allowed or tenant suspended · 404 Resource not found (also returned for other tenants’ ids) · 409 Conflict (idempotency_in_progress, duplicate_transaction, already_reversed) · 422 Business rule violation (insufficient_balance, idempotency_key_reused, …) · 429 Rate limited — see Retry-After