👤 User
Get User Points | Lynes Loyalty API

Get User Points

This endpoint allows you to retrieve a user's current loyalty point balance from the Lynes Loyalty platform.

Endpoint

GET /user/{userId}/points

Authentication

⚠️

Authentication Required

This endpoint requires a valid JWT token with appropriate permissions.

See our JWT Authentication guide for more details.

Path Parameters

ParameterTypeRequiredDescription
userIdstringYesThe unique identifier of the user

Example Request

curl -X GET "https://api.lynesloyalty.com/v1/user/user_123/points" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json"

Response

Success Response (200 OK)

{
  "points": 123
}

Error Responses

401 Unauthorized

{
  "error": {
    "code": "unauthorized",
    "message": "Invalid or expired authentication token"
  }
}

403 Forbidden

{
  "error": {
    "code": "forbidden",
    "message": "Insufficient permissions to access user data"
  }
}

404 Not Found

{
  "error": {
    "code": "not_found",
    "message": "User with ID 'user_123' not found"
  }
}

Use Cases

  • Display a user's current point balance in your application
  • Check if a user has enough points before offering rewards
  • Track point accumulation over time when combined with historical data

Related Endpoints