Error 404 when calling GET Provinces endpoint

Error 404 when calling GET Provinces endpoint

joelurraco
Shopify Partner
19 0 14

I'm getting a 404 error when using the "shopify.api.rest.Province.all" method from my app's API.

 

I want to obtain a list of provinces for a country:

 
  const provinces = await shopify.api.rest.Province.all({
    session: res.locals.shopify.session,
    country_id: COUNTRY_ID,
  });
 
The 'shopify' object is from the app boilerplate:

 

const shopify = shopifyApp({
  api: {
    apiVersion: LATEST_API_VERSION,
    restResources,
    billing: undefined, // or replace with billingConfig above to enable example billing
  },
  auth: {
    path: "/api/auth",
    callbackPath: "/api/auth/callback",
  },
  webhooks: {
    path: "/api/webhooks",
  },
  // This should be replaced with your preferred storage strategy
  sessionStorage: new SQLiteSessionStorage(DB_PATH),
});

 

Reply 1 (1)

ShopifyDevSup
Shopify Staff
1453 238 508

Hi @joelurraco 👋

 

If the app is using Shopify API Node library, please submit an issue in the public github repo `Shopify/shopify-api-js` directly.

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog