Skip to content
CommerceGeek home

draftOrderCreate and draftOrderUpdate now need apply_discounts_to_draft_orders to add discounts

In all supported API versions, adding discounts via draftOrderCreate or draftOrderUpdate as a staff member without the permission returns a top-level ACCESS_DENIED error, not a userError.

A coupon is held back from a draft order form by a padlock over the slot.
Published
6 Dec 2026
API version
2026-01
Affects
GraphQL Admin API, draftOrderCreate, draftOrderUpdate, DraftOrderInput

What changed

In all supported API versions, draftOrderCreate and draftOrderUpdate now reject any change that adds a discount when the request runs as a staff member who doesn't have the apply_discounts_to_draft_orders permission. Two kinds of change count as adding a discount through DraftOrderInput:

  • Adding a discount code to discountCodes that the draft order doesn't already have.

  • Setting acceptAutomaticDiscounts to true on a draft order that doesn't already accept automatic discounts.

For draftOrderCreate, any non-empty discountCodes or acceptAutomaticDiscounts: true counts as adding a discount, because the draft order doesn't exist yet.

In these cases the mutation returns a top-level GraphQL error with the code ACCESS_DENIED and null for the mutation payload. The error does not appear in userErrors, and the draft order is not saved.

Keeping or removing a draft order's existing discounts still works.

Who is affected

Your app is affected if it does all of the following:

  • Calls draftOrderCreate or draftOrderUpdate as a staff member.

  • Expects to add discount codes or enable automatic discounts.

  • Does not ensure that the staff member has the apply_discounts_to_draft_orders permission.

Requests that don't act as a staff member, such as requests made with an offline access token, are not affected.

The changelog entry carries the version tag 2026-01, but it states that the behaviour applies in all supported API versions. Staying on an older supported version does not avoid it.

Example: before and after

This draftOrderUpdate request adds a discount code and turns on automatic discounts for an existing draft order. The request is the same before and after the change.

mutation draftOrderUpdate($id: ID!, $input: DraftOrderInput!) {
  draftOrderUpdate(id: $id, input: $input) {
    draftOrder {
      id
      discountCodes
      acceptAutomaticDiscounts
    }
    userErrors {
      field
      message
    }
  }
}
The mutationUnverified example.
{
  "id": "gid://shopify/DraftOrder/276395349",
  "input": {
    "discountCodes": ["SUMMER10"],
    "acceptAutomaticDiscounts": true
  }
}
The variablesUnverified example.

What differs is the failure path. The changelog does not show the earlier response for a staff member without the permission, so it is not reproduced here. Failure handling that relied only on userErrors is what needs to change.

If the staff member does not have the apply_discounts_to_draft_orders permission, the response is now a top-level error, and data.draftOrderUpdate is null:

{
  "errors": [
    {
      "message": "Access denied for draftOrderUpdate field. Required access: `write_draft_orders` access scope. Also: The user must have access to manage draft orders.",
      "locations": [{ "line": 2, "column": 3 }],
      "path": ["draftOrderUpdate"],
      "extensions": {
        "code": "ACCESS_DENIED",
        "documentation": "https://shopify.dev/api/usage/access-scopes",
        "requiredAccess": "`write_draft_orders` access scope. Also: The user must have access to manage draft orders."
      }
    }
  ],
  "data": {
    "draftOrderUpdate": null
  }
}
Response without the permissionUnverified example.

draftOrderCreate returns the same error, with draftOrderCreate in the message and path, and null for data.draftOrderCreate. Because the draft order does not exist yet, any non-empty discountCodes or acceptAutomaticDiscounts: true counts as adding a discount.

What to do

  • Check the top-level errors array, not only userErrors, for an ACCESS_DENIED error from draftOrderCreate or draftOrderUpdate. The mutation returns null for its payload in this case, so code that reads userErrors from the payload has nothing to read.

  • If your app needs to add discounts, ask the merchant to give the staff member the **Apply discounts** permission under **Draft orders**. This corresponds to the apply_discounts_to_draft_orders permission.

Deadline

No calendar deadline is announced. The changelog is dated November 18, 2026, but that is the date Shopify announced the change, not a date by which you must act.

The changelog says the behaviour applies in all supported API versions, so treat it as already in effect. It gives no separate effective date, and the sources do not say when it started. Upgrading to a newer API version is not needed to trigger it, and staying on an older supported version does not avoid it.

Get the weekly digest

One email every Monday: what changed in Shopify, the deadlines coming up and what’s been announced, plus the week’s new guides. Free, and you can unsubscribe in one click.

Sources

  1. draftOrderCreate and draftOrderUpdate require the apply_discounts_to_draft_orders permission to add discounts · Shopify · accessed 18 Nov 2026
  2. draftOrderCreate - GraphQL Admin · Shopify.dev · accessed 18 Nov 2026
  3. draftOrderUpdate - GraphQL Admin · Shopify.dev · accessed 18 Nov 2026
  4. DraftOrderInput - GraphQL Admin · Shopify.dev · accessed 18 Nov 2026
  5. About Shopify API versioning · Shopify.dev · accessed 18 Nov 2026

AI-assisted, reviewed by Scott. Every claim is checked against the sources above.