🧪 [Preview] Query purchase orders. Returns full purchase order models with explicit control over filters, sorting, pagination and field selection.
🧪 Preview — early access! This endpoint is fully functional, but its shape may still change while we finalize it.
Primary endpoint for fetching purchase orders: single lookups, filtered lists, and paginated UI queries. Pagination is capped at offset (Take * Page) of 10,000 — past that, use POST /api/PurchaseOrders/Query/Scroll.
All filter fields are documented on the request schema below.
Default values are omitted
To keep responses small, a field is left out when it holds its default value: false, 0, null, the empty date 0001-01-01T00:00:00, the empty id 00000000-0000-0000-0000-000000000000, or an enum's first value. A missing field means that value, not "unknown". "" and [] are real values and are always returned.
A field marked nullable in the schema has null as its default, so it is left out only when it is null — a nullable boolean holding false, or a nullable number holding 0, is still returned.
Examples
1. Specific purchase orders by ID.
{
"purchaseOrderIds": ["PO-123", "PO-456"]
}
2. Filtered list with a tight payload (recommended). Order lines are usually the bulk of the document — exclude them when you only need header data.
{
"take": 50,
"page": 1,
"statuses": ["Sent"],
"storeIds": ["store-1"],
"sort": [{ "field": "created", "direction": "desc" }],
"fields": { "exclude": ["purchaseOrderForm.lineItems"] }
}
3. Only the fields you need. The document id is always returned.
{
"supplierId": "SUPPLIER-1",
"fields": { "include": ["purchaseOrderNumber", "status", "total"] }
}
Request
- Base URL: https://api.omnium.no (the document declares no server; this is the origin it was published from)
- URL: https://api.omnium.no/api/PurchaseOrders/Query
- Auth: API key in header Authorization
Request body
Response
Query successful
Changes
No recorded changes to this operation across all 1 revision of this API.