Consume points from user account
Consumes points from a user's account for paid operations. Returns transaction details including the new balance. # Authentication Requires valid API Key via X-API-Key header # Realm Isolation The API key must belong to the same realm as the requested realm. Cross-realm requests will return 403 Forbidden. # Example ```bash curl -X POST \ https://api.example.com/api/ext/points/realm123/consume \ -H "X-API-Key: your-api-key" \ -H "Content-Type: application/json" \ -d '{ "userId": "user-123", "clientAppId": "app-abc", "amount": 100, "description": "AI API call" }' ```
Consumes points from a user's account for paid operations. Returns transaction details including the new balance.
Authentication
Requires valid API Key via X-API-Key header
Realm Isolation
The API key must belong to the same realm as the requested realm. Cross-realm requests will return 403 Forbidden.
Example
curl -X POST \ https://api.example.com/api/ext/points/realm123/consume \ -H "X-API-Key: your-api-key" \ -H "Content-Type: application/json" \ -d '{ "userId": "user-123", "clientAppId": "app-abc", "amount": 100, "description": "AI API call" }'Authorization
api_key Client-app API key (third-party external API).
In: header
Path Parameters
Realm ID
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
int64Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/ext/points/string/consume" \ -H "Content-Type: application/json" \ -d '{ "amount": 0, "clientAppId": "string", "userId": "string" }'{ "allocations": [ { "allocatedAmount": 0, "bucketId": "string", "creditType": "string", "ledgerId": "string", "walletId": "string" } ], "amount": 0, "correlationId": "string", "transactions": [ { "amount": 0, "balanceAfter": 0, "bucketId": "string", "transactionId": "string", "userId": "string", "walletId": "string" } ], "userId": "string"}{ "code": "string", "details": null, "message": "string", "requestId": "string", "status": 0}{ "code": "string", "details": null, "message": "string", "requestId": "string", "status": 0}{ "code": "string", "details": null, "message": "string", "requestId": "string", "status": 0}{ "code": "string", "details": null, "message": "string", "requestId": "string", "status": 0}{ "code": "string", "details": null, "message": "string", "requestId": "string", "status": 0}{ "code": "string", "details": null, "message": "string", "requestId": "string", "status": 0}