Create Coupon

Beta
Creates a new coupon.

Path parameters

tenantstringRequired

Your Entra Tenant ID. More details.

environmentstringRequired

Your Business Central Environment. More details.

companystringRequired

Your Business Central Company. More details.

Headers

AuthorizationstringRequired

Bearer authentication of the form Bearer <token>, where token is your auth token.

x-api-versiondateOptional

Used for API versioning. More details.

Request

This endpoint expects an object.
requestIdUUIDRequired
A unique identifier for the request to ensure idempotency.
couponTypestringRequired
The type of coupon, which links to a template defining its behavior.
descriptionstringRequired
A short description for the coupon.
discountTypeenumRequired
The type of discount the coupon provides.
Allowed values:
barcodestringOptional
The barcode or external reference number. If omitted, a number may be generated from a number series.
discountAmountdoubleOptional
The fixed discount amount. Required if discountType is 'AMOUNT'.
discountPercentdoubleOptional
The discount percentage. Required if discountType is 'PERCENTAGE'.
maxDiscountAmountdoubleOptional
The maximum discount amount that can be applied from this coupon.
customerNostringOptional
Optionally assign the coupon to a specific customer.
expiresAtdatetimeOptional
The date and time when the coupon expires. If omitted, the expiration is determined by the coupon type settings.

Response

This endpoint returns an object.
idUUID
The unique system identifier for the coupon.
numberstring
The internal coupon number from the number series.
typestring
The type of voucher, which carries the setup in NP Retail.
descriptionstring
A short description of the coupon.
barcodestring

A unique, human-readable reference number, often used for barcodes.

statusenum
The current status of the coupon.
Allowed values:
discountTypeenum
The type of discount the coupon provides.
Allowed values:
validFromdatetime
The date and time from which the coupon is valid.
maxUsesPerSaleinteger
The maximum number of times this coupon can be used in a single sale.
issueDatedate
The date the coupon was first issued.
discountAmountdouble or null
The fixed discount amount, if applicable.
discountPercentdouble or null
The discount as a percentage, if applicable.
maxDiscountAmountdouble or null
The maximum discount amount that can be applied.
validUntildatetime or null
The date and time when the coupon expires.
customerNostring or null
The customer number this coupon is assigned to, if any.
remainingQuantitydouble or null
The remaining times the coupon can be used, if applicable.