Run a reporting query
Runs a query against the store’s registered metrics and dimensions, in the store’s time zone. A metric or dimension the registry does not know is refused with the names that are valid, and an API key needs the read scope of every resource the query touches.
Required scope: read_reports (for API-key authentication).
Authorizations
Secret API key for admin access
JWT token for admin user authentication
Body
Registered metric names, from the reporting schema endpoint.
Up to 2 dimensions to break the metrics down by. Each is a dimension name, or { name, grain, include_empty }: grain (hour, day, week, month) buckets a time dimension, and include_empty lists members with no matching rows where the schema entry supports it.
Narrows the rows by dimension value.
Filters on an aggregate, such as units_sold = 0. Narrows the rows only; the totals stay the period's real figure. The metric must also appear in metrics, and cannot be a derived one.
A named preset (last_month, week_to_date, any last_<n>_<days|weeks|months>), or ISO 8601 dates or times in since and until (a bare date covers the store's whole day). Defaults to the last 30 days, in the store's time zone.
previous_period, previous_year A metric name; prefix it with - to sort descending.
At most 1000.
AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTN, BWP, BYN, BYR, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EEK, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LTL, LVL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MRU, MTL, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SKK, SLE, SLL, SOS, SRD, SSP, STD, STN, SVC, SYP, SZL, THB, TJS, TMM, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYI, UYU, UYW, UZS, VED, VEF, VES, VND, VUV, WST, XAF, XCD, XCG, XOF, XPF, YER, ZAR, ZMK, ZMW, ZWD, ZWG, ZWL, ZWN, ZWR Response
query results

