Skip to navigation

Approve Age Check

Records that the age check of the sale has been passed, covering the limit the sale requires right now. With method staff, the credential is the POS unit password of a salesperson, typed as a PIN or scanned from a badge. The salesperson must not be blocked, and when they are assigned a POS Unit Group it must include the sale’s POS unit. Returns 403 with code age_check_rejected when the credential is not accepted, and 400 for an unsupported method. Returns the sale with its lines and the updated ageCheck. A sale without restricted lines is returned unchanged, with no approval recorded.

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.

Headers

x-api-versiondateOptional

Used for API versioning. More details.

Request

This endpoint expects an object.
methodenumRequired
How the age check was approved. More methods, such as digital age proofs, will be added here.
Allowed values:
credentialstringRequired

For staff, the salesperson’s POS unit password. A badge scan sends the same value.

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
genBusinessPostingGroupstring
ageCheckobject

Whether the sale needs an age check and whether it has one. requiredLimit is the highest ageLimit among the sale lines, 0 when nothing is restricted. approved is true when requiredLimit is 0 or an approval covering at least that limit is recorded on the sale. An approval covers the limit required when it was given, so a line with a higher limit added later needs a new approval, while removing lines never revokes it. The approval does not survive park and resume.

saleLineslist of objectsOptional
paymentLineslist of objectsOptional
totalSalesAmountInclVatdoubleOptional

Total amount of all sale lines including VAT (only present when withLines=true)

totalPaymentAmountdoubleOptional

Total amount of all payment lines (only present when withLines=true)