salesInvoiceLines 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 invoice 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 salesInvoiceLinessalesInvoiceLinesGets a sales invoice line object
POST salesInvoiceLinessalesInvoiceLinesCreates a sales invoice line object.
PATCH salesInvoiceLinessalesInvoiceLinesUpdated a sales invoice line object.
DELETE salesInvoiceLinesnoneDeletes a sales invoice line object.

Properties

PropertyTypeDescription
documentIdGUIDThe ID of the parent invoice.
sequencenumericThe line sequence number.
itemIdGUIDThe Id of the item in the invoice 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 invoice line.
unitOfMeasureIdGUIDThe unit of measure for the invoice line.
unitOfMeasureNAV.UnitOfMeasureThe unit of measure complex type.
quantitynumericThe quantity of the item in the invoice line.
unitPricenumericThe unit price of each individual item in the invoice 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 invoice discount distributed on the total amount. Read-Only.
netAmountnumericThe net amount is the amount including all discounts (taken from invoice 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.

Relationships

A Sales Invoice (documentId) must exist in the Sales Invoices 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",
      "unitOfMeasureId": "GUID",
      "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"
    }
  ]

Get Sales Invoice Line
Create Sales Invoice Line
Update Sales Invoice Line
Delete Sales Invoice Line