# Sales Order Lines _(Realtime-enabled)_

`GET` `POST` `PATCH` `DELETE` _(Table: Sales Line)_

```
eOne/core/v1.0/salesOrderLines
```

The line items of a sales 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 sales order. Write them nested at `/salesOrders(<id>)/salesOrderLines`, or **deep-insert** the whole sales 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](https://eonesolutions.github.io/eone-bc-integration/resolvers.md) 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](https://eonesolutions.github.io/eone-bc-integration/dimensions.md).

> **Note:** `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.

> **Note:** Revenue/expense **deferral** is exposed with flat `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.

## Weight and volume are per unit

`grossWeight`, `netWeight` and `unitVolume` are read-only and describe **one unit**, not the line, Business Central copies them from the item when the line is created. Multiply by `quantity` to get the line's contribution to the consignment, or read `totalGrossWeight` / `totalNetWeight` / `totalVolume` on the [sales order](https://eonesolutions.github.io/eone-bc-integration/core-salesOrders.md), which do that sum for you.

> **Caution:** The values carry no unit of measure. They are in whatever mass and volume units the company is configured in. The integration map is what decides they mean kg or lb, m³ or ft³.

## Serial / lot / package numbers

This line owns a nested [Item Tracking Lines](https://eonesolutions.github.io/eone-bc-integration/core-itemTrackingLines.md) 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.

## Sales Order Lines fields

_API column → BC field._

**Legend**

- _(req)_ required on create
- _(res)_ resolver
- _(cur)_ currency-translated
- _(ro)_ read-only
- _(ext)_ added to this endpoint by another extension (BC field name shown; its API column name is not known here)

| API | BC field | Notes |
| --- | --- | --- |
| `id` | SystemId | BC record GUID. _(ro)_ |
| `bcCompanyId` | bcCompanyId | The company this row belongs to - the same GUID that appears in the request URL. Present on every endpoint so a store pooling several companies can keep them apart without relying on which URL it called. _(ro)_ |
| `bcCompanyName` | bcCompanyName | The name of the company this row belongs to. _(ro)_ |
| `documentNumber` | Document No. | Parent order; stamped automatically. _(ro)_ |
| `documentId` | documentId | Parent order GUID. _(ro)_ |
| `integrationId` | EONE Integration Id | The store's line key. See integration-id. |
| `sequence` | Line No. |  |
| `lineType` | Type | Polymorphic line type (Item, G/L Account, Resource, Fixed Asset, Charge). |
| `lineObjectNumber` | No. | The object referenced, keyed by lineType. |
| `itemNumber` | itemNumber | Convenience writer: sets Type=Item and No. in one shot. _(res)_ |
| `description` | Description |  |
| `description2` | Description 2 |  |
| `unitOfMeasureCode` | Unit of Measure Code |  |
| `quantity` | Quantity |  |
| `unitPrice` | Unit Price |  |
| `discountAmount` | Line Discount Amount |  |
| `discountPercent` | Line Discount % |  |
| `amountExcludingTax` | Line Amount | _(ro)_ |
| `taxCode` | Tax Group Code |  |
| `taxPercent` | VAT % | _(ro)_ |
| `totalTaxAmount` | totalTaxAmount | _(ro)_ |
| `amountIncludingTax` | Amount Including VAT | _(ro)_ |
| `invoiceDiscountAllocation` | Inv. Discount Amount | _(ro)_ |
| `netAmount` | Amount | _(ro)_ |
| `netTaxAmount` | netTaxAmount | _(ro)_ |
| `netAmountIncludingTax` | Amount Including VAT | _(ro)_ |
| `expectedShipmentDate` | Planned Shipment Date |  |
| `shipmentDate` | Shipment Date |  |
| `itemVariantCode` | Variant Code |  |
| `locationCode` | Location Code | See locations. |
| `locationIntegrationId` | locationIntegrationId | Resolve the line location by its Integration Id instead of locationCode. See locations. _(res)_ |
| `shipFromName` | shipFromName | Origin name the goods ship from, resolved from the line location. Line-level because each line can ship from a different location. _(ro)_ |
| `shipFromAddressLine1` | shipFromAddressLine1 | Origin address the goods ship from. _(ro)_ |
| `shipFromAddressLine2` | shipFromAddressLine2 | _(ro)_ |
| `shipFromCity` | shipFromCity | _(ro)_ |
| `shipFromCounty` | shipFromCounty | _(ro)_ |
| `shipFromPostCode` | shipFromPostCode | _(ro)_ |
| `shipFromCountryRegionCode` | shipFromCountryRegionCode | Origin country/region the goods ship from. _(ro)_ |
| `binCode` | Bin Code | Bin at the line location. Applies only at non-directed Bin Mandatory locations; directed (WMS) locations assign bins on warehouse documents. |
| `itemReferenceNumber` | Item Reference No. | Item cross-reference for the line: a barcode (UPC/EAN/GTIN) or customer/vendor item number. See item references. |
| `grossWeight` | Gross Weight | Gross weight per unit (goods plus packaging), copied from the item. Multiply by quantity for the line weight a carrier bills on. Expressed in the company's mass unit. Business Central carries no unit on the value, so the integration map decides whether that is kg, lb, or something else. _(ro)_ |
| `netWeight` | Net Weight | Net weight per unit (goods only), copied from the item. Multiply by quantity for the line net weight a customs declaration asks for. Expressed in the company's mass unit. Business Central carries no unit on the value, so the integration map decides whether that is kg, lb, or something else. _(ro)_ |
| `unitVolume` | Unit Volume | Volume per unit, copied from the item, for volumetric (dimensional) carrier pricing. Multiply by quantity for the line volume. Expressed in the company's volume unit. Business Central carries no unit on the value, so the integration map decides whether that is m3, ft3, or something else. _(ro)_ |
| `shortcutDimension1Code` | Shortcut Dimension 1 Code | Per-line override. See dimensions. |
| `shortcutDimension2Code` | Shortcut Dimension 2 Code | Shortcut dimension 2. See Dimensions. |
| `shortcutDimension3Code` | EONE Shortcut Dim 3 Code | Shortcut dimension 3. See Dimensions. |
| `shortcutDimension4Code` | EONE Shortcut Dim 4 Code | Shortcut dimension 4. See Dimensions. |
| `shortcutDimension5Code` | EONE Shortcut Dim 5 Code | Shortcut dimension 5. See Dimensions. |
| `shortcutDimension6Code` | EONE Shortcut Dim 6 Code | Shortcut dimension 6. See Dimensions. |
| `shortcutDimension7Code` | EONE Shortcut Dim 7 Code | Shortcut dimension 7. See Dimensions. |
| `shortcutDimension8Code` | EONE Shortcut Dim 8 Code | Shortcut dimension 8. See Dimensions. |
| `dimensionSetId` | Dimension Set ID | The dimension set this record carries. Join it to the dimensionSetEntries endpoint to resolve the full set of dimension codes and values, including any beyond the eight shortcut dimension columns. _(ro)_ |
| `shippedQuantity` | Quantity Shipped | _(ro)_ |
| `invoicedQuantity` | Quantity Invoiced | _(ro)_ |
| `deferralCode` | deferralCode | Assigns a Business Central deferral template to this line so the amount is recognized across multiple periods; Business Central generates the schedule from the template. Clear it to remove the schedule. The line must post to G/L (Item, G/L Account, Resource, Charge, Fixed Asset). |
| `deferralAmountToDefer` | deferralAmountToDefer | Optional override of the total amount to defer for this line; defaults to the line amount. Only applies when deferralCode is set. |
| `deferralStartDate` | deferralStartDate | Optional override of the first period's posting date; defaults from the template and the document posting date. Only applies when deferralCode is set. |
| `deferralNoOfPeriods` | deferralNoOfPeriods | Optional override of the number of periods the amount is spread over; defaults from the template. Only applies when deferralCode is set. |
| `deferralCalcMethod` | deferralCalcMethod | Read-only. How the amount is distributed across periods, taken from the deferral template. Assign a different template to change it. _(ro)_ |
| `deferralScheduleDescription` | deferralScheduleDescription | Read-only description of the generated deferral schedule. _(ro)_ |
| `lastModifiedDateTime` | SystemModifiedAt | _(ro)_ |

## Related pages

Nested under [Sales Orders](https://eonesolutions.github.io/eone-bc-integration/core-salesOrders.md).

Collections nested under this endpoint:

- [Item Tracking](https://eonesolutions.github.io/eone-bc-integration/core-itemTrackingLines.md)
