Orders API: offer_discount now reflects order amendments

offer_discount on an order now follows the order's amendments. Previously it kept the value from checkout, even after items were removed or substituted.

What changed

  • Amended orders: offer_discount is the discount that still applies after the amendment: the discounts on the remaining items plus any basket discount.
  • Redeliveries: a redelivery reports the discount of the original order, including any amendment made to it.
  • Totals: total_price and partner_order_total are never negative. A value that would fall below zero is reported as zero.
  • Free delivery: offer_discount does not include free delivery. This is unchanged, and the field description now says so.

Where

Order webhooks (legacy and order events) and the Get Order / Get Orders endpoints.

What you need to do

Nothing. No fields were added or removed, and orders that are not amended are unaffected. If you reconcile order totals against offer_discount, amended orders will now match the items that were actually fulfilled.