Skip to main content

Setting includeRestOfWorld to true returns an error in API version 2027-01

Starting with GraphQL Admin API version 2027-01, setting the deprecated DiscountCountriesInput.includeRestOfWorld field to true returns a BAD_REQUEST error. Apps that use this value must specify every applicable country through add before upgrading. Apps on 2026-10 and earlier keep their existing behavior while those versions are supported.

What changed

As of API version 2027-01, includeRestOfWorld remains in DiscountCountriesInput, but passing true returns this error:

includeRestOfWorld is no longer supported. Specify the applicable country codes explicitly.

Passing false retains its existing behavior, and passing null remains a no-op.

Replace includeRestOfWorld: true with an explicit list of every country where the shipping discount should apply. For example:

Before, on 2026-10 and earlier:

{
"countries": {
"add": ["CA", "US"],
"includeRestOfWorld": true
}
}

After, on 2027-01:

{
"countries": {
"add": ["CA", "US", "AU", "BR", "JP"]
}
}

Use the country codes that match the discount's intended eligibility. The codes above are only an example.

Who's affected

This change affects apps that send includeRestOfWorld: true through DiscountCountriesInput while using Admin GraphQL API version 2027-01 or later. Public apps that explicitly request unstable receive the new behavior as soon as it is deployed.

Apps that send false or null aren't affected by this behavior change. Apps on 2026-10 and earlier continue to use the existing behavior while those versions are supported.

Why this matters

Rest of World is a legacy shipping-zone concept that is being retired as shops move to market-driven shipping. In that model, shipping-discount eligibility is represented by explicit countries rather than a dynamic Rest of World bucket. Requiring apps that send includeRestOfWorld: true to provide country codes prevents them from depending on a concept that will no longer exist.

What to do

Before upgrading to 2027-01:

  1. Search your discount create and update mutations for includeRestOfWorld: true.
  2. Replace it with the complete applicable country list in add.
  3. Stop sending includeRestOfWorld so your app is prepared for its eventual removal from the schema.
  4. Test the updated mutations against 2027-01 in a development store and confirm the discount contains the expected countries.

If you can't migrate immediately, continue using 2026-10 or another earlier supported API version until the migration is complete.

Related docs

Was this page helpful?