This commit is contained in:
seb
2026-10-08 21:50:42 +02:00
parent 0493b218d7
commit 969c064f3a
5 changed files with 86 additions and 13 deletions

View File

@@ -6,8 +6,16 @@ List orders
Lists sales orders (`manifest` rows with `type = 'order'`)
for the authenticated user's selected company.
Results are paged, include line items, and provide total unpaged count.
## Query parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `offset` | no | integer | Number of orders to skip |
| `limit` | no | integer | Number of orders to return |
## Response `200`
Order list
@@ -21,9 +29,25 @@ Order list
"type": "order",
"entityId": 1,
"date": "2026-08-10T00:00:00.000Z",
"createdAt": "2026-08-10T00:00:00.000Z"
"createdAt": "2026-08-10T00:00:00.000Z",
"lines": [
{
"id": 1,
"sku": "…",
"name": "…",
"pu": 1,
"amount": 1,
"net": 1,
"rebate": 1,
"taxrate": 1,
"comment": "…"
}
]
}
]
],
"total": 1,
"offset": 1,
"limit": 1
}
```
@@ -31,7 +55,7 @@ Order list
| Status | Description |
|--------|-------------|
| 400 | No company selected — `{"error":"…"}` |
| 400 | Invalid offset, invalid limit, or no company selected — `{"error":"…"}` |
| 401 | Unauthorized — `{"error":"…"}` |
| 403 | Not authorized — `{"error":"…"}` |
| 404 | Company not found — `{"error":"…"}` |