List Purchase Orders
Returns a paginated list of purchase orders.
Required license
This endpoint requires the Stock management add-on.
Note: This endpoint returns open purchase orders only. A completed purchase order is deleted — there is no history of completed orders. A completed order simply disappears from the results, without its own event. Run a periodic full sync: any purchase order that is missing from the full sync, but was present before, counts as completed.
Request
GET /api/oauth/v2/resource/wares/purchases
Header
| Header | Value |
|---|---|
Authorization | Bearer {access_token} |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
offset | integer | No | Start position (default: 0) |
limit | integer | No | Number of results (default: 50, max: 200) |
wareId | string (UUID) | No | Filter by a specific ware |
createdSince | string (ISO 8601) | No | Only purchase orders created at or after this timestamp (createdAt >=) |
createdUntil | string (ISO 8601) | No | Only purchase orders created at or before this timestamp (createdAt <=) |
updatedSince | string (ISO 8601) | No | Only purchase orders updated at or after this timestamp (updatedAt >=) |
updatedUntil | string (ISO 8601) | No | Only purchase orders updated at or before this timestamp (updatedAt <=) |
Note:
deletedSinceis not supported on this endpoint and is silently ignored. Since completed purchase orders are deleted and leave no history, you can only detect completion through a periodic full sync — see the note above.
Response
Success (200 OK)
json
{
"data": [
{
"id": "e5f6a7b8-c9d0-1234-efab-234567890123",
"amount": 50,
"notice": "Nachbestellung Q3",
"createdAt": "2026-08-10T08:30:00+02:00",
"updatedAt": "2026-08-10T08:30:00+02:00",
"createdBy": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"updatedBy": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"ware": "c3d4e5f6-a7b8-9012-cdef-012345678901"
}
],
"meta": {
"total": 6,
"offset": 0,
"limit": 50
}
}Response fields
| Field | Type | Description |
|---|---|---|
data | Array | List of open purchase orders |
data[].id | string (UUID) | Unique ID of the purchase order |
data[].amount | number | Ordered quantity |
data[].notice | string | null | Free-text note |
data[].createdAt | string (ISO 8601) | Creation timestamp |
data[].updatedAt | string (ISO 8601) | Last update timestamp |
data[].createdBy | string (UUID) | null | ID of the user who created the order |
data[].updatedBy | string (UUID) | null | ID of the user who last updated the order |
data[].ware | string (UUID) | null | ID of the ordered ware, loadable via Get Ware |
meta.total | integer | Total number of open purchase orders |
meta.offset | integer | Current start position |
meta.limit | integer | Number of returned entries |
Beispiele
bash
curl -X GET "https://my.offisy.at/api/oauth/v2/resource/wares/purchases?offset=0&limit=50&wareId=b2c3d4e5-f6a7-8901-bcde-f01234567890&createdSince=beispiel&createdUntil=beispiel&updatedSince=2026-04-15T10%3A00%3A00&updatedUntil=2026-04-15T10%3A00%3A00" \
-H "Authorization: Bearer {access_token}"Parameter
Zuerst Token anfordern
Possible errors
| Status | Code | Description |
|---|---|---|
| 400 | validation_error | Invalid wareId, or a timestamp filter has an invalid value |
| 400 | validation_error | createdSince is after createdUntil, or updatedSince is after updatedUntil |
| 401 | invalid_client | Invalid or missing access token |
| 403 | insufficient_scope | Scope wares not present, or Stock management add-on not licensed |
| 404 | not_found | Ware for wareId not found or not permitted |