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

tenantstringRequired

Your Entra Tenant ID. More details.

environmentstringRequired

Your Business Central Environment. More details.

companystringRequired

Your Business Central Company. More details.

saleIdUUIDRequired
The id of a POS sale. This can be provided by the API consumer when creating a new sale.
saleLineIdUUIDRequired
The id of a sale line within a POS sale.

Headers

x-api-versiondateOptional

Used for API versioning. More details.

Request

This endpoint expects an object.
typeenumRequired
codestringOptional

Item number, G/L account, or other identifier (required unless barcode is provided)

barcodestringOptional

Item barcode for lookup via item reference (alternative to code)

variantCodestringOptional
descriptionstringOptional
description2stringOptional
quantitydoubleOptional
unitOfMeasurestringOptional
addonslist of objectsOptional
Optional list of addons to attach to this sale line

Response

This endpoint returns an object.
saleIdUUID
The id of a POS sale. This can be provided by the API consumer when creating a new sale.
receiptNostring
posUnitstring
posStorestring
datedate
startTimedatetime
customerNostring
salespersonCodestring
vatBusinessPostingGroupstring
refreshedSaleLineslist of objects
Full objects for all sale lines that were created or modified
refreshedPaymentLineslist of objects
Full objects for all payment lines that were created or modified
deletedSaleLineslist of strings

Array of SystemIds (UUIDs) for sale lines that were deleted

deletedPaymentLineslist of strings

Array of SystemIds (UUIDs) for payment lines that were deleted

totalSalesAmountInclVatdouble
Total amount of all sale lines including VAT
totalPaymentAmountdouble
Total amount of all payment lines