1. Users
Bardge API
  • Introduction
  • Authentication
  • Errors
  • Idempotent Requests
  • Pagination
  • Users
    • Introduction
    • Update a user
      POST
    • Set a user's client ID
      POST
    • Get a user
      GET
  • Passes
    • Introduction
    • Get All Reseller Passes
      GET
    • Issue a pass
      POST
    • Update user's pass
      POST
    • Update user's pass expiry
      POST
    • Renew a prepaid pass
      POST
    • Get User Pass Details
      GET
  • Providers
    • Introduction
    • Get providers
      GET
    • Get providers for a pass
      GET
  • Access Codes
    • Introduction
    • Generate dynamic access code
      POST
  • Bookings
    • Introduction
    • Get class categories
      GET
    • Get classes
      GET
    • Get class with instances
      GET
    • Initiate a class booking
      POST
    • Confirm a class booking
      POST
    • Initiate a spa booking
      POST
    • Confirm a spa booking
      POST
    • Get client bookings
      GET
    • Get booking status
      GET
    • Cancel a booking
      POST
  • Credits
    • Introduction
    • Purchase credits
    • Get credit packages
    • Get a user's credits
  • Lookup
    • Introduction
    • Initiate a lookup
    • Verify a lookup
    • Get issuers
    • Get a user's credits
  • Webhooks
    • Introduction
    • List Webhook Endpoints
    • Register Webhook Endpoint
    • Delete Webhook Endpoint
  • Embed
    • Introduction
    • Create a hosted session
  • Schemas
    • RegisterWebhookV3Request
    • PasscodeV3Request
    • PurchaseSpaCoPayV3Request
    • RegisterWebhookEndpointRequest
    • WebviewSessionExchangeRequest
    • ErrorDetail
    • ResellerV3PasscodeResponse
    • ResellerV3ErrorResponse
    • ResellerV3WebhookEndpointResponse
    • ResellerV3WebhookResponse
    • LookupInitiateV3Request
    • ResellerV3SpaCoPayPurchaseResponse
    • LookupV3Response
    • SpaCoPayQuoteV3Request
    • PassRef
    • LookupVerifyV3Request
    • ResellerV3SpaCoPayQuoteResponse
    • CategoryDetails
    • IssuePassV3Request
    • RenewPrepaidPassV3Request
    • UpdateLookupEnabledRequest
    • ResellerV3IssuedPassResponse
    • UpdateIssuedPassExpiryV3Request
    • PurchaseCoPayPackageV3Request
    • PurchaseGymCoPayV3Request
    • ResellerV3IssuedPassMessageResponse
    • ResellerV3PassRenewalResponse
    • ResellerV3GymCoPayPurchaseResponse
    • ResellerV3CoPayPurchaseResponse
    • UpdateIssuedPassV3Request
    • RescheduleBookingV3Request
    • PurchaseCreditsV3Request
    • PasscodeInfo
    • WebviewSessionMintRequest
    • RefundInfo
    • BookSpaV3Request
    • ResellerV3CreditPurchaseResponse
    • UpdateClientDetailsV3Request
    • ResellerV3SpaBookingInitiateResponse
    • ResellerV3ProviderResponse
    • ResellerV3ClientResponse
    • BookClassV3Request
    • ResellerV3ServiceResponse
    • SetClientIdV3Request
    • CopayOption
    • ResellerV3SpaResponse
    • ServicePreview
    • ResellerV3ClassBookingInitiateResponse
    • ResellerV3AvailabilityResponse
    • ConfirmClassBookingV3Request
    • ResellerV3AccessCodeSessionResponse
    • ResellerV3BookingResponse
    • ConfirmAccessCodeV3Request
    • CategoryDetail
    • AccessCodeV3Request
    • ResellerV3PassResponse
    • ResellerV3ListResponse
    • ResellerV3CreditsResponse
    • ResellerV3AccessCodeResponse
    • ResellerV3BookingStatusResponse
    • ResellerV3ClassInstanceResponse
    • ResellerV3ClassResponse
  1. Users

Introduction

A user is an individual enrollee registered under your reseller account — the person who holds a pass, books sessions, and checks in at providers. The Users section lets you retrieve a user record, read their credit balance, keep their contact details in step with your own records, and attach a client ID to a user that does not have one yet.

What you can do#

Retrieve a user by client ID, email address or phone number
Retrieve a user's credit balance and recent transactions
Update a user's contact details
Attach a client ID to a user that does not have one

Key concepts#

Ways to address a user
Every user is reachable by four identifiers, and all four are accepted wherever an endpoint takes a client ID — except Get a user and Set a user's client ID, which do not accept a user_id:
IdentifierOriginNotes
idAssigned by youThe enrollee's member ID in your system. Unique within your account. Not always present
user_idAssigned by BardgeStable and always present, e.g. usr_10482. Not accepted by Get a user or Set a user's client ID
Email addressThe user's ownConvenient when you hold no Bardge identifier. Must match exactly one active user in your account
Phone numberThe user's ownMatched on its last 10 digits, so local and international forms are interchangeable. Must match exactly one user
A client ID is the identifier for the individual in your system — it is not your company or reseller ID. Users who signed up directly by email, or who are being migrated from a previous system, may have no client ID at all; their email address or phone number is how you reach them until one is attached.
Looking a user up by email or phone
An email address or phone number goes in the same path position as a client ID, and must be URL-encoded there — @ becomes %40 and + becomes %2B:
GET /v3/api/business/reseller/clients/client_abc123
GET /v3/api/business/reseller/clients/ada%40example.com
GET /v3/api/business/reseller/clients/%2B2348012345678
Phone numbers are compared on their last 10 digits, so 08012345678, +2348012345678 and 234 801 234 5678 all reach the same user and you do not need to know which form Bardge holds.
A client ID is always tried first. If the value you send happens to be both a valid client ID and a valid phone number, the client ID wins.
An email address or phone number must resolve to exactly one active user in your account:
MatchesResult
One200 — the user is returned
None404 — no such user in your account
Several409 ambiguous_email or 409 ambiguous_phone — use the client ID, or user_id where accepted
A malformed email address is rejected with 422 invalid_email, and a phone number with fewer than 10 digits with 422 invalid_phone.
Partial updates
Updating a user is a partial operation: only the fields you send are changed, and anything you omit is left exactly as it was. Sending a field with a blank value is rejected rather than clearing the stored value.
Email addresses must be unique within your account, and phone numbers are unique across Bardge — a collision is rejected with 409 conflict, and a malformed value with 422 invalid_email or 422 invalid_phone. Supply calling_code alongside a phone number so its length can be validated; it defaults to +234 when omitted. The label field replaces the user's existing labels rather than adding to them.
A request that sets every field to the value already stored is accepted and returns the unchanged user with the message No changes applied.
The client ID is the anchor for the record and cannot be changed by an update. To give a user their first client ID, use the set-client-ID endpoint instead.
Setting a client ID is permanent
Identify the user with email or phone, sending only one of the two — if you send both, email is used. An email address or phone number must resolve to exactly one active user in your account; if it matches none the request is a 404, and if it matches several it is rejected with 409 ambiguous_email or 409 ambiguous_phone rather than guessed at. Phone numbers are matched on their last 10 digits, exactly as they are when you retrieve a user.
Client IDs are set once and cannot be changed:
SituationResult
User has no client ID200 — the client ID is attached
User already has this exact client ID200 — no change made, safe to retry
User already has a different client ID409 client_id_already_set
Client ID is already held by another user409 client_id_taken
Attaching a client ID never affects the user's existing bookings, passes or credits, and does not invalidate access codes that have already been issued.
Idempotency
Both write endpoints accept an Idempotency-Key header. A replayed request returns the original response with X-Idempotent-Replayed: true; reusing a key with a different request body is rejected with 409 conflict.

Related sections#

Passes — issue a pass to a user once their record exists
Credits — purchase credits that top up the balance returned here
Bookings — list the bookings a user has made
Access Codes — generate a check-in code for a user's visit
Modified at 2026-10-26 10:24:05
Previous
Pagination
Next
Update a user
Built with