Gulosa API Reference
Overview
The Gulosa API provides endpoints for managing loyalty points and referral programs in the TKM AI Agency Platform.
Base URL
/loyalty
Endpoints
Get User Points
GET /points/{internal_user_id}
Get points balance for a user using their internal ID.
Query Parameters
Parameter | Type | Required | Description |
---|---|---|---|
organization_id | string | Yes | Organization identifier |
Response
{
"points": "number",
"user_id": "string",
"organization_id": "string",
"last_updated": "string"
}
Generate Referral QR
POST /generate-referral-qr
Generate a QR code for referring new users.
Request Body
{
"auth0_id": "string",
"organization_id": "string"
}
Response
{
"success": true,
"qr_code": "string (base64)",
"referral_url": "string"
}
Process Referral
POST /process-referral
Process a new referral and award points.
Request Body
{
"referred_internal_id": "string",
"referrer_internal_id": "string",
"organization_id": "string"
}
Response
{
"success": true,
"points_awarded": "number",
"referral_id": "string"
}
Award Points
POST /award-points/{auth0_id}
Award points for a specific action.
Request Body
{
"action_type": "string",
"organization_id": "string"
}
Response
{
"success": true,
"points_awarded": "number"
}
Error Responses
404 Not Found
{
"detail": "User points not found"
}
500 Internal Server Error
{
"detail": "Error message"
}
Integration Notes
Points Management
- Point balance tracking
- Points expiration handling
- Transaction history
- Reward redemption
Referral System
- QR code generation
- Referral tracking
- Reward distribution
- Link management
Resource Management
- Resource allocation
- Usage tracking
- Limit enforcement
- Quota management
Integration with Other Agents
- Niger: Data persistence
- Barbatus: Authentication
- Alfari: Configuration management
- Lyra: Notification handling