Fetch localized storefront prices and content for a specific country and language using the Shopify Storefront API @inContext directive with Shopify Markets
Pass the `@inContext(country: DE, language: DE)` directive on your query or mutation to tell the Storefront API to resolve prices, currency, and translated content for Germany in German
Query `localization { country { currency { isoCode symbol } } }` alongside your product query to confirm the resolved country and currency before presenting prices to the buyer
Access `priceRange.minVariantPrice { amount currencyCode }` on Product and `price { amount currencyCode }` on ProductVariant — these fields automatically return localized amounts when @inContext country is set
For language-localized strings (titles, descriptions, metafields), ensure the market has translations registered via `translationsRegister` and that the queried language code matches a supported locale for that market
Use the `market` field on the `localization` query result (available in recent API versions) to confirm which Shopify Market the buyer context resolved to
For cart creation, set `buyerIdentity { countryCode: DE }` on `cartCreate` rather than relying solely on @inContext — cart pricing resolution uses buyerIdentity country, not the directive country, for cart mutations
Known gotchas
The @inContext country directive affects price display on queries but does NOT affect cart pricing — cart mutations resolve prices from `buyerIdentity.countryCode` on the cart itself, not from @inContext
Markets must be configured and active in the Shopify admin for the requested country before @inContext returns localized prices; querying an unconfigured country falls back to the primary market currency
Language translations returned via @inContext are only available if translations have been registered for that resource and language via translationsRegister — untranslated fields return the primary locale value
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp