API Documentation
RESTful API for real-time fraud detection and risk scoring.
Quick Start
Get started with the Vacalion Fraud Detection API in minutes. Our API uses RESTful endpoints and returns JSON responses.
Base URL
https://api.vacalion.com/v1Authentication
All requests require Bearer token authentication:
Authorization: Bearer YOUR_API_KEYAPI Keys
All API requests must be authenticated using Bearer token authentication. You can create and manage your API keys from the Dashboard.
Key Management Best Practices
- • Store keys in environment variables, not in your codebase
- • Rotate keys periodically for enhanced security
- • Use different keys for development and production environments
- • Revoke compromised keys immediately from the Dashboard
Code Examples
curl -X POST https://api.vacalion.com/v1/fraud/predict \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"id": 1,
"amount": 499.99,
"merchant": "Amazon",
"category": "electronics",
"user_id": "user123",
"timestamp": "2025-12-20T14:30:00"
}'API Endpoints
POST
/fraud/predictAnalyze a transaction and receive a real-time fraud risk score.
GET
/healthCheck API health status and uptime.
GET
/metricsRetrieve API usage metrics and statistics.
Response Format
All API responses are returned in JSON format with the following structure:
{
"fraud_score": 0.85,
"is_fraud": true,
"confidence": 0.92,
"model_name": "ensemble_v2",
"triggered_rules": ["high_amount", "new_device"],
"risk_factors": {
"amount_risk": 0.8,
"velocity_risk": 0.6,
"device_risk": 0.9
}
}Error Handling
The API uses conventional HTTP response codes to indicate success or failure.
| Status Code | Description |
|---|---|
| 200 | Success - Request completed successfully |
| 400 | Bad Request - Invalid parameters provided |
| 401 | Unauthorized - Invalid or missing API key |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Server Error - Something went wrong on our end |