← All breaking-change reports

Shopify deprecation: discountedUnitPrice on DraftOrderLineItem Customer Account API deprecation

shopify · deprecation · 2026-07-01 · upstream source

What changed

From the upstream announcement:

The discountedUnitPrice field on the DraftOrderLineItem object in the Customer Account API is now deprecated. Use approximateDiscountedUnitPrice instead. This new field calculates the discounted total divided by the quantity, resulting in an approximate per-unit price reduction. Update your queries to use approximateDiscountedUnitPrice .

Who is affected

Codebases that call the Shopify API surface named above.

To find out whether your repo is hit — file and line number, no code leaving your machine:

npx mendapi scan --repo .

How to fix it

mendapi ships a deterministic migration pack for this change (shopify-customer-account-draftorder-price). Preview the patch locally (dry-run is the default; nothing is modified without --apply):

npx mendapi fix --repo . --migration shopify-customer-account-draftorder-price

The pack is idempotent, gold-regression tested, and safe on partially migrated code.

Detected and tracked by mendapi — Dependabot for every API you depend on. Scans run locally; your code never leaves your machine.

Related

Pre-release. Change data is recorded from upstream provider releases, changelogs and OpenAPI spec diffs; every article links its source.