The auto-generated CRUD layer covers list, get, create, update, and delete for every model. For anything more specific — status transitions, batch operations, or domain-specific actions — create aDocumentation Index
Fetch the complete documentation index at: https://docs.veloiq.dev/llms.txt
Use this file to discover all available pages before exploring further.
custom_api.py file in the module directory. The framework scans for this file automatically on startup and registers any routes it finds, so you never need to touch main.py.
When to use custom_api.py
Reach for custom_api.py when you need to:
- Status transitions — mark a task as complete, confirm an order, archive a record
- Batch operations — reassign multiple items at once, bulk-apply a tag
- Domain-specific actions — send a notification, trigger a workflow, compute a derived value
Add custom endpoints to a module
Create custom_api.py in the module directory
Add the file alongside the generated files. For an
orders module the layout looks like:Import the router from api.py
Import
router from .api — the generated router for this module. Do not import it from veloiq_framework; the router object must be the same instance the generator created so your routes are registered under the correct prefix.Add routes using standard FastAPI decorators
Decorate functions with
@router.post, @router.get, and so on, exactly as you would in any FastAPI application. The full example below adds a POST /{order_id}/confirm endpoint and a GET /pending list:Task-manager example
For the task-manager tutorial app, createbackend/app/modules/tasks/custom_api.py to add a “mark as complete” action:
POST /task/{task_id}/complete appears in /docs under the task section.