Unable to create & combine discount coupons with Shopify GraphQL

Topic summary

A developer encountered an error when attempting to create a discount coupon combined with shipping discounts using Shopify’s GraphQL API. The error message indicated that the combinesWith field is not defined on DiscountCodeBasicInput.

Root Cause:

  • The combinesWith field is only available in Shopify API version 2022-07 and later
  • The error occurs when using API version 2022-04 or when no API version is specified in the endpoint URL (which defaults to the oldest supported version)

Resolution:

  • Shopify Developer Support confirmed the issue and advised upgrading to API version 2022-07 or newer
  • If the problem persists after upgrading, the developer was asked to provide debugging details including the x-request-id response header, timeframe, and API version used

The issue appears resolved through API version upgrade guidance.

Summarized with AI on November 22. AI used: claude-sonnet-4-5-20250929.

I am trying to cerate a new discount coupon and combining it with shippingDiscounts, but its returning following error:

Variable $basicCodeDiscount of type DiscountCodeBasicInput! was provided invalid value for combinesWith (Field is not defined on DiscountCodeBasicInput)
Here is my mutation:

mutation discountCodeBasicCreate($basicCodeDiscount: DiscountCodeBasicInput!) {
  discountCodeBasicCreate(basicCodeDiscount: $basicCodeDiscount) {
    codeDiscountNode {
      id
    }
    userErrors {
      field
      message
    }
  }
}

Input:

{
  "basicCodeDiscount": {
    "title": "testing",
    "code": "testing",
     "combinesWith": {
      "shippingDiscounts": true
    },
    "startsAt": "2022-06-21T00:00:00Z",
    "endsAt": "2023-09-21T00:00:00Z",
    "customerSelection": {
      "all": true
    },
    "customerGets": {
      "value": {
        "percentage": 0.2
      },
      "items": {
        "all": true
      }
    },
    "appliesOncePerCustomer": true
  }
}

Hey @monika_mni ,

Through testing I was able to recreate this error using API version 2022-04, or when not defining the API version in my endpoint URL (the oldest support version is used, currently 2022-04). The field combinesWith is only available in API versions 2022-07 onwards.

If you are still able to replicate this across versions where the field is available, please feel free to share an example x-request-id response header value, timeframe (within the last 7 days) and API version used - this will help our team locate logs and investigate the error further.

Cheers!
@awwdam - Shopify Developer Support

1 Like