
Loading Optiviera...
JSON · JWT Auth · Multi-tenant
Integrate any system with Optiviera via a fully documented REST API. All endpoints require a JWT Bearer token and are automatically scoped to your tenant.
Get from zero to your first API call in three steps
Send your credentials to POST /api/auth/login. The response contains a JWT token valid for 24 hours.
Attach the token to every request using the Authorization: Bearer [token] header.
All endpoints live under https://optiviera.com/api and respond with JSON. Tenant context is derived automatically from your token.
Every request must carry a valid JWT Bearer token obtained from the login endpoint
curl -X POST https://optiviera.com/api/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"[email protected]","password":"••••"}'{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expiresIn": 86400,
"tokenType": "Bearer"
}Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Everything you need to know before your first call
Base URL: https://optiviera.com/api — All endpoints below are relative to this base URL. Always use HTTPS.
All requests and responses use application/json. Set Content-Type: application/json on write operations (POST, PUT).
Data is automatically filtered to your organization using the TenantId embedded in your JWT. You cannot access another tenant's data.
List endpoints support ?page=1&pageSize=20. The response includes totalCount, page, and pageSize fields.
Most list endpoints accept query params like ?status=Open&sortBy=createdAt&sortDir=desc for flexible data retrieval.
12 resource groups covering every module of the platform
/api/auth/login/api/auth/refresh/api/auth/logout/api/tickets/api/tickets/api/tickets/{id}/api/tickets/{id}/api/tickets/{id}/api/tickets/{id}/comments/api/invoices/api/invoices/api/journal-entries/api/journal-entries/api/balance-sheet/api/trial-balance/api/employees/api/employees/api/employees/{id}/api/employees/{id}/api/positions/api/departments/api/payroll/api/payroll/run/api/payroll/{id}/api/payroll/{id}/approve/api/orders/api/orders/api/quotations/api/quotations/api/customers/api/customers/api/purchase-orders/api/purchase-orders/api/suppliers/api/suppliers/api/purchase-orders/{id}/api/products/api/products/api/stock-movements/api/stock-movements/api/warehouses/api/leads/api/leads/api/contacts/api/contacts/api/pipeline-stages/api/work-orders/api/work-orders/api/work-orders/{id}/api/work-orders/{id}/api/work-orders/{id}/api/reports/tickets/api/reports/finance/api/reports/hr/api/reports/sales/api/reports/inventory/api/settings/tenant/api/settings/tenant/api/settings/users/api/sla-configs/api/sla-configsStandard HTTP semantics are used consistently throughout the API
Request succeeded. Body contains the result.
Resource created. Body contains the new object with its ID.
Request succeeded. No body returned (used for DELETE).
Malformed request or missing required fields.
Missing, expired, or invalid JWT token.
Valid token but insufficient permissions for this action.
Resource does not exist or belongs to another tenant.
Input validation failed. See the details array in the response body.
Unexpected server error. Contact support with the request ID from the response.
All error responses follow a consistent JSON structure for easy parsing
When a request fails, the API returns a structured JSON body. Use the details array for field-level validation feedback in forms.
{
"status": 422,
"error": "ValidationError",
"message": "Request validation failed",
"details": [
{ "field": "email", "message": "Email is required" },
{ "field": "password", "message": "Minimum 8 characters" }
]
}Explore the full interactive Swagger documentation or contact our team for API access and support.