Hi all,
We’re currently trying to use the ShopifyQL Analytics API on a Shopify Plus store via a custom private app. Although the app has the read_analytics scope and the store is confirmed to be on Plus, every request to the /shopifyql/queries.json endpoint returns a 406 Not Acceptable response, with an empty body.
Context:
- Store: Shopify Plus (confirmed)
API version: 2024-04
Token: Valid, verified to include read_analytics scope
Tested query:
FROM sales
SHOW total_sales
GROUP BY day
LIMIT 1
Headers used:
Content-Type: application/json
Accept: application/json
X-Shopify-Access-Token: [valid token]
Reproduction: Google Apps Script Example
If anyone wants to replicate this, here’s a minimal test script you can use in Google Sheets → Extensions → Apps
Script:
function testShopifyQL() {
const shop = “your-store.myshopify.com”;
const accessToken = “your_access_token”;
const apiVersion = “2024-04”;
const query = FROM sales SHOW total_sales GROUP BY day LIMIT 1 ;
const url = https://${shop}/admin/api/${apiVersion}/shopifyql/queries.json;
const options = {
method: “post”,
headers: {
“Content-Type”: “application/json”,
“Accept”: “application/json”,
“X-Shopify-Access-Token”: accessToken
},
payload: JSON.stringify({ query }),
muteHttpExceptions: true
};
const response = UrlFetchApp.fetch(url, options);
Logger.log("HTTP status: " + response.getResponseCode());
Logger.log("Raw response: " + response.getContentText());
}
Observed Behavior
Returns:
HTTP status: 406
Raw response: (empty)
The same token works fine for /orders.json and /access_scopes.json
We also confirmed the token scopes using this helper script:
function checkTokenScopes() {
const shop = “your-store.myshopify.com”;
const accessToken = “your_access_token”;
const url = https://${shop}/admin/oauth/access_scopes.json;
const options = {
method: “get”,
headers: {
“X-Shopify-Access-Token”: accessToken,
“Accept”: “application/json”
},
muteHttpExceptions: true
};
const response = UrlFetchApp.fetch(url, options);
Logger.log("HTTP status: " + response.getResponseCode());
Logger.log("Response: " + response.getContentText());
}
Request for Help:
Does anyone know if ShopifyQL Analytics must be manually enabled per store, even if:
- The store is on Shopify Plus
- The app has read_analytics scope
- All other Admin API calls work correctly
We’ve contacted support and suspect the feature isn’t provisioned yet — but would appreciate:
- Confirmation from Shopify staff
- Input from other Plus merchants who’ve used ShopifyQL Analytics successfully
Thanks in advance!