Aller au contenu

Nouveau : le connecteur B2Brouter pour Claude.Ajoutez-le à ClaudeLisez le guide

Log in

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.

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 Quantity

When 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_expense and apply_taxes_to_charge.
  • On the lines (invoice_lines_attributes): discount_amount, discount_percent, discount_text, charge_amount, charge_percent and charge_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.
  • amount for a fixed amount, or percentage for a percentage.
  • description for the text or the reason.
  • is_reimbursable_expense and apply_taxes replace charge_is_reimbursable_expense and apply_taxes_to_charge.
{
"invoice": {
"discount_percent": 5,
"discount_text": "Volume discount",
"invoice_lines_attributes": [
{ "quantity": 2, "price": 50, "discount_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.