Alright, so I have an app that creates discount codes automatically for Shopify stores, and registers them with the store. I want to be able to see if those discount codes have been used. I am requesting the read_orders scope. When I curl the endpoint to make sure that I have the scope it is there.
However, when I query the Admin Graphql with the following query that the shopify graphql dev assistant provided me:
query GetOrderByUniqueDiscountCode {
orders(first: 1, query: "discount_codes:${discountCode}") {
edges {
node {
id
name
currentTotalPriceSet {
shopMoney {
amount
currencyCode
}
}
}
}
}
}
It fails as such:
"errors": [
{
"message": "This app is not approved to access the Order object. See https://partners.shopify.com/*******/apps/*******/customer_data for more details.",
"locations": [
{
"line": 3,
"column": 9
}
],
"path": [
"orders"
],
"extensions": {
"code": "ACCESS_DENIED",
"documentation": "https://partners.shopify.com/*******/apps/*********/customer_data"
}
}
],
So it’s wanting me to request access to sensitive customer data when I don’t need that. I just want the order total related to the discount code used. I could just be sorely misunderstanding the docs and scopes. I could also have misled the AI Assistant. Does anyone know the answer to this? I couldn’t find anything with the AI about it or in these forums.