This commit is contained in:
seb
2026-10-13 01:30:09 +02:00
parent 97540fb745
commit 8acca998bc
5 changed files with 61 additions and 10 deletions

View File

@@ -589,7 +589,7 @@ _none_
### Section: /order
#### List orders — `GET /order`
- Params: `query: offset?: int, limit?: int`
- Params: `query: offset?: int, limit?: int, search?: str, onlyUnpaid?: bool, onlyUndelivered?: bool, seekMonths?: int`
- Returns: `200 { orders: T2[], total: int, offset: int, limit: int }`
#### Create order — `POST /order`
- Params: `body: { number: str, date: str, lines: T30[], entityId?: int|null }`

View File

@@ -490,7 +490,7 @@ _none_
### Section: /order
#### List orders — `GET /order`
- Params: `query: offset?: int, limit?: int`
- Params: `query: offset?: int, limit?: int, search?: str, onlyUnpaid?: bool, onlyUndelivered?: bool, seekMonths?: int`
- Returns: `200 { orders: T2[], total: int, offset: int, limit: int }`
#### Create order — `POST /order`
- Params: `body: { number: str, date: str, lines: T27[], entityId?: int|null }`

View File

@@ -15,6 +15,10 @@ Results are paged, include line items, shipping, payment, and provide total unpa
|-------|----------|------|-------------|
| `offset` | no | integer | Number of orders to skip |
| `limit` | no | integer | Number of orders to return |
| `search` | no | string | Free-text search matching order number, external number, or customer name |
| `onlyUnpaid` | no | boolean | When true, returns only unpaid orders (including overpaid orders) |
| `onlyUndelivered` | no | boolean | When true, returns only undelivered orders |
| `seekMonths` | no | integer | Negative integer for cutoff months ago (e.g. -1 for orders older than 1 month) |
## Response `200`
@@ -135,7 +139,7 @@ Order list
| Status | Description |
|--------|-------------|
| 400 | Invalid offset, invalid limit, or no company selected — `{"error":"…"}` |
| 400 | Invalid query parameters, invalid offset, invalid limit, or no company selected — `{"error":"…"}` |
| 401 | Unauthorized — `{"error":"…"}` |
| 403 | Not authorized — `{"error":"…"}` |
| 404 | Company not found — `{"error":"…"}` |