Create Sale Line Addon

Creates an addon line for an existing sale line. The API consumer must provide a unique GUID for the addon line ID. Use this endpoint when you need to add addons after the parent line has been created. 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.
addonLineIdUUIDRequired
The unique GUID for this new addon line

Headers

x-api-versiondateOptional

Used for API versioning. More details.

Request

This endpoint expects an object.
parentLineIdUUIDRequired
The SystemId of the parent sale line this addon applies to
addonNostringRequired
The addon configuration number
addonLineNointegerRequired
The specific line within the addon configuration
quantitydoubleOptional

Quantity of the addon (defaults to 1)

selectedOptionLineNointegerOptional

For Select-type addons, the selected option line number

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