See all services → Shopify Plus Partner
API Developer

Read province codes from fulfillment orders without mapping

GraphQL Admin API 2027-01 adds a provinceCode field to FulfillmentOrderDestination. Integrations can read ON or CA directly instead of maintaining province name lookup tables, removing a common source of address drift in ERP and 3PL sync.

Executive summary

What changed

Until now, FulfillmentOrderDestination gave you province as a human readable name and countryCode as a two letter ISO code. That pairing forced an awkward compromise. Anything downstream that expected a subdivision code, which is most carrier APIs and most tax engines, had to carry its own lookup table turning Ontario into ON and California into CA, for every country in your shipping profile.

As of API version 2027-01, the object exposes provinceCode as a String alongside the existing province and countryCode fields. It returns null in two cases: when the destination genuinely has no province or state, and when the province is not recognised for the destination country. Access requirements are unchanged, and no new scopes are needed, so this is a query change rather than a permissions change.

Why it matters

The value here is not the field itself, it is the code you get to delete. Province mapping tables are classic orphan code. Someone writes one during an integration build, it works, and then nobody revisits it when Shopify adds a market or a carrier tightens validation. The failures it produces are small, intermittent, and almost always discovered by an operations person rather than by monitoring, which makes them expensive to trace.

Reading the code from the source removes that whole class of problem. For merchants selling into multiple regions, it also removes a silent correctness risk: a stale table does not error, it simply returns the wrong code, and a wrong subdivision code can mean a wrong tax jurisdiction or a rejected label. We see versions of this in most integration audits we run, and it sits alongside several other patterns worth checking in our write up on common ERP integration mistakes Shopify merchants make.

Role-specific impact

Use-case example

Real-world scenario

A Plus merchant shipping roughly 15,000 orders a month across Canada and the United States pushes fulfillment orders to a 3PL through middleware. The middleware held a 64 row province lookup that a developer last touched two years earlier. Accented Quebec spellings and the longer Newfoundland and Labrador variant caused close to 1.2% of label requests to fail carrier validation and drop into a manual queue, which is around 180 orders a month handled by hand. Reading provinceCode directly removed both the table and that failure class, and the manual queue became exception handling rather than daily routine.

Implementation checklist

  1. Inventory which apps and middleware services currently read FulfillmentOrderDestination.
  2. Move those integrations to GraphQL Admin API version 2027-01.
  3. Add provinceCode to the relevant fulfillment order queries.
  4. Treat null as a valid response and fall back to province only where a code is genuinely absent.
  5. Log both the new field and your existing mapped value in parallel for one full week and compare.
  6. Retire the local province table once the logs show parity, then re-test label generation and tax jurisdiction for your top destination countries.

FAQ

Q: Do we need a new access scope to read provinceCode?

A: No. The field carries the same access requirements as the rest of FulfillmentOrderDestination, so if your app can already read the destination it can read the code after you move to 2027-01.

Q: Why would provinceCode come back null when province has a value?

A: Because the province name was not recognised for that country. Treat a null as a signal worth logging rather than suppressing, since it usually points at a malformed address rather than at the API.

Resources

FulfillmentOrderDestination.provinceCode API reference

Need guidance? Talk to Makro.