salesOrderLines resource type (v1.0)

NEW VERSION This is v1.0 of the Business Central API. For the newest version, see Business Central API (V2.0).

Represents a line on a sales order in Business Central.

Note


For information about enabling APIs for Business Central see Enabling the APIs for Dynamics 365 Business Central.

Methods

MethodReturn TypeDescription
GET salesOrderLinessalesOrderLinesGets a sales order line object.
POST salesOrderLinessalesOrderLinesCreates a sales order line object.
PATCH salesOrderLinessalesOrderLinesUpdates a sales order line object.
DELETE salesOrderLinesnoneDeletes a sales order line object.

Properties

PropertyTypeDescription
idGUIDThe ID of the order line.
documentIdGUIDThe ID of the parent order.
sequencenumericThe line sequence number.
itemIdGUIDThe Id of the item in the order line.
accountIdGUIDThe Id of the Account that will be used for this line. lineType will automatically be set to "Account" if this is set.
lineTypestringThe type of the line. Can be Comment,Account,Item,Resource,Fixed Asset,Charge
lineDetailscomplexThe details of the line.
descriptionstringA description of the item in the order line.
unitOfMeasureIdGUIDThe Id of the unit of measure in the order line.
unitOfMeasureNAV.UnitOfMeasureThe unit of measure complex type.
quantitynumericThe quantity of the item in the order line.
unitPricenumericThe unit price of each individual item in the order line.
discountAmountnumericThe line discount amount.
discountPercentnumericThe line discount percent.
discountAppliedBeforeTaxbooleanSpecified if the discount is applied before tax. Read-Only.
amountExcludingTaxnumericThe line amount excluding the tax. Read-Only.
taxCodestringThe tax code for the line.
taxPercentnumericThe tax percent for the line. Read-Only.
totalTaxAmountnumericThe total tax amount for the line. Read-Only.
amountIncludingTaxnumericThe total amount for the line including tax. Read-Only.
invoiceDiscountAllocationnumericThe invoice discount allocation is the order discount distributed on the total amount. Read-Only.
netAmountnumericThe net amount is the amount including all discounts (taken from order header). Read-Only.
netTaxAmountnumericThe net tax amount is the tax amount calculated from net amount. Read-Only.
netAmountIncludingTaxnumericThe net amount including tax is the total net amount including tax. Read-Only.
shipmentDatedateThe date the item in the line is expected to ship.
shippedQuantitynumericThe quantity of items from the order already shipped.
invoicedQuantitynumericThe quantity of items from the order already invoiced.
invoiceQuantitynumericThe quantity of items from the order to be invoiced.
shipQuantitynumericThe quantity of items from the order to be shipped.

Relationships

A Sales Order (documentId) must exist in the Sales Orders table.

An Item (itemId) must exist in the Item table.

An Account (accountId) must exist in the Accounts table.

A Unit of Measure (unitOfMeasure) must exist in the Unit of Measure table.

JSON representation

Here is a JSON representation of the resource.

  "value": [
    {
      "documentId": "GUID",
      "sequence": "decimal",
      "itemId": "GUID",
      "accountId": "GUID",
      "lineType": "string",
      "lineDetails": {NAV.documentLineObjectDetails},
      "description": "string",
      "unitOfMeasure": {NAV.UnitOfMeasure},
      "unitPrice": "decimal",
      "quantity": "decimal",
      "discountAmount": "decimal",
      "discountPercent": "decimal",
      "discountAppliedBeforeTax": "boolean",
      "amountExcludingTax": "decimal",
      "taxCode": "string",
      "taxPercent": "decimal",
      "totalTaxAmount": "decimal",
      "amountIncludingTax": "decimal",
      "invoiceDiscountAllocation": "decimal",
      "netAmount": "decimal",
      "netTaxAmount": "decimal",
      "netAmountIncludingTax": "decimal",
      "shipmentDate": "Date",
      "shippedQuantity": "decimal",
      "invoicedQuantity": "decimal",
      "invoiceQuantity": "decimal",
      "shipQuantity": "decimal"
    }
  ]

Get Sales Order Line
Create Sales Order Line
Update Sales Order Line
Delete Sales Order Line