Order Import API - Voucher Processing
Supplement for sales order import covering voucher purchase and voucher redemption handling.
Purpose
This page describes how to submit voucher lines correctly in the JSON-REST sales order import.
Relevant Endpoint
POST /api/BEterna/Import/v2.0/companies(<company-system-id>)/orders
Voucher Line Types
type = 2: voucher purchasetype = 5: voucher redemption
Core Rules
voucherCodeis mandatory for both voucher line types.- For
type = 5,singlePricemust be negative or0. subtotalis calculated withouttype = 5lines.totalAmountincludes all lines, includingtype = 5.- Redemption total must not exceed subtotal.
Result
- Voucher scenarios are imported consistently and processed correctly in BC.