Edit partner email report
Overview
Update an existing partner email report's frequency and account targeting; report type and recipient are not changed here.
Prerequisites
- A bearer token. Callable with Partner tokens.
Base URL
| Environment | URL |
|---|---|
| Production | https://production-api.shoutaboutus.com |
| Development | https://development-api.shoutaboutus.com |
Endpoint
POST /api/v1/partner/reports/edit
Authentication
-
Requires a bearer token in the
Authorization: Bearer <bearer-token>header. -
Who can call it: Partner tokens.
-
Mounted under the
partner/*group (partner-admin scope, no Hipages gate). -
Targeting must sit inside your own account tree, keyed on each
account.*id (must be a company within the partner's own tree). -
The presence of
report_idswitches into edit-mode rules (report existence + period validated, recipient fields not required).
Rate limit
- No rate limit.
Request body
- Body:
| Field | Type | Required | Description |
|---|---|---|---|
report_id | integer | yes | Must exist in reports. Required to enter edit branch. |
reportPeriodType | string | yes | day, week, or month; validated against the existing report. |
all_account | integer | yes | 1 = all accounts, 0 = specific accounts. Rule required|nullable|in:0,1. |
account | int[] | required_if all_account=0 | Account company ids; each must exist and pass an ownership check. Existing report_companies rows get deleted, then re-inserted. |
{
"report_id": 5,
"reportPeriodType": "week",
"all_account": 0,
"account": [
10,
11
]
}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 |
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/partner/reports/edit" \
--header 'Authorization: Bearer <bearer-token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"report_id": 5, "reportPeriodType": "week", "all_account": 0, "account": [10, 11]}'Updated 11 days ago
Did this page help you?
