Complete guide to integrating with Arvalox
Base URL: http://localhost:8000/v1Include your API key using one of these methods:
# Method 1: Header (Recommended)
x-arvalox-api-key: your_api_key_here
# Method 2: Query Parameter
?x_arvalox_api_key=your_api_key_here/v1.Secure your API requests with API keys
/ping# Method 1: Header (Recommended)
curl -X GET "http://localhost:8000/v1/ping" \
  -H "x-arvalox-api-key: YOUR_API_KEY"
# Method 2: Query Parameter  
curl -X GET "http://localhost:8000/v1/ping?x_arvalox_api_key=YOUR_API_KEY"Manage your customers
/customerscurl -X GET "http://localhost:8000/v1/customers/" \
  -H "x-arvalox-api-key: YOUR_API_KEY" \
  -H "X-API-Key: YOUR_API_KEY"/customerscurl -X POST "http://localhost:8000/v1/customers/" \
  -H "x-arvalox-api-key: YOUR_API_KEY" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_code": "CUST001",
    "name": "Acme Corporation",
    "email": "contact@acme.com",
    "phone": "+1-555-123-4567",
    "billing_address": "123 Main St, City, State 12345"
  }'/customers/{id}curl -X GET "http://localhost:8000/v1/customers/1" \
  -H "x-arvalox-api-key: YOUR_API_KEY" \
  -H "X-API-Key: YOUR_API_KEY"/customers/{id}curl -X PUT "http://localhost:8000/v1/customers/1" \
  -H "x-arvalox-api-key: YOUR_API_KEY" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated Company Name",
    "email": "newemail@company.com"
  }'Create and manage invoices
/invoicescurl -X GET "http://localhost:8000/v1/invoices/" \
  -H "x-arvalox-api-key: YOUR_API_KEY" \
  -H "X-API-Key: YOUR_API_KEY"/invoicescurl -X POST "http://localhost:8000/v1/invoices/" \
  -H "x-arvalox-api-key: YOUR_API_KEY" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_id": 1,
    "invoice_number": "INV-2024-001",
    "issue_date": "2024-01-15",
    "due_date": "2024-02-15",
    "items": [
      {
        "description": "Consulting Services",
        "quantity": 10,
        "unit_price": 150.00,
        "tax_rate": 0.08
      }
    ]
  }'/invoices/{id}curl -X GET "http://localhost:8000/v1/invoices/1" \
  -H "x-arvalox-api-key: YOUR_API_KEY" \
  -H "X-API-Key: YOUR_API_KEY"Track and manage payments
/paymentscurl -X GET "http://localhost:8000/v1/payments/" \
  -H "x-arvalox-api-key: YOUR_API_KEY" \
  -H "X-API-Key: YOUR_API_KEY"/paymentscurl -X POST "http://localhost:8000/v1/payments/" \
  -H "x-arvalox-api-key: YOUR_API_KEY" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_id": 1,
    "invoice_id": 1,
    "amount": 500.00,
    "payment_method": "bank_transfer",
    "payment_date": "2024-01-20",
    "reference_number": "TXN123456"
  }'Generate reports and analytics
/reports/agingcurl -X GET "http://localhost:8000/v1/reports/aging" \
  -H "x-arvalox-api-key: YOUR_API_KEY" \
  -H "X-API-Key: YOUR_API_KEY"/reports/dashboardcurl -X GET "http://localhost:8000/v1/reports/dashboard" \
  -H "x-arvalox-api-key: YOUR_API_KEY" \
  -H "X-API-Key: YOUR_API_KEY"The Arvalox API implements rate limiting to ensure fair usage and optimal performance for all users.
X-RateLimit-LimitX-RateLimit-RemainingX-RateLimit-ResetThe API uses standard HTTP status codes and returns detailed error information in JSON format.
200 OKRequest successful400 Bad RequestInvalid request format401 UnauthorizedAuthentication required403 ForbiddenInsufficient permissions404 Not FoundResource not found429 Too Many RequestsRate limit exceeded500 Internal Server ErrorServer error{
  "detail": "Error description",
  "error_code": "VALIDATION_ERROR",
  "field_errors": {
    "email": ["This field is required"]
  }
}