Bardge API (V3)
    • Introduction
    • Authentication
    • Errors
    • Idempotent Requests
    • Pagination
    • Passes
      • Introduction
      • Get All Reseller Passes
        GET
      • Issue a pass
        POST
      • Update user's pass
        POST
      • Update user's pass expiry
        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
    • Co-pay
      • Introduction
    • Credits
      • Introduction
      • Purchase credits
      • Get credit packages
    • Lookup
      • Introduction
      • Get issuers
      • Initiate a lookup
      • Verify a lookup
      • Get a client
      • Get client credits
    • Schemas
      • PasscodeV3Request
      • PurchaseSpaCoPayV3Request
      • LookupInitiateV3Request
      • ResellerV3PasscodeResponse
      • ErrorDetail
      • ResellerV3ErrorResponse
      • LookupV3Response
      • ResellerV3SpaCoPayPurchaseResponse
      • LookupVerifyV3Request
      • SpaCoPayQuoteV3Request
      • IssuePassV3Request
      • PassRef
      • ResellerV3SpaCoPayQuoteResponse
      • CategoryDetails
      • ResellerV3IssuedPassResponse
      • UpdateIssuedPassExpiryV3Request
      • ResellerV3IssuedPassMessageResponse
      • UpdateLookupEnabledRequest
      • UpdateIssuedPassV3Request
      • PurchaseGymCoPayV3Request
      • PurchaseCoPayPackageV3Request
      • PurchaseCreditsV3Request
      • ResellerV3GymCoPayPurchaseResponse
      • ResellerV3CreditPurchaseResponse
      • ResellerV3CoPayPurchaseResponse
      • RescheduleBookingV3Request
      • RefundInfo
      • PasscodeInfo
      • ResellerV3BookingResponse
      • BookSpaV3Request
      • ResellerV3SpaBookingInitiateResponse
      • BookClassV3Request
      • CopayOption
      • ResellerV3ProviderResponse
      • ResellerV3ClassBookingInitiateResponse
      • ResellerV3ServiceResponse
      • ConfirmClassBookingV3Request
      • ResellerV3SpaResponse
      • AccessCodeV3Request
      • ServicePreview
      • ResellerV3AccessCodeResponse
      • ResellerV3ListResponse
      • ResellerV3AccessCodeSessionResponse
      • ResellerV3AvailabilityResponse
      • ConfirmAccessCodeV3Request
      • ResellerV3ClientResponse
      • CategoryDetail
      • ResellerV3CreditsResponse
      • ResellerV3PassResponse
      • ResellerV3ClassInstanceResponse
      • ResellerV3ClassResponse
      • ResellerV3BookingStatusResponse

    Errors

    The Bardge API uses conventional HTTP status codes to indicate whether a request succeeded or failed. Every error — no exceptions — returns a structured JSON object with a fixed shape.

    Error object#

    {
      "error": {
        "type": "invalid_request_error",
        "code": "pass_not_found",
        "message": "No pass exists with id pass_01H8XYZ.",
        "request_id": "req_01H8XYZABCDE"
      }
    }
    FieldDescription
    typeBroad error category — one of the fixed types below
    codeMachine-readable error code — branch your logic on this
    messageHuman-readable description
    request_idUnique ID for this request — include in support tickets

    HTTP status codes#

    CodeMeaning
    200Success
    201Resource created
    400Invalid request — bad or missing input
    401Authentication error — missing or invalid API key
    403Permission error — valid key, not authorised for this resource
    404Resource not found
    409Conflict — state or idempotency conflict
    500Server error

    Error types#

    TypeWhen
    invalid_request_errorMalformed or missing input (400)
    authentication_errorMissing or invalid API key (401)
    permission_errorValid key, not authorised for this resource (403)
    api_errorServer-side bug (500)
    idempotency_errorIdempotency key reused with a different request body (409)
    resource_conflict_errorState conflict — slot unavailable, class full, already cancelled (409)

    Common error codes#

    CodeStatusDescription
    validation_error400A required field is missing or a field value is invalid
    invalid_api_key401The API key provided is invalid
    account_disabled403Your reseller account has been disabled
    resource_not_found404The requested resource does not exist
    idempotency_key_reused409An idempotency key was reused with a different request body
    slot_unavailable409The requested booking slot is no longer available
    class_full409The class has reached its maximum capacity
    already_cancelled409The booking has already been cancelled
    internal_server_error500An unexpected error occurred on our side

    Handling errors#

    Branch on error.code, not error.type. New codes are added over time — that is not a breaking change.
    Surface error.message to end users only for invalid_request_error. For all other types, show a generic message.
    Always log error.request_id — it is required for support escalation.
    Modified at 2026-05-19 11:14:16
    Previous
    Authentication
    Next
    Idempotent Requests
    Built with