Skip to content

API reference

Base URL https://wallet.capitalquality.net/api/v1 · generated from the same route definitions the server validates against · openapi.json

Authentication

POST/oauth/token

Exchange OAuth 2.0 client credentials for an access token

Send client_id and client_secret via HTTP Basic auth (preferred) or form/JSON body. Tokens are valid for 1 hour.

No authentication

Parameters

  • Idempotency-Key headerUnique key per logical operation (retries must reuse it). Stored for 24 hours.

Request body

  • grant_type stringrequired
  • client_id string
  • client_secret string
  • scope string

Responses: 200 Success · 400 Invalid request (validation_failed, invalid_json, missing_idempotency_key) · 404 Resource not found (also returned for other tenants’ ids)

GET/me

Describe the calling credential (tenant, environment, scopes)

Scopes: any valid credential

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

Customers

GET/customers

List and filter customers

Scopes: customers:read

Parameters

  • limit query
  • starting_after query
  • q query
  • email query
  • phone query
  • external_id query
  • tag query
  • status 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 string
  • email string (email)
  • phone string
  • first_name string
  • last_name string
  • birth_month integer
  • birth_day integer
  • locale string
  • marketing_email boolean
  • marketing_sms boolean
  • tags 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 string
  • email string (email)
  • phone string
  • first_name string
  • last_name string
  • birth_month integer
  • birth_day integer
  • locale string
  • marketing_email boolean
  • marketing_sms boolean
  • tags 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 query
  • member_number query
  • phone query
  • email query
  • external_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

Parameters

  • id pathrequired

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 pathrequired
  • Idempotency-Key headerUnique key per logical operation (retries must reuse it). Stored for 24 hours.

Request body

  • external_id string
  • email object
  • phone object
  • first_name string
  • last_name string
  • birth_month integer
  • birth_day integer
  • locale string
  • marketing_email boolean
  • marketing_sms boolean
  • tags 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 pathrequired
  • Idempotency-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

Parameters

  • id pathrequired

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 pathrequired
  • Idempotency-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"required
  • granted booleanrequired
  • text_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 string
  • customer_id string
  • customer object
    • external_id string
    • email string (email)
    • phone string
    • first_name string
    • last_name string
    • birth_month integer
    • birth_day integer
    • locale string
    • marketing_email boolean
    • marketing_sms boolean
    • tags 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

Loyalty

GET/programs

List loyalty programs and their rules

Scopes: programs: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

GET/programs/{id}

Retrieve a program

Scopes: programs:read

Parameters

  • id pathrequired

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/programs/{id}/quote

Preview points for a basket without writing anything

Scopes: programs:read

Parameters

  • id pathrequired

Request body

  • amount integerrequired
  • currency stringrequired
  • location_id string
  • items object[]
    • sku string
    • category string
    • quantity integer
    • unit_amount integerrequired
  • occurred_at string (date-time)
  • note string
  • account_id string

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/loyalty-accounts/{id}

Balance, stamps and tier of a loyalty account

Scopes: loyalty:read

Parameters

  • id pathrequired

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/loyalty-accounts/{id}/transactions

Ledger history of an account (newest first)

Scopes: loyalty:read

Parameters

  • id pathrequired
  • limit query
  • starting_after query
  • type 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/loyalty-accounts/{id}/earn

Award points/stamps for a purchase

Runs the program rules (rates, tiers, campaigns, caps). external_transaction_id is de-duplicated per credential; retries must reuse the Idempotency-Key.

Scopes: loyalty:write

Parameters

  • id pathrequired
  • Idempotency-Key headerrequiredUnique key per logical operation (retries must reuse it). Stored for 24 hours.

Request body

  • amount integerrequired
  • currency stringrequired
  • location_id string
  • external_transaction_id string
  • items object[]
    • sku string
    • category string
    • quantity integer
    • unit_amount integerrequired
  • occurred_at string (date-time)
  • note 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/loyalty-accounts/{id}/redeem

Redeem points or a catalog reward

Scopes: loyalty:write

Parameters

  • id pathrequired
  • Idempotency-Key headerrequiredUnique key per logical operation (retries must reuse it). Stored for 24 hours.

Request body

  • points integer
  • reward_id string
  • location_id string
  • external_transaction_id string
  • note 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/loyalty-accounts/{id}/adjust

Manual adjustment (202 when approval is required)

Scopes: loyalty:write

Parameters

  • id pathrequired
  • Idempotency-Key headerrequiredUnique key per logical operation (retries must reuse it). Stored for 24 hours.

Request body

  • points integer
  • stamps integer
  • reason stringrequired
  • location_id 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

GET/transactions/{id}

Retrieve a ledger transaction

Scopes: loyalty:read

Parameters

  • id pathrequired

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/transactions/{id}/reverse

Reverse an earn, redemption or adjustment (once)

Scopes: loyalty:write

Parameters

  • id pathrequired
  • Idempotency-Key headerrequiredUnique key per logical operation (retries must reuse it). Stored for 24 hours.

Request body

  • reason stringrequired

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

POS

POST/pos/sales

One-call POS integration: find/create customer, award points, update pass, return balance

Scopes: loyalty:write, customers:read

Parameters

  • Idempotency-Key headerrequiredUnique key per logical operation (retries must reuse it). Stored for 24 hours.

Request body

  • program_id string
  • customer objectrequired
    • id string
    • lookup object
      • barcode string
      • member_number string
      • phone string
      • email string
      • external_id string
    • create_if_missing boolean
    • profile object
      • external_id string
      • email string (email)
      • phone string
      • first_name string
      • last_name string
      • birth_month integer
      • birth_day integer
      • locale string
      • marketing_email boolean
      • marketing_sms boolean
      • tags string[]
      • metadata object
  • sale objectrequired
    • amount integerrequired
    • currency stringrequired
    • location_id string
    • items object[]
      • sku string
      • category string
      • quantity integer
      • unit_amount integerrequired
    • occurred_at string (date-time)
    • note string
    • external_id stringrequired

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

Rewards

GET/loyalty-accounts/{id}/rewards

Vouchers issued to an account

Scopes: rewards:read

Parameters

  • id pathrequired

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/rewards

Reward catalog

Scopes: rewards:read

Parameters

  • program_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

POST/rewards

Add a reward to the catalog

Scopes: rewards:write

Parameters

  • Idempotency-Key headerUnique key per logical operation (retries must reuse it). Stored for 24 hours.

Request body

  • program_id stringrequired
  • name stringrequired
  • description string
  • kind "free_item" | "amount_off" | "percent_off" | "custom"
  • cost_points integer
  • cost_stamps integer
  • value integer
  • percent_off integer
  • valid_days integer
  • max_per_customer integer
  • auto_issue boolean

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

PATCH/rewards/{id}

Update or archive a reward

Scopes: rewards:write

Parameters

  • id pathrequired
  • Idempotency-Key headerUnique key per logical operation (retries must reuse it). Stored for 24 hours.

Request body

  • name string
  • description string
  • cost_points integer
  • cost_stamps integer
  • value integer
  • valid_days integer
  • max_per_customer integer
  • status "active" | "archived"

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/issued-rewards/{id}/redeem

Redeem an issued voucher at the counter

Scopes: rewards:write

Parameters

  • id pathrequired
  • Idempotency-Key headerrequiredUnique key per logical operation (retries must reuse it). Stored for 24 hours.

Request body

  • location_id string

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

Promotions

GET/promotions

List campaigns and promotions

Scopes: promotions:read

Parameters

  • status 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/promotions

Create a coupon, offer, bonus-points or event promotion

Scopes: promotions:write

Parameters

  • Idempotency-Key headerUnique key per logical operation (retries must reuse it). Stored for 24 hours.

Request body

  • name stringrequired
  • description string
  • kind "coupon" | "offer" | "bonus_points" | "event"required
  • program_id string
  • starts_at string (date-time)
  • ends_at string (date-time)
  • targeting object
    • tags string[]
    • tiers string[]
    • segment_id string
    • require_consent boolean
  • location_ids string[]
  • offer object
    • percent_off integer
    • amount_off integer
    • free_item string
    • points_multiplier number
    • bonus_points integer
    • min_purchase integer
    • categories string[]
  • code_type "none" | "shared" | "unique"
  • shared_code string
  • max_redemptions integer
  • max_per_customer integer
  • pass_template_id string
  • update_passes boolean

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

GET/promotions/{id}

Retrieve a promotion with performance counters

Scopes: promotions:read

Parameters

  • id pathrequired

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/promotions/{id}

Schedule, activate, pause or end a promotion

Scopes: promotions:write

Parameters

  • id pathrequired
  • Idempotency-Key headerUnique key per logical operation (retries must reuse it). Stored for 24 hours.

Request body

  • action "schedule" | "activate" | "pause" | "end"required

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/promotions/{id}/codes

Generate unique single-use coupon codes

Scopes: promotions:write

Parameters

  • id pathrequired
  • Idempotency-Key headerUnique key per logical operation (retries must reuse it). Stored for 24 hours.

Request body

  • count integer
  • prefix string
  • customer_ids 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/coupons/validate

Check a coupon at checkout (no side effects)

Scopes: promotions:read

Request body

  • code stringrequired
  • customer_id string
  • location_id string
  • amount integer
  • external_id string

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/coupons/redeem

Redeem a coupon (atomic, limit-checked)

Scopes: promotions:write

Parameters

  • Idempotency-Key headerrequiredUnique key per logical operation (retries must reuse it). Stored for 24 hours.

Request body

  • code stringrequired
  • customer_id string
  • location_id string
  • amount integer
  • external_id 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/promotions/{id}/issue

Issue a coupon/offer pass for a customer

Scopes: promotions:write, passes:write

Parameters

  • id pathrequired
  • Idempotency-Key headerUnique key per logical operation (retries must reuse it). Stored for 24 hours.

Request body

  • customer_id stringrequired

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

Passes

GET/passes/{id}

Wallet pass status (Apple install signal, Google save state, links)

Scopes: passes:read

Parameters

  • id pathrequired

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/passes/{id}/refresh

Re-render the pass and push it to devices (APNs) and Google

Scopes: passes:write

Parameters

  • id pathrequired
  • Idempotency-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

POST/passes/{id}/messages

Send a wallet message (Apple change message; Google addMessage, max 3 notifications/24 h)

Scopes: passes:write

Parameters

  • id pathrequired
  • Idempotency-Key headerrequiredUnique key per logical operation (retries must reuse it). Stored for 24 hours.

Request body

  • header stringrequired
  • body stringrequired

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/passes/{id}/void

Void a pass (Apple shows it as voided; Google object becomes inactive)

Scopes: passes:write

Parameters

  • id pathrequired
  • Idempotency-Key headerUnique key per logical operation (retries must reuse it). Stored for 24 hours.

Request body

  • reason stringrequired

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/passes/{id}/reissue

Void a pass and issue a replacement with a new serial number

Scopes: passes:write

Parameters

  • id pathrequired
  • Idempotency-Key headerUnique key per logical operation (retries must reuse it). Stored for 24 hours.

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

Webhooks

GET/webhook-endpoints

List webhook endpoints

Scopes: webhooks:manage

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/webhook-endpoints

Register an endpoint (the signing secret is returned once)

Scopes: webhooks:manage

Parameters

  • Idempotency-Key headerUnique key per logical operation (retries must reuse it). Stored for 24 hours.

Request body

  • url string (uri)required
  • description string
  • events "*" | "customer.created" | "customer.updated" | "customer.deleted" | "pass.issued" | "pass.installed" | "pass.updated" | "pass.uninstalled" | "loyalty.points_earned" | "loyalty.points_redeemed" | "loyalty.points_adjusted" | "loyalty.points_expired" | "loyalty.transaction_reversed" | "loyalty.tier_changed" | "reward.issued" | "reward.redeemed" | "promotion.redeemed" | "webhook.delivery_failed" | "webhook.test"[]

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

GET/webhook-endpoints/{id}

Retrieve an endpoint

Scopes: webhooks:manage

Parameters

  • id pathrequired

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/webhook-endpoints/{id}

Change URL, events or enable/disable

Scopes: webhooks:manage

Parameters

  • id pathrequired
  • Idempotency-Key headerUnique key per logical operation (retries must reuse it). Stored for 24 hours.

Request body

  • url string (uri)
  • description string
  • events "*" | "customer.created" | "customer.updated" | "customer.deleted" | "pass.issued" | "pass.installed" | "pass.updated" | "pass.uninstalled" | "loyalty.points_earned" | "loyalty.points_redeemed" | "loyalty.points_adjusted" | "loyalty.points_expired" | "loyalty.transaction_reversed" | "loyalty.tier_changed" | "reward.issued" | "reward.redeemed" | "promotion.redeemed" | "webhook.delivery_failed" | "webhook.test"[]
  • status "enabled" | "disabled"

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/webhook-endpoints/{id}

Delete an endpoint

Scopes: webhooks:manage

Parameters

  • id pathrequired
  • Idempotency-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

POST/webhook-endpoints/{id}/rotate-secret

Rotate the signing secret (old secret keeps signing for 24 h)

Scopes: webhooks:manage

Parameters

  • id pathrequired
  • Idempotency-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

POST/webhook-endpoints/{id}/test

Send a webhook.test event to this endpoint

Scopes: webhooks:manage

Parameters

  • id pathrequired
  • Idempotency-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/webhook-deliveries

Delivery log (filter status=dead for the dead-letter queue)

Scopes: webhooks:manage

Parameters

  • limit query
  • starting_after query
  • status query
  • endpoint_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

POST/webhook-deliveries/{id}/retry

Replay a failed or dead-lettered delivery

Scopes: webhooks:manage

Parameters

  • id pathrequired
  • Idempotency-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/events

Event log (30 days)

Scopes: webhooks:manage

Parameters

  • limit query
  • starting_after query
  • type 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/events/{id}

Retrieve an event with its provenance

Scopes: webhooks:manage

Parameters

  • id pathrequired

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

Account

GET/health

Liveness and dependency health (no authentication)

No authentication

Responses: 200 Success · 400 Invalid request (validation_failed, invalid_json, missing_idempotency_key) · 404 Resource not found (also returned for other tenants’ ids)

GET/openapi.json

This API’s OpenAPI 3.1 document

No authentication

Responses: 200 Success · 400 Invalid request (validation_failed, invalid_json, missing_idempotency_key) · 404 Resource not found (also returned for other tenants’ ids)

GET/tenant

The client account the credential belongs to

Scopes: any valid credential

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/usage

Current billing-period usage against plan limits

Scopes: usage: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

GET/locations

List branches

Scopes: programs: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/locations

Create a branch

Scopes: customers:write

Parameters

  • Idempotency-Key headerUnique key per logical operation (retries must reuse it). Stored for 24 hours.

Request body

  • code stringrequired
  • name stringrequired
  • address object
    • line1 string
    • line2 string
    • city string
    • region string
    • postal_code string
    • country string
  • latitude number
  • longitude number
  • phone 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

GET/locations/{id}

Retrieve a branch

Scopes: programs:read

Parameters

  • id pathrequired

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/locations/{id}

Update a branch

Scopes: customers:write

Parameters

  • id pathrequired
  • Idempotency-Key headerUnique key per logical operation (retries must reuse it). Stored for 24 hours.

Request body

  • code string
  • name string
  • address object
    • line1 string
    • line2 string
    • city string
    • region string
    • postal_code string
    • country string
  • latitude number
  • longitude number
  • phone string

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