Before some shopify api change, I was able to call API
with graphQL endpoint and get a report for my application.
https://some-test-store.myshopify.com/admin/api/2023-04/graphql.json
{
# "FROM sales SHOW total_sales GROUP BY month SINCE -1y UNTIL today" passes a ShopifyQL query to the GraphQL query.
shopifyqlQuery(query: "SHOW net_quantity, gross_sales, discounts, returns, net_sales, taxes, total_sales BY product_title, variant_title, variant_sku FROM sales WHERE ((sale_line_type == "product")) SINCE -30d UNTIL today ORDER BY "total_sales" DESC LIMIT 1000") {
__typename
... on TableResponse {
tableData {
rowData
columns {
# Elements in the columns section describe which column properties you want to return.
name
dataType
displayName
}
}
}
# parseErrors specifies that you want errors returned, if there were any, and which error properties you want to return.
parseErrors {
code
message
range {
start {
line
character
}
end {
line
character
}
}
}
}
}
Now it does not work. Does anyone know how to get report data via API?