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 purchase
  • type = 5: voucher redemption

Core Rules

  • voucherCode is mandatory for both voucher line types.
  • For type = 5, singlePrice must be negative or 0.
  • subtotal is calculated without type = 5 lines.
  • totalAmount includes all lines, including type = 5.
  • Redemption total must not exceed subtotal.

Result

  • Voucher scenarios are imported consistently and processed correctly in BC.