API Overview
The Accountability API provides a comprehensive RESTful interface for managing multi-company, multi-currency accounting operations. Built with Effect’s HttpApi framework, the API offers type-safe endpoints with automatic OpenAPI documentation generation.Base URL
All API requests should be made to:API Version
The current API version isv1. All versioned endpoints use the /api/v1 prefix:
/api/v1/accounts/api/v1/journal-entries/api/v1/companies- etc.
/api/health- Health check (public)/api/auth- Authentication endpoints (mixed public/protected)
General Patterns
HTTP Methods
The API follows standard RESTful conventions:GET- Retrieve resourcesPOST- Create new resources or initiate actionsPUT- Update existing resources (full update)DELETE- Delete or deactivate resources
Response Format
All responses use JSON format with proper Content-Type headers:Pagination
List endpoints support pagination usinglimit and offset query parameters:
Maximum number of items to return (max: 100)
Number of items to skip before starting to return results
Date and Time Formats
Dates use ISO 8601 format (YYYY-MM-DD):Currency Amounts
Monetary amounts use string representation to preserve precision:Error Responses
Errors follow a consistent structure with HTTP status codes and error details:200 OK- Successful request201 Created- Resource successfully created204 No Content- Successful request with no response body400 Bad Request- Invalid request parameters401 Unauthorized- Authentication required or invalid credentials403 Forbidden- Insufficient permissions404 Not Found- Resource not found409 Conflict- Resource conflict (e.g., duplicate name)
Query Parameters
Query parameters support filtering, sorting, and pagination: Filtering by status:Optional Fields
Fields marked as optional in request schemas can be:- Omitted entirely
- Set to
nullto explicitly clear a value (for updates)
Idempotency
PUT and DELETE operations are idempotent - making the same request multiple times produces the same result.
POST operations are generally not idempotent and will create new resources on each call.
Health Check
Check API availability (no authentication required):Rate Limiting
Rate limiting policies are configured per deployment. Contact your system administrator for specific limits.
Next Steps
Authentication
Learn how to authenticate API requests
Accounts
Manage the Chart of Accounts
Journal Entries
Create and manage journal entries
Reports
Generate financial reports