Get Rewards Balance

Get the current rewards balance for a user

Get Rewards Balance

This endpoint allows you to retrieve the current rewards balance for a user.

Authentication

To access this endpoint, you must include an Authorization header with your API key:

Authorization: YOUR_API_KEY

Endpoint

GET /api/v1/getRewardsBalance

Query Parameters

  • customerId (string, required) - The unique identifier for the user
  • rewardId (string, required) - The ID of the reward type to check balance for

Response

Success Response (200 OK)

{
  "customerId": "string",
  "rewardId": "string",
  "balance": number
}

Error Responses

  • 400 Bad Request

    {
      "error": "Missing required parameters",
      "details": {
        // Validation error details
      }
    }
    
    • When required query parameters are missing
    • When query parameters are invalid
  • 403 Forbidden

    {
      "error": "No API Key in request"
    }
    
    • When no API key is provided
    • When the API key is invalid
    • When the endpoint is not allowed with your current subscription plan
  • 429 Too Many Requests

    {
      "error": "You have reached the balance check limit"
    }
    
    • When you've reached your plan's user limit
    • When you've reached your plan's transaction limit
  • 500 Internal Server Error

    {
      "error": "An unexpected error occurred",
      "details": "Error message"
    }
    

Rate Limits

Rate limits vary by subscription plan:

  • Grow Plan: 100 API calls per minute
  • Pro Plan: 500 API calls per minute
  • Enterprise Plan: Unlimited API calls

Notes

  • The endpoint will return a balance of 0 for new users
  • The balance is specific to the reward type specified by rewardId
  • This endpoint is read-only and does not modify any data