Item validations
Item data
Creation
commodity_code: one ofG(Goods),S(Services),B(Both).hs_code: required forG/B; must NOT be set forS.service_accounting_code: required forS/B; must NOT be set forG.standard_item_scheme: valid ISO ICD 6523 scheme identifier.origin_country_code: valid ISO 3166-1 alpha-2.tax_category_code: one ofS, E, O, AE, Z, N.- Returns
AlreadyExistsifitem_codealready exists for the branch. - AE (reverse charge) note: an item used on an invoice with tax category
AEmust havestandard_item_id+standard_item_scheme = 0160(GS1/GLN) - checked at invoice creation time, not at item creation.
Update
Only name/description can change; there are no format constraints on either.
Line items (per item on an invoice/credit note)
item_idmust reference an existing item in the branch; no duplicates in the same request.quantitymust be > 0;price_amountmust be ≥ 0 (0 valid for free goods).gross_price/price_discount, if either set →price_amount = gross_price − price_discount.unit_of_measure_codemust be valid.item_nature_coderequired whentax_category_code = AE; must be a valid goods type code.tax_exemption_reason_coderequired whentax_exemption_reasonset.- Item-level allowances/charges:
tax_category_codemust not be set (only doc-level A/Cs carry a category); samebase_amount × multiplier_rate = amountand reason-code rules as doc-level.
- Per-category VAT rate rules:
| Category | Rate | Exemption reason |
|---|---|---|
| S - Standard | exactly 5% | must NOT be set |
| E - Exempt | 0 | required |
| O - Out of scope | 0 (omit) | must NOT be set |
| AE - Reverse charge | >0 | n/a |
| Z - Zero-rated | 0 | must NOT be set |
| N - Margin scheme | >0 | must NOT be set |
- N items can't mix with other categories on the same document; forbidden entirely on invoice types 480/81 (restricted to E/O/Z there).
Line-level calculations
lineBaseAmount = priceAmount × quantityLineExtensionAmount = lineBaseAmount + lineCharges − lineAllowances- Line
TaxAmount: only S is taxed (Round(LineExtensionAmount × taxRate)); E/Z/O/AE/N all contribute 0 (N's mandatory nonzero rate is validation-only - the margin scheme's actual FTA-reporting tax computation isn't implemented anywhere in the codebase; only the "zero in totals" half exists). ItemPriceExtensionAmount = LineExtensionAmount + TaxAmount.ItemPriceExtensionTaxAmount/currency are computed in document currency, not AED - a deliberate, documented deviation from the literal Schematron text (code follows the official PEPPOL-AE sample instead).
Updated about 1 month ago
Did this page help you?
