Spaces:
Running
Running
API conventions
Versioning
- All endpoints are under
/api/v1.
Resource pattern
POST /resourceGET /resourceGET /resource/{id}PATCH /resource/{id}DELETE /resource/{id}
Error format
{
"detail": "human readable message"
}
Validation errors return detail as an array of field error objects.
Naming
- API payloads use
snake_case. - Legacy DB naming mismatches (e.g.
customer.Id) are normalized in schemas.
Pagination
List responses use:
{
"items": [],
"total": 0,
"skip": 0,
"take": 50
}
Decimal values
Decimal fields should be exposed as strings to avoid float precision drift.
Endpoints
API endpoints are documented in the endpoints/ folder:
- Quotations: Calculate Prices (
POST /api/v1/quotations/calculate-prices)- Calculate best supplier prices for articles
- Apply pricing rules with optional UI overrides
- Return full restitution table data