返回情报首页
平台更新北美

Shopify API 2027-01 将拒绝 includeRestOfWorld: true

面向北美相关应用的折扣国家设置需改为明确国家代码;是否需要处理取决于应用传值和 API 版本。

Ecomwith Editorial电商情报编辑部

首次发布
最后更新
风险等级
low

来源中的信息

发生了什么

Shopify 开发者更新说明:从 GraphQL Admin API 2027-01 起,DiscountCountriesInput 中的 includeRestOfWorld 仍存在,但传入 true 会返回 BAD_REQUEST。

使用该字段并传入 true 的应用,升级前须通过 countries.add 明确列出折扣适用国家;示例中的国家代码仅供说明,不代表推荐的适用范围。

传入 false 保持现有行为,传入 null 仍为无操作;使用 2026-10 及更早版本的应用,在这些版本仍受支持期间保持现有行为。

该变更适用于北美市场相关情境;证据未说明其他市场的独立规则。

经营影响

为什么重要

若应用依赖“世界其他地区”这一动态范围,升级后请求可能失败,进而影响通过该应用创建或更新折扣。

明确国家代码意味着折扣覆盖范围由应用传入的国家列表表达,不再由 includeRestOfWorld: true 代替。

编辑观察

分析判断

  1. 这是有条件的兼容性变更,并非所有使用 Admin GraphQL API 的店铺都会受影响:关键检查项是应用是否向 DiscountCountriesInput 传入 true,以及是否使用 2027-01 或更高版本。

  2. 迁移时的主要判断不是照抄示例代码,而是确认折扣原本预期覆盖哪些国家;错误列表可能改变折扣资格范围。

适用范围

对卖家的影响

如果北美相关店铺使用的应用满足上述字段与版本条件,应用升级后可能无法按原请求创建或更新折扣。

若店铺不使用相关应用,或应用传入 false、null,现有证据不表明需要因这项变更调整操作。

行动建议

现在应该做什么

  1. 1

    检查折扣应用的字段传值与 API 版本

    this-week

    向应用维护方确认折扣创建、更新请求是否包含 includeRestOfWorld: true,以及计划使用的 Admin GraphQL API 版本;优先核对 2027-01 或更高版本。

  2. 2

    确认折扣应覆盖的国家

    this-week

    若应用确实传入 true,与负责折扣配置的团队确认实际适用国家,再让应用通过 countries.add 显式传入相应国家代码后升级。

暂时不要做什么

  • 不要直接照搬更新示例中的国家代码;Shopify 明确说明示例仅供说明,应以折扣实际预期适用国家为准。

来源与依据

证据与来源

来源可能仅提供标题或摘要。请结合下方具体证据范围阅读;链接与流程校验不等于独立事实核验。内部置信值是工作流信号,不代表事实正确的概率。

  1. 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 versio

    Shopify Developer Changelog · 流程状态: single-source

    来源链接

    获取时间: 2026年9月23日 16:07 UTC

    Claim is bounded to the ingested title or summary; no source body or quotation is retained.

Shopify API 2027-01 将拒绝 includeRestOfWorld: true - Ecomwith Intelligence