Create Sale Line
Creates a new sale line (Item, G/L, or Comment). The API consumer must provide a unique GUID for the saleLineId. Optionally supports creating addons inline via the addons array property. Returns the saleId and a refresh object with SystemIds of updated entities and totals.
Authentication
x-np-api-keystring
API Key authentication via header
Path parameters
tenant
Your Entra Tenant ID. More details.
environment
Your Business Central Environment. More details.
company
Your Business Central Company. More details.
saleId
The id of a POS sale. This can be provided by the API consumer when creating a new sale.
saleLineId
The id of a sale line within a POS sale.
Headers
x-api-version
Used for API versioning. More details.
Request
This endpoint expects an object.
type
code
Item number, G/L account, or other identifier (required unless barcode is provided)
barcode
Item barcode for lookup via item reference (alternative to code)
variantCode
description
description2
quantity
unitOfMeasure
addons
Optional list of addons to attach to this sale line
Response
This endpoint returns an object.
saleId
The id of a POS sale. This can be provided by the API consumer when creating a new sale.
receiptNo
posUnit
posStore
date
startTime
customerNo
salespersonCode
vatBusinessPostingGroup
refreshedSaleLines
Full objects for all sale lines that were created or modified
refreshedPaymentLines
Full objects for all payment lines that were created or modified
deletedSaleLines
Array of SystemIds (UUIDs) for sale lines that were deleted
deletedPaymentLines
Array of SystemIds (UUIDs) for payment lines that were deleted
totalSalesAmountInclVat
Total amount of all sale lines including VAT
totalPaymentAmount
Total amount of all payment lines
