Migration guide v2025-10-13 → v2026-03-02
Everything you need to update your code.
Ce contenu n’est pas encore disponible dans votre langue.
This guide helps you upgrade from X-B2B-API-Version: 2025-10-13 to X-B2B-API-Version: 2026-03-02, focusing on what you need to change, not just what changed.
Invoice Calculation — base_quantity:
Section titled “Invoice Calculation — base_quantity:”A new base_quantity parameter has been added to invoice lines, allowing prices quoted per multiple units (e.g., price per 100 pieces). The formula is now:
Line Base Amount = Quantity * Price / Base QuantityWhen base_quantity is 1 (the default), this is backward-compatible with existing integrations.
In API responses, the price field now returns the original price as provided, and base_quantity is returned separately. In prior versions, the price field in responses contained the effective unit price (price / base_quantity).
See the Invoice Calculation Guide for full details and examples.
Discounts and charges: allowance_charges_attributes only
Section titled “Discounts and charges: allowance_charges_attributes only”The flat discount and charge fields have been removed. If you keep sending them, the API returns no error: it ignores them, and the invoice is created without the discount or the charge. v2025-10-13 already accepts allowance_charges_attributes, so you can make this change before you change version.
Removed fields:
- On the invoice:
discount_amount,discount_percent,discount_text,charge_amount,charge_percent,charge_reason,charge_is_reimbursable_expenseandapply_taxes_to_charge. - On the lines (
invoice_lines_attributes):discount_amount,discount_percent,discount_text,charge_amount,charge_percentandcharge_reason.
Send each discount or charge as an item of allowance_charges_attributes, on the invoice or on the line:
allowance_charge_indicator:"allowance"for a discount,"charge"for a charge.amountfor a fixed amount, orpercentagefor a percentage.descriptionfor the text or the reason.is_reimbursable_expenseandapply_taxesreplacecharge_is_reimbursable_expenseandapply_taxes_to_charge.
{ "invoice": { "discount_percent": 5, "discount_text": "Volume discount", "invoice_lines_attributes": [ { "quantity": 2, "price": 50, "discount_amount": 10 } ] }}{ "invoice": { "allowance_charges_attributes": [ { "allowance_charge_indicator": "allowance", "percentage": 5, "description": "Volume discount" } ], "invoice_lines_attributes": [ { "quantity": 2, "price": 50, "allowance_charges_attributes": [ { "allowance_charge_indicator": "allowance", "amount": 10 } ] } ] }}Responses do not return these fields either. Read the discounts and charges in allowance_charges, on the invoice and on each line.
The table for each field is in the "Removed" section of the v2026-03-02 changelog. The calculation is in Invoice calculation.