Customer API

Pass Balances

Get the signed-in customer's Access Pass and Guest Pass balances, per pass type.

Use this endpoint with a customer bearer token under https://edge.tiquo.app/api/client/v1. The token determines the organisation and customer.

It returns how many uses of each Access Pass and Guest Pass type the customer can spend now. These are counts, not invitations: use GET /guest-passes to list individual Guest Pass invitations. The DOM Package and Hosted Package call this endpoint from getPassBalances(); see Pass Balances for browser examples.

Get pass balances

GET /pass-balances
curl "https://edge.tiquo.app/api/client/v1/pass-balances" \
  -H "Authorization: Bearer eyJhbGciOiJSUzI1NiJ9..."
{
  "success": true,
  "data": {
    "accessPassBalance": {
      "total": 3,
      "passTypes": [
        {
          "passTypeId": "k57...",
          "name": "Day Access",
          "balance": 3,
          "nextExpiresAt": 1793404800000,
          "sublocationNames": ["Members Club / Gym"]
        }
      ]
    },
    "guestPassBalance": {
      "total": 2,
      "heldByInvitations": 1,
      "invitationsUseGuestPasses": true,
      "passTypes": [
        {
          "passTypeId": "k58...",
          "name": "Member Guest Pass",
          "balance": 2,
          "heldByInvitations": 1,
          "nextExpiresAt": 1792540800000
        }
      ]
    }
  }
}

An authenticated account without a linked customer profile receives 200 OK with zero totals and empty passTypes.

FieldTypeDescription
accessPassBalance.totalintegerAccess Pass uses left across all Access Pass types
guestPassBalance.totalintegerGuest Passes the customer can still give to guests. Excludes heldByInvitations
guestPassBalance.heldByInvitationsintegerGuest Passes reserved by sent invitations that haven't been used at reception yet. They return to total if the invitation expires or is revoked
guestPassBalance.invitationsUseGuestPassesbooleantrue when sending an invitation uses a Guest Pass
passTypes[].passTypeIdstringPass type ID
passTypes[].namestringPass type name
passTypes[].balanceintegerUses left of this pass type
passTypes[].nextExpiresAtnumberEarliest expiry among these uses, in milliseconds. Omitted when none of them expire
accessPassBalance.passTypes[].sublocationNamesstring[]Where the pass admits the customer, as Location / Sublocation
guestPassBalance.passTypes[].heldByInvitationsintegerUses of this type reserved by sent invitations

Balances leave out expired, used-up, revoked and archived passes, passes that haven't started yet, and passes from a membership that's no longer active. Membership passes that are due but not yet issued are counted, because registration issues them on first use. Package Passes are not included. See How a Guest Pass moves for how invitations reserve and return Guest Passes.

Errors

StatusMeaning
401Missing, invalid or expired customer token
500Pass balances could not be loaded

En esta página