Purchase Invoice Lines Realtime-enabled
GETPOSTPATCHDELETETable: Purchase Line
The line items of a purchase invoice, 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 invoice. Write them nested at /purchaseInvoices(<id>)/purchaseInvoiceLines, or deep-insert the whole purchase invoice 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.
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.