Skip to content

Product sales

GET/admin/v1/stores/{store_id}/analytics/products/{product_id}/sales
  • analytics:read

How one product sold on each store-local day of a period, with the totals of the period before (the product editor's sales card).

Path parameters

  • store_idstringrequired

    The store's ID, like store_01k8qs5s…. Apps get it with the install, in the OAuth redirect and the token response.

  • product_idstringrequired

    The product's ID, like prod_01k8qs5s….

Query parameters

  • fromstringrequired

    First store-local day, YYYY-MM-DD.

  • tostringrequired

    Last store-local day (included), YYYY-MM-DD. At most 366 days from from.

Headers

  • shop-api-versionYYYY-MM

    The version to answer in. Without it, your app’s pinned version, else the newest.

Returns

200 The product's sales.

Errors

  • 403forbiddenMissing permission.
  • 422validation_failedInvalid dates or range.