WinShopAPI docs
ReferenceDocumentsExpeditionDelivery notes

Create an invoice from one or more delivery notes

Merges the delivery notes listed in `deliveryNoteIds` (at most 50) into one invoice and returns the new invoice ids — normally exactly one. Optional fields override the issue, taxable-supply and delivery dates, the payment type and the invoice numbering series; omitted ones fall back to the delivery notes' values. Cannot be undone. Requires `Permissions.Invoice.Create`. See `POST /api/documents/expedition/delivery-notes/{documentId}/invoice` for the single-note variant.

POST
/api/documents/expedition/delivery-notes/invoice

Authorization

Bearer
headerAuthorizationBearer <token>

OAuth 2.0 client credentials. Obtain a client id/secret from Winshop support ([email protected]), then POST to the token URL.

Request Body

application/json
  1. body

Parameters for creating a single invoice out of one or more delivery notes. Every optional value falls back to the delivery notes' own data.

deliveryDate?|

Delivery date printed on the invoice. Null falls back to the delivery note's delivery date.

Formatdate-time
deliveryNoteIds*array<>

Ids of the delivery notes to merge into one invoice. Duplicates are ignored.

downPaymentAmounts?array<>|

Reserved; parallel to DownPaymentIds. Leave empty.

downPaymentIds?array<>|

Reserved for down-payment settlement; leave empty.

invoiceSeriesSettingsId?|

Id of the invoice numbering series to use (an invoice-series settings row, not the series code). Null uses the default series.

Formatint32
issueDate?|

Invoice issue date. Null defaults to today.

Formatdate-time
paymentTypeId?|

Payment type id (see the payment types item list). Null falls back to the delivery note's payment type.

Formatint32
taxableSupplyDate?|

Date of taxable supply. Null defaults to now.

Formatdate-time

Response Body

application/json
  1. response

The invoices created. Normally exactly one, but the server decides how it groups the delivery notes, so the contract allows several.

invoiceIds*array<>

Ids of the created invoices, usable with GET /api/documents/invoices/{id}.

curl -X POST 'https://<your-instance>/api/documents/expedition/delivery-notes/invoice' \  -H 'Authorization: Bearer <access-token>' \  -H 'Content-Type: application/json' \  -d '{  "deliveryNoteIds": [    0  ]}'
{  "invoiceIds": [    0  ]}