Orders
De Orders API beheert verkooporders (sales orders). Orders bevatten orderregels met producten, hoeveelheden en prijzen, en zijn gekoppeld aan klanten, verzendingen en facturen.
The order model
Properties
- Name
id- Type
- string
- Description
Unieke identifier.
- Name
number- Type
- string
- Description
Ordernummer (uniek).
- Name
reference- Type
- string
- Description
Externe referentie (bijv. purchaseOrderId).
- Name
customerId- Type
- string
- Description
ID van de klant.
- Name
origin- Type
- string
- Description
Herkomst:
eduv,api,portal,manual.
- Name
status- Type
- string
- Description
Status:
draft,pending,confirmed,shipped,delivered,cancelled.
- Name
orderDate- Type
- timestamp
- Description
Orderdatum.
- Name
deliveryDate- Type
- timestamp
- Description
Gewenste leverdatum.
- Name
notes- Type
- string
- Description
Opmerkingen.
- Name
lines- Type
- array
- Description
Orderregels met
productEan,quantity,priceendiscount.
- Name
inserted- Type
- timestamp
- Description
Aanmaakdatum.
- Name
updated- Type
- timestamp
- Description
Laatste wijzigingsdatum.
List all orders
Haal een gepagineerde lijst van orders op, gesorteerd op orderdatum (nieuwste eerst).
Optional attributes
- Name
take- Type
- integer
- Description
Aantal per pagina (standaard 10).
- Name
skip- Type
- integer
- Description
Aantal over te slaan.
- Name
include- Type
- string
- Description
Relaties:
lines,customer,shipments,invoices.
Request
curl -G https://api.example.nl/v1/orders \
-H "Authorization: Bearer {token}" \
-d take=10 \
-d include=lines,customer
Response
[
{
"id": "clx...",
"number": "SO-106021",
"reference": "PO-2026-001",
"customerId": "clx...",
"origin": "api",
"status": "confirmed",
"orderDate": "2026-03-24T10:00:00.000Z",
"lines": [
{
"id": "clx...",
"productEan": "9789493113862",
"quantity": 30,
"price": "29.95",
"product": {
"name": "POLARIS nask1 leerwerkboek vmbo-basis 3 deel A"
}
}
],
"_count": {
"lines": 1,
"shipments": 0,
"invoices": 0
}
}
]
Create an order
Maak een nieuwe verkooporder aan, optioneel met orderregels.
Required attributes
- Name
number- Type
- string
- Description
Uniek ordernummer.
- Name
customerId- Type
- string
- Description
ID van de klant.
- Name
origin- Type
- string
- Description
Herkomst van de order.
Optional attributes
- Name
lines- Type
- array
- Description
Orderregels met
productEan,quantity,price.
- Name
status- Type
- string
- Description
Initiële status (standaard
draft).
- Name
deliveryDate- Type
- timestamp
- Description
Gewenste leverdatum.
- Name
notes- Type
- string
- Description
Opmerkingen.
Request
curl https://api.example.nl/v1/orders \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"number": "SO-106100",
"customerId": "clx...",
"origin": "api",
"lines": [
{
"productEan": "9789493113862",
"quantity": 30,
"price": "29.95"
}
]
}'
Response
{
"id": "clx...",
"number": "SO-106100",
"customerId": "clx...",
"origin": "api",
"status": "draft",
"orderDate": "2026-03-24T10:00:00.000Z",
"lines": [
{
"id": "clx...",
"productEan": "9789493113862",
"quantity": 30,
"price": "29.95"
}
]
}
Retrieve an order
Haal een enkele order op met alle relaties: klant, orderregels, verzendingen en facturen.
Request
curl https://api.example.nl/v1/orders/clx... \
-H "Authorization: Bearer {token}"
Response
{
"id": "clx...",
"number": "SO-106021",
"status": "confirmed",
"customer": {
"id": "clx...",
"name": "Lyceum De Basis"
},
"lines": [
{
"productEan": "9789493113862",
"quantity": 30,
"price": "29.95",
"product": {
"name": "POLARIS nask1 leerwerkboek vmbo-basis 3 deel A"
}
}
],
"shipments": [],
"invoices": []
}
Update an order
Werk een bestaande order bij. Alleen ordervelden worden bijgewerkt, niet de orderregels.
Optional attributes
- Name
status- Type
- string
- Description
Nieuwe status.
- Name
deliveryDate- Type
- timestamp
- Description
Nieuwe leverdatum.
- Name
notes- Type
- string
- Description
Opmerkingen.
Request
curl -X PUT https://api.example.nl/v1/orders/clx... \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"status": "confirmed"}'
Response
{
"id": "clx...",
"number": "SO-106021",
"status": "confirmed",
"updated": "2026-03-24T12:00:00.000Z"
}
Delete an order
Verwijder een order permanent. Dit verwijdert ook alle gekoppelde orderregels.
Request
curl -X DELETE https://api.example.nl/v1/orders/clx... \
-H "Authorization: Bearer {token}"