Skip to main content
PATCH
Update Purchase Order

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

Idempotency-Key
string

Optional, client-generated key for deduplicating repeated write requests. A repeated request with the same key returns the originally recorded result instead of executing the effect again.

Required string length: 1 - 255
x-tenant-id
string<uuid>
required

The tenant ID for the target ERP instance.

Path Parameters

purchaseOrderId
string<uuid>
required

ID of the purchase order to patch. Der LieferantenBestellung Schlüssel.

Example:

"b45f6432-2462-4c6f-b00f-1d9d01000000"

Query Parameters

disableAutomaticWorkflows
boolean
required

Indicates whether automatic workflows should be suppressed for this update. Defaults to false when omitted.

Body

application/json

Request model for UpdatePurchaseOrder command endpoint. Route parameters bind from the route, query parameters from the query string, everything else from the body.

internalComment
string

Internal comment on the order, not communicated to the supplier. Editable in every status including Completed (annotations tier).

externalOrderNumber
string

The buyer's own external reference for this order (free text, at most 255 characters). Editable in every status (annotations tier). Not the order's own number, which the server assigns and which this API never lets a client change.

referenceOrderNumber
string

The reference order number — the "Zugehörige Auftragsnummer" field, free text, at most 255 characters. Editable in every status (annotations tier).

requestedDeliveryDate
string<date-time>

The delivery date requested from the supplier. Editable in every status (annotations tier) — unlike a LINE ITEM's delivery date, the header date drives no stock posting of its own.

isConfirmed
boolean

Whether the order as a whole is confirmed. Editable in every status except Completed (confirmations tier), and bidirectional — an explicit false is a valid reset. An independent flag, never derived from the line items' own confirmation flags; only a genuine false-to-true change raises the confirmation event.

status
enum<integer>

The status to transition the order into. Omit to leave the status untouched; setting the status the order already has is an accepted no-op. Permitted transitions are Open to Released, Open to InProgress, Released to InProgress, Released to Completed, InProgress to Completed, PartiallyDelivered to Completed and Overdue to Completed. Anything else is rejected with PURCHASE_ORDER_INVALID_STATUS_TRANSITION — in particular Open to Completed, any transition back to Released, and any transition out of Completed.

Available options:
0,
5,
20,
30,
50,
500

Response

The purchase order was updated successfully. The body is the full re-queried order, including its line items, so the caller can observe the side effects of the write (the in-progress timestamp, recalculated open quantities, and any stock consequence).

The full detail of a purchase order, including its line items, addresses and the supplier snapshot.

purchaseOrderId
string<uuid>
required

Unique ID of the purchase order.

Example:

"b45f6432-2462-4c6f-b00f-1d9d01000000"

supplierId
string<uuid>
required

ID of the supplier the order was placed with.

Example:

"b45f6432-2462-4c6f-b00f-1d9d01000000"

status
enum<integer>
required

The order's current status.

Available options:
0,
5,
20,
30,
50,
500
currencyIso
string
required

ISO code of the order's currency.

currencyFactor
number<decimal>
required

Conversion factor of the order's currency.

isConfirmed
boolean
required

Whether the order has been confirmed by the supplier.

lineItems
object[]
required

The order's line items.

supplierName
string

The supplier's current display name, resolved at read time. NULL if the supplier could not be resolved.

orderNumber
string

The order's own number.

externalOrderNumber
string

The buyer's own order number.

referenceOrderNumber
string

A reference order number.

requestedDeliveryDate
string<date-time>

The delivery date requested from the supplier.

createdAt
string<date-time>

Date the order was created.

warehouseId
string<uuid>

Target warehouse of the incoming goods.

Example:

"b45f6432-2462-4c6f-b00f-1d9d01000000"

companyId
string<uuid>

The company the order was placed for.

Example:

"b45f6432-2462-4c6f-b00f-1d9d01000000"

internalComment
string

Internal comment on the order, not communicated to the supplier.

deliveryAddress
object

Delivery address of the order.

billingAddress
object

Billing address of the order.

supplier
object

Snapshot of the supplier's master data at the time the order was created.