pagehive

get_shop_stats

A site's sales from paid orders: last_7_days, last_30_days and all_time, each with orders, items, sales (what buyers paid, tax and shipping included), refunded, net and average; to_ship (paid orders with an address not marked sent); best_sellers_30_days and best_sellers_all_time (by quantity); and days, sales per UTC day for the last 30 days.

ShopsRead-onlyPro and upUpdated

What it does

A site's sales from paid orders: last_7_days, last_30_days and all_time, each with orders, items, sales (what buyers paid, tax and shipping included), refunded, net and average; to_ship (paid orders with an address not marked sent); best_sellers_30_days and best_sellers_all_time (by quantity); and days, sales per UTC day for the last 30 days. Amounts in the shop's currency. Needs can_shop.

Plans

Needs a paid plan: Pro or Ultra. On other plans your agent gets an error that says so. See Limits for what each plan includes.

Parameters

NameTypeAbout
site_idrequiredstringThe id of the site. list_sites gives the ids of your sites.

Example

Call get_shop_stats with these arguments:

{
  "site_id": "01a1…"
}

Ids like 01a1… stand for your own. list_sites and list_tables give you the real ones.

Related guides