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, price en discount.

  • Name
    inserted
    Type
    timestamp
    Description

    Aanmaakdatum.

  • Name
    updated
    Type
    timestamp
    Description

    Laatste wijzigingsdatum.


GET/v1/orders

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

GET
/v1/orders
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
    }
  }
]

POST/v1/orders

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

POST
/v1/orders
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"
    }
  ]
}

GET/v1/orders/:id

Retrieve an order

Haal een enkele order op met alle relaties: klant, orderregels, verzendingen en facturen.

Request

GET
/v1/orders/clx...
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": []
}

PUT/v1/orders/:id

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

PUT
/v1/orders/clx...
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/v1/orders/:id

Delete an order

Verwijder een order permanent. Dit verwijdert ook alle gekoppelde orderregels.

Request

DELETE
/v1/orders/clx...
curl -X DELETE https://api.example.nl/v1/orders/clx... \
  -H "Authorization: Bearer {token}"

Was this page helpful?