Skip to content

API Reference

The RIVORA REST API provides endpoints for authentication, user management, products, tenants, webhooks, health checks, and system initialization.

Base URL

http://localhost:5220

Authentication

All protected endpoints require a JWT Bearer token in the Authorization header:

Authorization: Bearer <jwt-token>

Obtain a token via POST /api/auth/login.

Rate Limiting

Rate-limited endpoints use the strict policy: 5 requests per 10 seconds per client. When exceeded, the API returns 429 Too Many Requests with a Retry-After header.

Multi-Tenancy Headers

Include a tenant identifier via one of:

  • Header: X-Tenant-Id: tenant-abc
  • Query string: ?tenant=tenant-abc
  • Subdomain: tenant-abc.app.example.com

Error Format

All errors follow a consistent structure:

json
{
  "message": "Description of the error"
}

Status Codes

CodeMeaning
200Success
201Created
202Accepted
204No Content
400Bad Request (validation errors)
401Unauthorized (missing/invalid token)
403Forbidden (insufficient permissions)
404Not Found
429Too Many Requests
500Internal Server Error

Endpoints

SectionDescription
AuthenticationLogin, token refresh, logout
UsersUser CRUD operations
ProductsProduct CRUD and search
TenantsTenant management
WebhooksWebhook subscriptions and receivers
HealthHealth check and readiness probes
InitializationFirst-admin setup and status

Interactive Documentation

  • Swagger UI: http://localhost:5220/swagger
  • ReDoc: http://localhost:5220/api-docs
  • OpenAPI spec: http://localhost:5220/swagger/v1/swagger.json
  • GraphQL Playground: http://localhost:5220/graphql/ui

Released under the MIT License.