Purchase Return Order Lines Realtime-enabled
GETPOSTPATCHDELETETable: Purchase Line
The line items of a purchase return order, one row per item, G/L account, resource, or charge, carrying quantity, unit price, line discount, location, and dimensions. Deep-insertable when you create the document.
Nested under the document
These lines belong to a single purchase return order. Write them nested at /purchaseReturnOrders(<id>)/purchaseReturnOrderLines, or deep-insert the whole purchase return order in one POST. The parent key is stamped onto each line for you, so you never send it. sequence (the Business Central line number) is optional: omit it and each line takes the next number (10000, 20000, …) in the order sent; supply it only to target or re-order a specific line.
Set the item without a lookup
itemNumber writes the line's item by its Business Central number, a resolver shortcut, an alternative to wiring the line type and number by hand. type selects what the line points at (item, G/L account, resource, charge, or comment). The eight shortcutDimension{1..8}Code columns are writable per line. See Dimensions.
Set returnReasonCode to record why the goods are coming back; it carries through to the posted return document.
binCode is honoured only on non-directed, Bin-Mandatory locations. Directed put-away & pick (full WMS) locations are handled through the warehouse documents, not here.deferralCode / deferralAmount / deferralStartDate / numberOfPeriods columns: set deferralCode to attach Business Central's deferral template to the line. The resulting schedule is engine-managed. Do not write the per-period rows directly.Serial / lot / package numbers
This line owns a nested Item Tracking Lines collection, assign serial, lot, and package numbers there (deep-insertable alongside the line). The tracked quantity must reconcile with the line quantity before the document posts.