Skip to content

Update custom report

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

Change a custom report: name and definition replaced. Send If-Match: "v{version}" to avoid overwriting someone else's change.

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….

Headers

  • If-Matchstring · or null

    ETag from the last read, e.g. "v3"

  • shop-api-versionYYYY-MM

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

Body

  • namestringrequired

    1–80 characters, unique in the store.

  • definitionobjectrequired

    What a custom report asks.

Returns

200 The report.

Errors

  • 404not_foundNo such report.
  • 409Another report has this name.
  • 412precondition_failedThe report changed since it was read.
  • 422validation_failedThe definition doesn't fit its data set.