/purchase-orders
List purchase orders
Returns a paginated list of purchase orders for the authenticated tenant. The status filter is matched case-insensitively and an unknown value returns 400. ?modifiedSince= (ISO 8601 UTC datetime) returns records created or changed at or after that instant, and is the intended way to run an incremental sync.
Visa hela beskrivningen
A change anywhere inside the record counts: editing a line moves the parent's modifiedDate too, so no change can hide below the resource level. Deletions are not visible here: a deleted record is really gone, so it simply stops appearing, which is indistinguishable from "unchanged". Poll GET /preview/deletions?deletedSince= alongside this endpoint to learn what was removed. Unlike sales orders, Draft purchase orders ARE included — an order created via POST /preview/purchase-orders starts in Draft and the caller has to be able to find it again. Sorted by order date descending, then order number.
Frågeparametrar
| Fält | Typ | Beskrivning |
|---|---|---|
status
|
enum |
Filters on where the order stands in its lifecycle. Draft orders are included in this list, so ?status=Draft narrows to the ones not yet sent.
Draft
Sent
PartiallyConfirmed
Confirmed
PartiallyReceived
Received
Closed
Cancelled
|
supplierNumber
|
string | Returns only the orders placed with this supplier number. |
orderDateFrom
|
string(date) | Returns only orders dated on or after this date (ISO 8601 date). |
orderDateTo
|
string(date) | Returns only orders dated on or before this date (ISO 8601 date). |
search
|
string | Matches order number and supplier reference, case-insensitively and on partial words. |
modifiedSince
|
string(date-time) | Returns only records created or changed at or after this instant (ISO 8601 UTC datetime). A change anywhere inside the record counts, including on its lines. |
page
|
integer | Page to return, 1-based. Default 1. |
pageSize
|
integer | Number of records per page. Default 50, max 200. |
Svar
PagedResult_PublicPurchaseOrderListItem
Paginerat svar: raderna nedan ligger i items[], omgivna av totalCount, page, pageSize, totalPages, hasPreviousPage och hasNextPage. Paginerad
| Fält | Typ | Beskrivning |
|---|---|---|
createdDate
|
string(date-time) | UTC timestamp when the order was created. |
currencyCode
|
string · nullable | ISO 4217 currency code for all monetary values on this order. |
expectedDeliveryDate
|
string(date) · nullable | Date we expect the goods to arrive. Null if not set. |
id
|
string(uuid) | Internal unique identifier (UUID v7). |
lineCount
|
integer | Number of purchase order lines. |
links
|
Links | Hypermedia links for a public API resource. Exposed as a computed `links` property on the public response DTOs so that create and read responses carry the same self-reference — the canonical URL is derived from the business key already present on the DTO and can never drift from the route it points at. |
modifiedDate
|
string(date-time) · nullable | UTC timestamp of the last modification. Null if never modified after creation. |
orderDate
|
string(date) | Date the order was placed (ISO 8601 date). |
orderNumber
|
string · nullable | Unique purchase order number, e.g. `PO-2026-00042`. |
promisedDeliveryDate
|
string(date) · nullable | Delivery date promised by the supplier. Null until confirmed. |
status
|
enum |
Purchase order status values exposed via the Public API.
Mirrors `Domain.Common.Enums.PurchaseOrderStatus` name-for-name and value-for-value so the
query projections can cast directly — a cast is translatable to SQL where a switch over a helper
method is not. `PublicPurchaseEnumParityTests` fails the build if the two ever drift apart,
which is what stops a new domain value from silently serialising as a bare number.
Unlike sales orders, `Draft`<b>is</b> part of the public contract: a purchase order created
through POST /preview/purchase-orders starts in Draft, and the caller has to be able to read back
the order it just created before sending it.
Draft
Sent
PartiallyConfirmed
Confirmed
PartiallyReceived
Received
Closed
Cancelled
|
supplierName
|
string · nullable | Display name of the supplier. |
supplierNumber
|
string · nullable | Supplier number of the seller. |
supplierReference
|
string · nullable | The supplier's own order reference. Null if not provided. |
totalAmount
|
decimal | Total order amount excluding tax, in the order currency. Serialised as a decimal string. |
warehouseCode
|
string · nullable | Code of the warehouse the goods are received into. |
ProblemDetails
?status= got a value outside its list.
| Fält | Typ |
|---|---|
detail
|
string · nullable |
instance
|
string · nullable |
status
|
integer · nullable |
title
|
string · nullable |
type
|
string · nullable |
Standardfel:
401
403
Felhantering
Exempel
curl "https://api.erp.fluit.cloud/preview/purchase-orders" \
-H "X-Api-Key: fluit_live_sk_..."
{
"hasNextPage": true,
"hasPreviousPage": true,
"items": [
{
"createdDate": "2026-06-11T09:24:13.418",
"currencyCode": "SEK",
"expectedDeliveryDate": "2026-06-11",
"id": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
"lineCount": 42,
"links": {
"self": "string"
},
"modifiedDate": "2026-06-11T09:24:13.418",
"orderDate": "2026-06-11",
"orderNumber": "SO-2026-1041",
"promisedDeliveryDate": "2026-06-11",
"status": "Draft",
"supplierName": "Nordic Components AB",
"supplierNumber": "SUP-001",
"supplierReference": "string",
"totalAmount": "299.00",
"warehouseCode": "MAIN"
}
],
"page": 1,
"pageSize": 50,
"totalCount": 137,
"totalPages": 3
}
Bas-URL https://api.erp.fluit.cloud/preview. Svarsexemplet är genererat ur schemat: formen stämmer, värdena är påhittade.