Getting Started with BillGauge API
Authentication
The BillGauge API uses API keys for authentication. Include your API key in the Authorization
header of every request:
Authorization: Bearer your_api_key_here
Note: You can generate and manage your API keys from your account dashboard.
Base URL
All API requests should be made to:
https://app.billgauge.com/api/v1
Making Your First Request
Here's a simple example to list your properties:
curl -X GET "https://app.billgauge.com/api/v1/properties" \ -H "Authorization: Bearer your_api_key_here" \ -H "Content-Type: application/json"
Python Example
import requests # Replace with your actual API key API_KEY = "your_api_key_here" BASE_URL = "https://app.billgauge.com/api/v1" headers = { "Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json" } # List all properties response = requests.get(f"{BASE_URL}/properties", headers=headers) properties = response.json() print(f"Found {len(properties)} properties") for property in properties: print(f"- {property['name']} ({property['id']})")
Response Format
All API responses are returned as JSON. Successful responses will have a 2xx status code:
{ "id": "prop_123", "name": "Sunset Apartments", "address": "123 Main St", "units_count": 12, "created_at": "2024-01-15T10:30:00Z" }
Error Handling
Errors are returned with appropriate HTTP status codes and include error details:
{ "error": "Property not found", "code": "PROPERTY_NOT_FOUND", "status": 404 }
Common Error Codes
- 400 Bad Request: Invalid request parameters
- 401 Unauthorized: Invalid or missing API key
- 403 Forbidden: Insufficient permissions
- 404 Not Found: Resource not found
- 429 Too Many Requests: Rate limit exceeded
- 500 Internal Server Error: Server error
Rate Limits
The API is rate limited to ensure fair usage. Current limits are:
- 100 requests per minute per API key
- 1000 requests per hour per API key