Spendrix Developer Tools
Integrate Spendrix's powerful expense tracking features into your applications with our comprehensive API suite.
Getting Started
1. Get Your API Secret
- 1. Log in to your Spendrix account
- 2. Navigate to Settings → Developer Tools
- 3. Click on "Generate New API Secret"
- 4. Save your API secret securely - it will only be shown once!
2. Using Your API Secret
Include your API secret in all API requests using the following header:
X-API-Secret: your_api_secret_here ⚠️ Never share your API secret or expose it in client-side code. Store it securely and use environment variables when possible.
Available APIs
Expenses API
Get All Expenses
GET /api/developer/data
X-API-Secret: your_api_secret_here Response includes:
- List of all expenses
- Transaction details
- Category information
- Timestamps
Note: This endpoint is rate-limited to 5 calls per day.
Categories API
Get All Categories
GET /categories
X-API-Secret: your_api_secret_here Returns:
- Category ID
- Category name
- Description
- Creation date
User APIs
Get User Profile
GET /users/profile
X-API-Secret: your_api_secret_here Returns user information, account settings, and preferences
Update User Preferences
PUT /users/preferences
X-API-Secret: your_api_secret_here Manage:
- Currency settings
- Language preferences
- Display options
Response Formats
Successful Response
{"status": "success","data": { /* Response data here */ }} Error Response
{"status": "error","error": {"code": "ERROR_CODE","message": "Error description"}} Common Error Codes
| Code | Description |
|---|---|
| INVALID_API_SECRET | The API secret is invalid or expired |
| RATE_LIMIT_EXCEEDED | Daily API call limit reached |
| UNAUTHORIZED | Missing or invalid API secret |
| RESOURCE_NOT_FOUND | Requested data not found |
| VALIDATION_ERROR | Invalid request parameters |
Rate Limits and Usage
- • Developer Data API: 5 calls per day
- • Other APIs: 100 requests per minute
Rate limit headers included in responses:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1500000000 Best Practices
API Secret Management
- • Store your API secret securely
- • Never expose it in client-side code
- • Rotate your secret periodically
- • Use environment variables
Error Handling
- • Always check response status
- • Implement proper error handling
- • Handle rate limiting gracefully
- • Log errors for debugging
Performance
- • Cache responses when possible
- • Implement retry logic
- • Use batch operations when available