File size: 998 Bytes
0ddf928
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c4b0f63
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# API conventions

## Versioning

- All endpoints are under `/api/v1`.

## Resource pattern

- `POST /resource`
- `GET /resource`
- `GET /resource/{id}`
- `PATCH /resource/{id}`
- `DELETE /resource/{id}`

## Error format

```json
{
  "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:

```json
{
  "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](endpoints/quotations.md)** (`POST /api/v1/quotations/calculate-prices`)
  - Calculate best supplier prices for articles
  - Apply pricing rules with optional UI overrides
  - Return full restitution table data