Skip to content

Export custom report

GET/admin/v1/stores/{store_id}/analytics/custom-reports/{report_id}/export
  • analytics:read

A custom report as a CSV download, as the fixed reports' exports.

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.

  • report_idstringrequired

    The custom report's ID, like crpt_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.

  • group_byenum

    Time series only: day, week (from Sunday) or month. Default: days up to a month, weeks up to half a year, months beyond.

    • day
    • week
    • month
  • languagestring

    Exports only: the language of the column headings, en or ar (default: the store's).

Headers

  • shop-api-versionYYYY-MM

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

Returns

200 The CSV file.

Errors

  • 404not_foundNo such report.
  • 422validation_failedInvalid dates or range.