Edit an account email report

Overview

Update an existing account email report's frequency and store assignments (recipient and report type unchanged).

Prerequisites

  • A bearer token. Callable with Account tokens.

Base URL

EnvironmentURL
Productionhttps://production-api.shoutaboutus.com
Developmenthttps://development-api.shoutaboutus.com

Endpoint

POST /api/v1/user/reports/edit

Authentication

  • Requires a bearer token in the Authorization: Bearer <bearer-token> header.

  • Who can call it: Account tokens.

  • Mounted under the user/* group.

  • Requires the auth user's company (account user only, else 403).

  • store_ids.* must sit inside the caller's company tree.

  • Existing report_stores rows get deleted, then re-inserted.

Rate limit

  • No rate limit.

Request body

  • Body:
FieldTypeRequiredDescription
report_idintegeryesMust be an existing report within the caller's account hierarchy.
reportPeriodTypestringyesday, week, or month;.
all_storeintegeryes1 = all stores, 0 = specific stores. Rule required|in:0,1.
store_idsint[]required_if all_store=0Store ids; each must exist and pass an ownership check.
{
  "report_id": 5,
  "reportPeriodType": "week",
  "all_store": 0,
  "store_ids": [
    1
  ]
}

Response

  • data.status (string) — success.
  • data.response (string) — message Report has been updated successfully!.

200 Success · 200

{
  "data": { "status": "success", "response": "Report has been updated successfully!" }
}

Errors

StatusMeaning
401The bearer token is missing, expired or invalid
403The token is valid but the record sits outside your account
422The request failed validation — the response names the fields
500Unexpected server error

Example request

curl --request POST \
  --url "https://production-api.shoutaboutus.com/api/v1/user/reports/edit" \
  --header 'Authorization: Bearer <bearer-token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"report_id": 5, "reportPeriodType": "week", "all_store": 0, "store_ids": [1]}'

Did this page help you?