Fetch a product using AJAX API that has his handle translated

Topic summary

Problem: The Shopify AJAX endpoint /products/{handle}.js fails when a product’s handle is translated per locale. Merchants select products by handle in a Theme App Extension, but Translate Apps localize the handle, so the original handle no longer resolves under localized routes.

Context: Same product accessible via different locale URLs (e.g., /fr/product/mon-super-snowboard and /en/product/my-super-snowboard). The author expected that using the English handle under the French route would resolve, but it requires the French handle, which the app doesn’t have.

Key constraint: Product ID stays the same across translations, but localized handles differ by locale.

Suggestion offered: Fetch product data by product ID rather than by handle, since the ID is invariant across locales. This is proposed as a workaround to avoid relying on translated handles.

Status: No confirmed implementation details or resolution. Open questions include whether the AJAX API supports fetching by ID directly, or how to obtain the localized handle within a Theme App Extension if ID-based fetching is not available.

Summarized with AI on December 21. AI used: gpt-5.

Hello,

I have an application that allow to create Bundles, BOGOs, etc.
Merchants creates discounts on my application by selecting product handles they want to include in the discount.

Sometimes, merchants can use Translate Apps to translate the handle. In this case, even if the product and the id is the same, I can’t use Shopify AJAX API /products/${handle}.js because the handle isn’t the same anymore. How can I handle this issue ?

For ex, let’s say a merchant have those two urls, but they are the same product:
/fr/product/mon-super-snowboard

/en/product/my-super-snowboard

I was expecting that calling /fr/products/my-super-snowboard would return the same result as /en/products/my-super-snowboard but it seems that I have to call /fr/product/mon-super-snowboard . The problem is that I don’t have access to this handle in my Theme App Extension.

Hi Infalodon,

As a workaround, could you use the product ID to fetch the product data instead of relying on the handle as the product ID remains consistent across translations?