I am trying to access the English product translations from a site that defaults to Italian.
/products/ = Italian
/en/products = English
/es/products/ = Spanish
The access token is for the Admin API and has access to the scopes read_products
and read_product_listings
const ShopifyAPI = require('shopify-api-node');
const shopify = new ShopifyAPI({shopName, apiVersion, accessToken});
const data = await shopify.product.list()
const query = `{
products(first:10,reverse:true){edges{node{
id
translations(locale:"en"){key locale value}
}}}
}`
const data = await shopify.graphql(query);
The Shopify GraphQL API offers up an endpoint you can use where you provide the resource ID you are interested in, ie) a product ID, and you can get back the translations assigned to it. I would therefore read the docs on translations and move on from there.