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

Shopify Customer Address API 在 2026-10 版本引入 countryCode

面向北美市场、使用 Customer Account API 处理客户地址的应用需要规划字段迁移,但现有 territoryCode 集成目前不会中断。

Ecomwith Editorial电商情报编辑部

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

来源中的信息

发生了什么

Shopify 官方开发者更新称,从 Customer Account API 版本 2026-10 起,CustomerAddressInput 和 CustomerAddress 支持 countryCode;territoryCode 同时被标记为弃用,但仍可继续使用。

countryCode 使用 CountryCode 枚举,并接受 ISO 3166-1 alpha-2 代码,例如 US 或 CA;如果同一地址输入同时提供两个字段,countryCode 优先。

使用 API 版本 2026-07 或更早版本的应用不受本次字段变化影响,既有 territoryCode 查询和变更操作仍可运行;Shopify 尚未公布 territoryCode 的移除版本。

本更新主要影响北美市场中使用 Customer Account API 创建、更新或读取客户地址的应用;普通未使用该 API 的店铺流程不在已给证据覆盖范围内。

经营影响

为什么重要

2026-10 版本将 territoryCode 标记为弃用,因此应用升级 API 版本时需要同步检查地址读写逻辑,避免新旧字段混用造成数据优先级差异。

统一使用两位国家代码和强类型枚举,有助于减少地址国家字段的格式歧义,但证据仅支持 API 字段层面的变化,不足以推断结账、配送或税务结果会自动改变。

编辑观察

分析判断

  1. 这更像是一次兼容性迁移窗口,而不是立即故障:旧字段暂未移除,当前集成无需紧急停机或回滚。

  2. 对有版本升级计划的北美应用,迁移工作应绑定 Customer Account API 2026-10 的测试周期;仅继续使用旧版本的应用可以先记录依赖,不必为本次更新单独改动生产代码。

  3. 若系统内部仍接受三位或数字国家代码,不能直接把原值写入 countryCode;应先确认转换逻辑,因为已给证据明确限定为 ISO 3166-1 alpha-2 格式。

适用范围

对卖家的影响

使用 Customer Account API 管理客户地址的北美商家及其技术服务商,需要在升级到 2026-10 时检查地址创建、更新和读取请求。

只使用 Shopify 标准店铺功能、未维护相关 API 集成的商家,当前没有已核验的直接操作影响。

现有依赖 territoryCode 的应用暂不会因本次更新中断,但后续 API 版本升级会增加迁移和回归测试工作。

行动建议

现在应该做什么

  1. 1

    盘点 Customer Account API 地址字段依赖

    this-week

    针对北美店铺,搜索应用和中间件中的 territoryCode 使用位置,区分创建、更新、读取路径,并记录当前 API 版本。

  2. 2

    为 2026-10 版本准备字段迁移测试

    this-week

    在非生产环境验证 countryCode 的 CustomerAddressInput 和 CustomerAddress 读写流程,使用 US、CA 等两位国家代码,并检查同时传入两个字段时的优先级行为。

  3. 3

    跟踪 territoryCode 的后续移除安排

    monitor

    保留旧字段兼容方案,同时关注 Shopify 是否公布移除版本;在正式切换前完成应用版本与数据格式的复核。

暂时不要做什么

  • 不要因为本次弃用标记立即删除 territoryCode、强制升级所有应用,或把北美市场之外的店铺和未使用 Customer Account API 的流程一并纳入迁移。

来源与依据

证据与来源

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

  1. 01

    Starting with Customer Account API version 2026-10, customer address inputs and objects support countryCode. The existing territoryCode field is deprecated but remains fully supported, so current integrations continue working without interruption. Developers should migrate to countryCode when adopting API version 2026-10. What changed The CustomerAddressInput input object and CustomerAddress object now include countryCode. Use countryCode when creating, updating, or reading a customer address. It uses the CountryCode enum and accepts ISO 3166-1 alpha-2 country codes such as US or CA. The existing territoryCode field is marked as deprecated in API version 2026-10. Note: territoryCode has not been removed. Existing queries and mutations that use it continue to work as before, including integrations using older API versions. If both fields are supplied in an address input, countryCode takes precedence. Who’s affected This change affects apps using the Customer Account API to create, update, or read customer addresses. Apps using API version 2026-10 or later can use countryCode and will see territoryCode marked as deprecated. Apps using API version 2026-07 or earlier are unchanged and

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

    来源链接

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

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

Shopify Customer Address API 在 2026-10 版本引入 countryCode - Ecomwith Intelligence