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
| Environment | URL |
|---|---|
| Production | https://production-api.shoutaboutus.com |
| Development | https://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_storesrows get deleted, then re-inserted.
Rate limit
- No rate limit.
Request body
- Body:
| Field | Type | Required | Description |
|---|---|---|---|
report_id | integer | yes | Must be an existing report within the caller's account hierarchy. |
reportPeriodType | string | yes | day, week, or month;. |
all_store | integer | yes | 1 = all stores, 0 = specific stores. Rule required|in:0,1. |
store_ids | int[] | required_if all_store=0 | Store 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) — messageReport has been updated successfully!.
200 Success · 200
200{
"data": { "status": "success", "response": "Report has been updated successfully!" }
}Errors
| Status | Meaning |
|---|---|
401 | The bearer token is missing, expired or invalid |
403 | The token is valid but the record sits outside your account |
422 | The request failed validation — the response names the fields |
500 | Unexpected 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]}'Updated 11 days ago
Did this page help you?
