Invoices

De Invoices API beheert facturen (invoices). Elke factuur is gekoppeld aan een verkooporder en bevat factuurregels met producten, hoeveelheden en prijzen.

The invoice model

Properties

  • Name
    id
    Type
    string
    Description

    Unieke identifier.

  • Name
    number
    Type
    string
    Description

    Factuurnummer (uniek).

  • Name
    salesOrderId
    Type
    string
    Description

    ID van de gekoppelde verkooporder.

  • Name
    status
    Type
    string
    Description

    Status: draft, sent, paid, overdue.

  • Name
    invoiceDate
    Type
    timestamp
    Description

    Factuurdatum.

  • Name
    dueDate
    Type
    timestamp
    Description

    Vervaldatum.

  • Name
    notes
    Type
    string
    Description

    Opmerkingen.

  • Name
    lines
    Type
    array
    Description

    Factuurregels met productEan, quantity, price en discount.

  • Name
    inserted
    Type
    timestamp
    Description

    Aanmaakdatum.

  • Name
    updated
    Type
    timestamp
    Description

    Laatste wijzigingsdatum.


GET/v1/invoices

List all invoices

Haal een gepagineerde lijst van facturen op.

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, salesOrder.

Request

GET
/v1/invoices
curl -G https://api.example.nl/v1/invoices \
  -H "Authorization: Bearer {token}" \
  -d take=10 \
  -d include=lines,salesOrder

Response

[
  {
    "id": "clx...",
    "number": "INV-2026-001",
    "salesOrderId": "clx...",
    "status": "sent",
    "invoiceDate": "2026-03-25T00:00:00.000Z",
    "dueDate": "2026-04-25T00:00:00.000Z",
    "lines": [
      {
        "productEan": "9789493113862",
        "quantity": 30,
        "price": "29.95",
        "product": {
          "name": "POLARIS nask1 leerwerkboek vmbo-basis 3 deel A"
        }
      }
    ],
    "_count": {
      "lines": 1
    }
  }
]

POST/v1/invoices

Create an invoice

Maak een nieuwe factuur aan voor een verkooporder.

Required attributes

  • Name
    number
    Type
    string
    Description

    Uniek factuurnummer.

  • Name
    salesOrderId
    Type
    string
    Description

    ID van de verkooporder.

Optional attributes

  • Name
    lines
    Type
    array
    Description

    Factuurregels met productEan, quantity, price, salesOrderLineId.

  • Name
    status
    Type
    string
    Description

    Initiële status (standaard draft).

  • Name
    invoiceDate
    Type
    timestamp
    Description

    Factuurdatum.

  • Name
    dueDate
    Type
    timestamp
    Description

    Vervaldatum.

Request

POST
/v1/invoices
curl https://api.example.nl/v1/invoices \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "number": "INV-2026-001",
    "salesOrderId": "clx...",
    "invoiceDate": "2026-03-25",
    "dueDate": "2026-04-25",
    "lines": [
      {
        "productEan": "9789493113862",
        "salesOrderLineId": "clx...",
        "quantity": 30,
        "price": "29.95"
      }
    ]
  }'

Response

{
  "id": "clx...",
  "number": "INV-2026-001",
  "salesOrderId": "clx...",
  "status": "draft",
  "invoiceDate": "2026-03-25T00:00:00.000Z",
  "dueDate": "2026-04-25T00:00:00.000Z",
  "lines": [
    {
      "productEan": "9789493113862",
      "quantity": 30,
      "price": "29.95"
    }
  ]
}

GET/v1/invoices/:id

Retrieve an invoice

Haal een enkele factuur op met de gekoppelde order en factuurregels.

Request

GET
/v1/invoices/clx...
curl https://api.example.nl/v1/invoices/clx... \
  -H "Authorization: Bearer {token}"

Response

{
  "id": "clx...",
  "number": "INV-2026-001",
  "status": "sent",
  "salesOrder": {
    "id": "clx...",
    "number": "SO-106021"
  },
  "lines": [
    {
      "productEan": "9789493113862",
      "quantity": 30,
      "price": "29.95",
      "product": {
        "name": "POLARIS nask1 leerwerkboek vmbo-basis 3 deel A"
      }
    }
  ]
}

PUT/v1/invoices/:id

Update an invoice

Werk een factuur bij, bijvoorbeeld om de status te wijzigen.

Optional attributes

  • Name
    status
    Type
    string
    Description

    Nieuwe status.

  • Name
    invoiceDate
    Type
    timestamp
    Description

    Factuurdatum.

  • Name
    dueDate
    Type
    timestamp
    Description

    Vervaldatum.

  • Name
    notes
    Type
    string
    Description

    Opmerkingen.

Request

PUT
/v1/invoices/clx...
curl -X PUT https://api.example.nl/v1/invoices/clx... \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{"status": "sent"}'

Response

{
  "id": "clx...",
  "number": "INV-2026-001",
  "status": "sent",
  "updated": "2026-03-25T10:00:00.000Z"
}

DELETE/v1/invoices/:id

Delete an invoice

Verwijder een factuur permanent, inclusief alle factuurregels.

Request

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

Was this page helpful?