StabisoDocs

API reference

Delivery notes

Delivery notes: goods shipped to a customer from a warehouse, posted at moving average cost (Dr cost of goods sold / Cr inventory), their PDF, invoicing them, and what is delivered but not yet invoiced.

Operation Summary Scope Idempotency-Key
GET /v1/delivery-notes List delivery notes read
POST /v1/delivery-notes Create a delivery note draft required
GET /v1/delivery-notes/{note} Read a delivery note read
PATCH /v1/delivery-notes/{note} Change a delivery note draft
POST /v1/delivery-notes/{note}/cancel Cancel a delivery note draft
POST /v1/delivery-notes/{note}/invoice Invoice a delivery note draft required
GET /v1/delivery-notes/{note}/pdf Download a delivery note read
POST /v1/delivery-notes/{note}/post Post a delivery note post
GET /v1/entities/{entity}/delivered-not-invoiced Delivered, not invoiced read

GET /v1/delivery-notes

List delivery notes

Delivery notes, newest delivery first, with their lines, cost and what is left to invoice.

Required scope read (admin implies every scope)
Operation id list_delivery_notes_v1_delivery_notes_get

Parameters

In Name Type Required Description
query entity string or null Only this entity's (code or id).
query status "cancelled" | "draft" | "pending_approval" | "posted" or null Only notes of this status.
query customer string or null Customer code or id (needs entity).
query q string or null Text in the number, reference or customer. (max length 100)
query start string (date) or null Delivered on or after this day.
query end string (date) or null Delivered on or before this day.
query limit integer How many, newest first; at most 1000. (min 1; max 1000; default 200)

Example request

curl "$ERP_URL/v1/delivery-notes" \
  -H "Authorization: Bearer $ERP_KEY"

Responses

Status Meaning Body
200 OK array of DeliveryNoteOut
401 Missing or invalid API key (unauthorized). ErrorEnvelope
403 The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). ErrorEnvelope
422 Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. HTTPValidationError

Example response (shape)

[
  {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "entity": "string",
    "number": "string",
    "status": "cancelled",
    "customer": "string",
    "customer_name": "string",
    "warehouse": "string",
    "warehouse_name": "string",
    "delivery_date": "2026-09-21",
    "customer_reference": "string",
    "notes": "string",
    "currency": "string",
    "cost": "string",
    "posting_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "posting_number": "string",
    "journal_entry_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "invoices": [
      "string"
    ],
    "left": "string",
    "lines": [
      {
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "line_no": 1,
        "item": "string",
        "item_name": "string",
        "unit": "string",
        "description": "string",
        "quantity": "string",
        "sales_line_id": null,
        "sales_order": null,
        "cost": null,
        "invoiced": "string",
        "returned": "string",
        "left": "string"
      }
    ],
    "version": 1,
    "created_by": {},
    "created_at": "2026-09-21T09:30:00Z",
    "decided_by": {},
    "decided_at": "2026-09-21T09:30:00Z"
  }
]

POST /v1/delivery-notes

Create a delivery note

A draft delivery note of stock items to a customer, from a warehouse (default the default one), each line optionally for a sales order line. Nothing moves until it is posted. 422 for a line of an order beyond what is left to ship. Needs an Idempotency-Key.

Required scope draft (admin implies every scope)
Idempotency-Key required
Operation id create_delivery_note_v1_delivery_notes_post

Request body

application/json (required): DeliveryNoteInput

Field Type Required Description
entity string yes Code (or id) of the entity that ships.
customer string yes Code (or id) of the customer the goods go to.
warehouse string or null Code (or id) of the warehouse they leave; default the default.
delivery_date string (date) or null The day the goods leave (YYYY-MM-DD), the day cost of goods sold is booked; default today. Not after today when the note is posted.
customer_reference string or null The customer's reference, e.g. its order number. (max length 200)
notes string or null Printed on the note. (max length 2000)
lines array of DeliveryNoteLineInput yes What is shipped, at least one line. (min items 1; max items 500)

Example request

curl -X POST "$ERP_URL/v1/delivery-notes" \
  -H "Authorization: Bearer $ERP_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "customer": "C-ZH",
  "customer_reference": "PO-4711",
  "delivery_date": "2026-10-12",
  "entity": "CH01",
  "lines": [
    {
      "item": "SCANNER",
      "quantity": "4"
    },
    {
      "item": "LABELPRN",
      "quantity": "10"
    }
  ],
  "warehouse": "ZRH"
}'

Responses

Status Meaning Body
201 Created DeliveryNoteOut
401 Missing or invalid API key (unauthorized). ErrorEnvelope
403 The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). ErrorEnvelope
409 The request conflicts with the data: an Idempotency-Key reused with a different request, a closed period, or an integrity rule of the database (conflict, integrity_violation). ErrorEnvelope
422 Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. HTTPValidationError

Example response (shape)

{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "entity": "string",
  "number": "string",
  "status": "cancelled",
  "customer": "string",
  "customer_name": "string",
  "warehouse": "string",
  "warehouse_name": "string",
  "delivery_date": "2026-09-21",
  "customer_reference": "string",
  "notes": "string",
  "currency": "string",
  "cost": "string",
  "posting_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "posting_number": "string",
  "journal_entry_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "invoices": [
    "string"
  ],
  "left": "string",
  "lines": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "line_no": 1,
      "item": "string",
      "item_name": "string",
      "unit": "string",
      "description": "string",
      "quantity": "string",
      "sales_line_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "sales_order": "string",
      "cost": "string",
      "invoiced": "string",
      "returned": "string",
      "left": "string"
    }
  ],
  "version": 1,
  "created_by": {},
  "created_at": "2026-09-21T09:30:00Z",
  "decided_by": {},
  "decided_at": "2026-09-21T09:30:00Z"
}

GET /v1/delivery-notes/{note}

Read a delivery note

A delivery note with its lines: the cost each line's goods left with, what was invoiced, what came back and what is left to invoice. The ETag names its version.

Required scope read (admin implies every scope)
Operation id get_delivery_note_v1_delivery_notes__note__get

Parameters

In Name Type Required Description
path note string yes Delivery note id (uuid) or number, e.g. DN-2026-000001.

Example request

curl "$ERP_URL/v1/delivery-notes/DN-2026-000001" \
  -H "Authorization: Bearer $ERP_KEY"

Responses

Status Meaning Body
200 OK DeliveryNoteOut
401 Missing or invalid API key (unauthorized). ErrorEnvelope
403 The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). ErrorEnvelope
404 The resource does not exist, or belongs to another organization (not_found). ErrorEnvelope
422 Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. HTTPValidationError

Example response (shape)

{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "entity": "string",
  "number": "string",
  "status": "cancelled",
  "customer": "string",
  "customer_name": "string",
  "warehouse": "string",
  "warehouse_name": "string",
  "delivery_date": "2026-09-21",
  "customer_reference": "string",
  "notes": "string",
  "currency": "string",
  "cost": "string",
  "posting_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "posting_number": "string",
  "journal_entry_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "invoices": [
    "string"
  ],
  "left": "string",
  "lines": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "line_no": 1,
      "item": "string",
      "item_name": "string",
      "unit": "string",
      "description": "string",
      "quantity": "string",
      "sales_line_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "sales_order": "string",
      "cost": "string",
      "invoiced": "string",
      "returned": "string",
      "left": "string"
    }
  ],
  "version": 1,
  "created_by": {},
  "created_at": "2026-09-21T09:30:00Z",
  "decided_by": {},
  "decided_at": "2026-09-21T09:30:00Z"
}

PATCH /v1/delivery-notes/{note}

Change a delivery note

Change a draft (lines replaces every line). 409 for a note that is not a draft; 412 when If-Match names an older version.

Required scope draft (admin implies every scope)
Idempotency-Key not used
ETag / If-Match If-Match optional: a changed version answers 412
Response header ETag names the current version
Operation id update_delivery_note_v1_delivery_notes__note__patch

Parameters

In Name Type Required Description
path note string yes Delivery note id (uuid) or number, e.g. DN-2026-000001.
header If-Match string or null The ETag of the version you read; a changed note answers 412. (max length 200)

Request body

application/json (required): DeliveryNoteUpdate

Field Type Required Description
customer string or null New customer (code or id).
warehouse string or null New warehouse (code or id).
delivery_date string (date) or null New delivery day.
customer_reference string or null New customer reference. (max length 200)
notes string or null New notes. (max length 2000)
lines array of DeliveryNoteLineInput or null Replaces every line. (min items 1; max items 500)

Example request

curl -X PATCH "$ERP_URL/v1/delivery-notes/DN-2026-000001" \
  -H "Authorization: Bearer $ERP_KEY" \
  -H 'If-Match: "1"' \
  -H "Content-Type: application/json" \
  -d '{
  "delivery_date": "2026-10-13"
}'

Responses

Status Meaning Body
200 OK DeliveryNoteOut, ETag header
401 Missing or invalid API key (unauthorized). ErrorEnvelope
403 The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). ErrorEnvelope
404 The resource does not exist, or belongs to another organization (not_found). ErrorEnvelope
409 The request conflicts with the data: an Idempotency-Key reused with a different request, a closed period, or an integrity rule of the database (conflict, integrity_violation). ErrorEnvelope
412 If-Match names a version that is no longer current (precondition_failed). ErrorEnvelope
422 Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. HTTPValidationError

Example response (shape)

{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "entity": "string",
  "number": "string",
  "status": "cancelled",
  "customer": "string",
  "customer_name": "string",
  "warehouse": "string",
  "warehouse_name": "string",
  "delivery_date": "2026-09-21",
  "customer_reference": "string",
  "notes": "string",
  "currency": "string",
  "cost": "string",
  "posting_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "posting_number": "string",
  "journal_entry_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "invoices": [
    "string"
  ],
  "left": "string",
  "lines": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "line_no": 1,
      "item": "string",
      "item_name": "string",
      "unit": "string",
      "description": "string",
      "quantity": "string",
      "sales_line_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "sales_order": "string",
      "cost": "string",
      "invoiced": "string",
      "returned": "string",
      "left": "string"
    }
  ],
  "version": 1,
  "created_by": {},
  "created_at": "2026-09-21T09:30:00Z",
  "decided_by": {},
  "decided_at": "2026-09-21T09:30:00Z"
}

POST /v1/delivery-notes/{note}/cancel

Cancel a delivery note

Cancel a draft: it stays, moves nothing and no longer counts against its order. 409 for a note that is not a draft (a posted note is corrected with a credit note that takes the goods back, or a stock adjustment).

Required scope draft (admin implies every scope)
Idempotency-Key not used
Operation id cancel_delivery_note_v1_delivery_notes__note__cancel_post

Parameters

In Name Type Required Description
path note string yes Delivery note id (uuid) or number, e.g. DN-2026-000001.

Example request

curl -X POST "$ERP_URL/v1/delivery-notes/DN-2026-000001/cancel" \
  -H "Authorization: Bearer $ERP_KEY"

Responses

Status Meaning Body
200 OK DeliveryNoteOut
401 Missing or invalid API key (unauthorized). ErrorEnvelope
403 The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). ErrorEnvelope
404 The resource does not exist, or belongs to another organization (not_found). ErrorEnvelope
409 The request conflicts with the data: an Idempotency-Key reused with a different request, a closed period, or an integrity rule of the database (conflict, integrity_violation). ErrorEnvelope
422 Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. HTTPValidationError

Example response (shape)

{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "entity": "string",
  "number": "string",
  "status": "cancelled",
  "customer": "string",
  "customer_name": "string",
  "warehouse": "string",
  "warehouse_name": "string",
  "delivery_date": "2026-09-21",
  "customer_reference": "string",
  "notes": "string",
  "currency": "string",
  "cost": "string",
  "posting_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "posting_number": "string",
  "journal_entry_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "invoices": [
    "string"
  ],
  "left": "string",
  "lines": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "line_no": 1,
      "item": "string",
      "item_name": "string",
      "unit": "string",
      "description": "string",
      "quantity": "string",
      "sales_line_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "sales_order": "string",
      "cost": "string",
      "invoiced": "string",
      "returned": "string",
      "left": "string"
    }
  ],
  "version": 1,
  "created_by": {},
  "created_at": "2026-09-21T09:30:00Z",
  "decided_by": {},
  "decided_at": "2026-09-21T09:30:00Z"
}

POST /v1/delivery-notes/{note}/invoice

Invoice a delivery note

Draft the sales invoice of what a posted note delivered and is not yet invoiced. Each invoice line names its delivery note line (so the invoice moves no stock) and its sales order line, at the order's price; a line without an order takes the product's list price in the customer's currency. Answers the draft invoice, to be checked, posted and sent like any other. 409 for a note that is not posted or has nothing left to invoice; 422 when a product has no price. Needs an Idempotency-Key.

Required scope draft (admin implies every scope)
Idempotency-Key required
Operation id invoice_delivery_note_v1_delivery_notes__note__invoice_post

Parameters

In Name Type Required Description
path note string yes Delivery note id (uuid) or number, e.g. DN-2026-000001.

Request body

application/json (required): DeliveryInvoiceInput

Field Type Required Description
document_date string (date) or null The invoice's day; default today, not before the delivery.

Example request

curl -X POST "$ERP_URL/v1/delivery-notes/DN-2026-000001/invoice" \
  -H "Authorization: Bearer $ERP_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "document_date": "2026-10-12"
}'

Responses

Status Meaning Body
201 Created DocumentOut
401 Missing or invalid API key (unauthorized). ErrorEnvelope
403 The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). ErrorEnvelope
404 The resource does not exist, or belongs to another organization (not_found). ErrorEnvelope
409 The request conflicts with the data: an Idempotency-Key reused with a different request, a closed period, or an integrity rule of the database (conflict, integrity_violation). ErrorEnvelope
422 Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. HTTPValidationError

Example response (shape)

{
  "withholding_code": "string",
  "withholding_rate": "string",
  "withholding_base": "0.00",
  "withholding_amount": "0.00",
  "creditable_amount": "string",
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "kind": "string",
  "party_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "party_code": "string",
  "party_name": "string",
  "party_status": "string",
  "number": "string",
  "external_number": "string",
  "status": "string",
  "document_date": "2026-09-21",
  "supply_date": "2026-09-21",
  "due_date": "2026-09-21",
  "currency": "string",
  "net_total": "string",
  "tax_total": "string",
  "total": "string",
  "functional_total": "string",
  "credits_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "journal_entry_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "source_document_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "notes": "string",
  "legal_notes": [
    "string"
  ],
  "payment_iban": "string",
  "payment_reference": "string",
  "buyer_reference": "string",
  "order_reference": "string",
  "open_amount": "string",
  "payment_blocked": false,
  "tax_fx": {},
  "tax_fx_rate": "string",
  "tax_fx_net_total": "string",
  "tax_fx_tax_total": "string",
  "cash_discount_percent": "string",
  "cash_discount_date": "2026-09-21",
  "cash_discount_amount": "string",
  "discount_percent": "string",
  "discount_amount": "0.00",
  "provenance": {},
  "created_by": {},
  "created_at": "2026-09-21T09:30:00Z",
  "version": 1,
  "missing_content": [
    {
      "party": "buyer",
      "field": "name",
      "basis": "string",
      "record_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
    }
  ],
  "source_file": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "kind": "string",
    "filename": "string",
    "content_type": "string",
    "size": 1,
    "sha256": "string",
    "created_at": "2026-09-21T09:30:00Z"
  },
  "ic": {
    "link_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "role": "mirror",
    "status": "string",
    "partner_entity": "string",
    "other_document_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  },
  "lines": [
    {
      "line_no": 1,
      "description": "string",
      "quantity": "string",
      "creditable_quantity": "string",
      "creditable_tax_amount": "string",
      "creditable_discount_amount": "string",
      "unit_price": "string",
      "account_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "product_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "obligation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "sales_line_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "credits_line": 1,
      "delivery_line_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "goods_returned": false,
      "warehouse_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "as_credited": false,
      "supply_type": "string",
      "rate_type": "string",
      "tax_category": "string",
      "use_tax": false,
      "vat_scope": "in_scope",
      "vat_scope_reason": "damages",
      "discount_percent": "string",
      "discount_amount": "0.00",
      "document_discount_amount": "0.00",
      "net_amount": "string",
      "tax_rate": "string",
      "tax_amount": "string",
      "tax": {},
      "vat_recovery_percent": "100",
      "tax_fx_net_amount": "string",
      "tax_fx_tax_amount": "string",
      "dimensions": {}
    }
  ],
  "delivery_notes": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "number": "string"
    }
  ]
}

GET /v1/delivery-notes/{note}/pdf

Download a delivery note

The delivery note as a PDF: the company's letterhead, the customer's address, the warehouse the goods left, the items and quantities, no prices. 409 for a draft or a cancelled note.

Required scope read (admin implies every scope)
Operation id get_delivery_note_pdf_v1_delivery_notes__note__pdf_get

Parameters

In Name Type Required Description
path note string yes Delivery note id (uuid) or number, e.g. DN-2026-000001.
query download boolean true sends the file as an attachment; false inline. (default false)
query language "de" | "en" | "fr" | "it" | "sv" or null de, fr, it, en or sv; default the customer's.

Example request

curl "$ERP_URL/v1/delivery-notes/DN-2026-000001/pdf" \
  -H "Authorization: Bearer $ERP_KEY"

Responses

Status Meaning Body
200 The PDF. application/pdf
401 Missing or invalid API key (unauthorized). ErrorEnvelope
403 The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). ErrorEnvelope
404 The resource does not exist, or belongs to another organization (not_found). ErrorEnvelope
422 Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. HTTPValidationError

POST /v1/delivery-notes/{note}/post

Post a delivery note

Number the draft (DN-2026-000001) and issue its goods on the delivery date: Dr cost of goods sold / Cr inventory at moving average. The note is posted with each line's cost, or pending_approval while its stock posting waits for a person. 409 when the warehouse does not hold the goods on that day or a later one already booked, or for a note that is not a draft; 422 for a delivery date after today.

Required scope post (admin implies every scope)
Idempotency-Key not used
Operation id post_delivery_note_v1_delivery_notes__note__post_post

Parameters

In Name Type Required Description
path note string yes Delivery note id (uuid) or number, e.g. DN-2026-000001.

Example request

curl -X POST "$ERP_URL/v1/delivery-notes/DN-2026-000001/post" \
  -H "Authorization: Bearer $ERP_KEY"

Responses

Status Meaning Body
200 OK DeliveryNoteOut
401 Missing or invalid API key (unauthorized). ErrorEnvelope
403 The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). ErrorEnvelope
404 The resource does not exist, or belongs to another organization (not_found). ErrorEnvelope
409 The request conflicts with the data: an Idempotency-Key reused with a different request, a closed period, or an integrity rule of the database (conflict, integrity_violation). ErrorEnvelope
422 Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. HTTPValidationError

Example response (shape)

{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "entity": "string",
  "number": "string",
  "status": "cancelled",
  "customer": "string",
  "customer_name": "string",
  "warehouse": "string",
  "warehouse_name": "string",
  "delivery_date": "2026-09-21",
  "customer_reference": "string",
  "notes": "string",
  "currency": "string",
  "cost": "string",
  "posting_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "posting_number": "string",
  "journal_entry_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "invoices": [
    "string"
  ],
  "left": "string",
  "lines": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "line_no": 1,
      "item": "string",
      "item_name": "string",
      "unit": "string",
      "description": "string",
      "quantity": "string",
      "sales_line_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "sales_order": "string",
      "cost": "string",
      "invoiced": "string",
      "returned": "string",
      "left": "string"
    }
  ],
  "version": 1,
  "created_by": {},
  "created_at": "2026-09-21T09:30:00Z",
  "decided_by": {},
  "decided_at": "2026-09-21T09:30:00Z"
}

GET /v1/entities/{entity}/delivered-not-invoiced

Delivered, not invoiced

Every line of a posted delivery note with goods delivered and not yet invoiced (less what came back, invoiced net of credit notes), oldest first, with what is left at the cost it left with: the revenue still to invoice.

Required scope read (admin implies every scope)
Operation id delivered_not_invoiced_v1_entities__entity__delivered_not_invoiced_get

Parameters

In Name Type Required Description
path entity string yes Entity code, e.g. CH01 (GET /v1/entities).
query customer string or null Only this customer's (code or id).

Example request

curl "$ERP_URL/v1/entities/CH01/delivered-not-invoiced" \
  -H "Authorization: Bearer $ERP_KEY"

Responses

Status Meaning Body
200 OK array of UninvoicedLine
401 Missing or invalid API key (unauthorized). ErrorEnvelope
403 The caller lacks the required scope (missing_right, with scope), the key belongs to no person where a person is needed (forbidden), or the approval policy denies the action (policy_denied, with action and rule_id). ErrorEnvelope
404 The resource does not exist, or belongs to another organization (not_found). ErrorEnvelope
422 Validation failed: the error envelope (validation_failed). For a malformed body or parameter its message is in sentences ("Line 2: the quantity must be above zero") and fields lists each error with pydantic's loc, type and msg beside its sentence (message) and its parts, to word it in another language: items (name and number from 1: line 2), field (its name as sent) and the rule it breaks with its limit, count and choices (none for a validator's own sentence); FastAPI's own detail list stays beside the envelope. HTTPValidationError

Example response (shape)

[
  {
    "note_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "number": "string",
    "delivery_date": "2026-09-21",
    "customer": "string",
    "customer_name": "string",
    "line_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "line_no": 1,
    "item": "string",
    "item_name": "string",
    "unit": "string",
    "delivered": "string",
    "invoiced": "string",
    "left": "string",
    "currency": "string",
    "value": "string"
  }
]

Schemas

DeliveryInvoiceInput

Field Type Required Description
document_date string (date) or null The invoice's day; default today, not before the delivery.

DeliveryNoteInput

Field Type Required Description
entity string yes Code (or id) of the entity that ships.
customer string yes Code (or id) of the customer the goods go to.
warehouse string or null Code (or id) of the warehouse they leave; default the default.
delivery_date string (date) or null The day the goods leave (YYYY-MM-DD), the day cost of goods sold is booked; default today. Not after today when the note is posted.
customer_reference string or null The customer's reference, e.g. its order number. (max length 200)
notes string or null Printed on the note. (max length 2000)
lines array of DeliveryNoteLineInput yes What is shipped, at least one line. (min items 1; max items 500)

DeliveryNoteLineInput

Field Type Required Description
item string yes Code (or id) of the stock item shipped (GET /v1/stock-items).
quantity decimal string yes Quantity shipped in the item's unit, above 0, up to six decimals. (greater than 0)
description string or null Text printed on the note; default the item's name. (min length 1; max length 500)
sales_line string (uuid) or null Id of the sales order line it delivers (GET /v1/sales-documents/{document}): an order of the same customer, of the same product. The notes of an order line never ship more than was ordered less what was closed (422).

DeliveryNoteLineOut

Field Type Required Description
id string (uuid) yes Id of the line: what an invoice line names (delivery_line).
line_no integer yes Position, from 1.
item string yes Stock item (product code).
item_name string yes Its name.
unit string yes Its unit.
description string yes Text printed on the note.
quantity string yes Quantity shipped.
sales_line_id string (uuid) or null yes The sales order line it delivers.
sales_order string or null yes The number of that order.
cost string or null yes The value the goods left with, in the functional currency: booked as cost of goods sold; null until the note posts.
invoiced string yes Quantity on invoices that count (not void or rejected) less what credit notes took back.
returned string yes Quantity that came back with credit notes.
left string yes Delivered and not invoiced: quantity less returned less invoiced.

DeliveryNoteOut

Field Type Required Description
id string (uuid) yes Delivery note id.
entity string yes Entity code.
number string or null yes DN-2026-000001, given when posted; null on a draft.
status "cancelled" | "draft" | "pending_approval" | "posted" yes draft, pending_approval (its stock posting waits for a person), posted or cancelled.
customer string yes Customer code.
customer_name string yes Customer name.
warehouse string yes Warehouse code.
warehouse_name string yes Warehouse name.
delivery_date string (date) yes The day the goods leave.
customer_reference string or null yes The customer's reference.
notes string or null yes Printed notes.
currency string yes The functional currency the cost is in.
cost string or null yes Cost of goods sold of the note; null until posted.
posting_id string (uuid) or null yes Its stock posting (GET /v1/stock-postings).
posting_number string or null yes The stock posting's number.
journal_entry_id string (uuid) or null yes The entry of cost of goods sold.
invoices array of string yes Numbers (or ids, of drafts) of the invoices of it.
left string yes Delivered and not invoiced, all lines together.
lines array of DeliveryNoteLineOut yes Its lines.
version integer yes Raised by each change.
created_by object yes Who created it.
created_at string (date-time) yes When (UTC).
decided_by object or null yes Who posted or cancelled it.
decided_at string (date-time) or null yes When (UTC).

DeliveryNoteUpdate

Field Type Required Description
customer string or null New customer (code or id).
warehouse string or null New warehouse (code or id).
delivery_date string (date) or null New delivery day.
customer_reference string or null New customer reference. (max length 200)
notes string or null New notes. (max length 2000)
lines array of DeliveryNoteLineInput or null Replaces every line. (min items 1; max items 500)

UninvoicedLine

Field Type Required Description
note_id string (uuid) yes The delivery note.
number string yes Its number.
delivery_date string (date) yes The day the goods left.
customer string yes Customer code.
customer_name string yes Customer name.
line_id string (uuid) yes The delivery note line.
line_no integer yes Its position.
item string yes Stock item (product code).
item_name string yes Its name.
unit string yes Its unit.
delivered string yes Quantity delivered less what came back.
invoiced string yes Quantity invoiced, net of credit notes.
left string yes Delivered and not invoiced.
currency string yes The functional currency of the value.
value string yes What is left, at the cost it left with.
Stabiso, the Enterprise System of Record · generated from the code and its guides · release 6f03a5e846b3