Arvalox API Documentation

Complete guide to integrating with Arvalox

Getting Started

Quick Start
Get up and running with the Arvalox API in minutes

1. API Key Access

2. Base URL

Base URL: http://localhost:8000/v1

3. Authentication

Include 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

Authentication

Secure your API requests with API keys

GET/ping
Test API key authentication
# 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"

Customers

Manage your customers

GET/customers
List all customers
curl -X GET "http://localhost:8000/v1/customers/" \
  -H "x-arvalox-api-key: YOUR_API_KEY" \
  -H "X-API-Key: YOUR_API_KEY"
POST/customers
Create a new customer
curl -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"
  }'
GET/customers/{id}
Get customer details
curl -X GET "http://localhost:8000/v1/customers/1" \
  -H "x-arvalox-api-key: YOUR_API_KEY" \
  -H "X-API-Key: YOUR_API_KEY"
PUT/customers/{id}
Update customer information
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"
  }'

Invoices

Create and manage invoices

GET/invoices
List all invoices
curl -X GET "http://localhost:8000/v1/invoices/" \
  -H "x-arvalox-api-key: YOUR_API_KEY" \
  -H "X-API-Key: YOUR_API_KEY"
POST/invoices
Create a new invoice
curl -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
      }
    ]
  }'
GET/invoices/{id}
Get invoice details
curl -X GET "http://localhost:8000/v1/invoices/1" \
  -H "x-arvalox-api-key: YOUR_API_KEY" \
  -H "X-API-Key: YOUR_API_KEY"

Payments

Track and manage payments

GET/payments
List all payments
curl -X GET "http://localhost:8000/v1/payments/" \
  -H "x-arvalox-api-key: YOUR_API_KEY" \
  -H "X-API-Key: YOUR_API_KEY"
POST/payments
Record a new payment
curl -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"
  }'

Reports

Generate reports and analytics

GET/reports/aging
Get aging report
curl -X GET "http://localhost:8000/v1/reports/aging" \
  -H "x-arvalox-api-key: YOUR_API_KEY" \
  -H "X-API-Key: YOUR_API_KEY"
GET/reports/dashboard
Get dashboard analytics
curl -X GET "http://localhost:8000/v1/reports/dashboard" \
  -H "x-arvalox-api-key: YOUR_API_KEY" \
  -H "X-API-Key: YOUR_API_KEY"

Rate Limits

The Arvalox API implements rate limiting to ensure fair usage and optimal performance for all users.

Default Limits

  • • 1,000 requests per hour
  • • 10,000 requests per day
  • • 50 requests per minute

Headers

  • X-RateLimit-Limit
  • X-RateLimit-Remaining
  • X-RateLimit-Reset

Error Handling

The API uses standard HTTP status codes and returns detailed error information in JSON format.

Common Status Codes

200 OKRequest successful
400 Bad RequestInvalid request format
401 UnauthorizedAuthentication required
403 ForbiddenInsufficient permissions
404 Not FoundResource not found
429 Too Many RequestsRate limit exceeded
500 Internal Server ErrorServer error

Error Response Format

{
  "detail": "Error description",
  "error_code": "VALIDATION_ERROR",
  "field_errors": {
    "email": ["This field is required"]
  }
}