Edit a partner email report
Overview
Change a scheduled report's frequency or the accounts it covers.
Use this when the team or needs change.
You'll need the report_id and the changes.
The schedule is updated.
Prerequisites
- A Partner bearer token. See Authentication.
- The report's
report_id, from List scheduled reports.
Base URL
| Environment | URL |
|---|---|
| Production | https://production-api.shoutaboutus.com |
| Development | https://development-api.shoutaboutus.com |
Endpoint
POST /api/v1/partner/reports/edit
Authentication
Partner token
- Only Partner tokens can call it. Any other token gets
403(This action is unauthorized.). - The report and every id in
accountmust be inside your own tree; anything else is rejected with422. - The report type and recipient can't be changed here.
Rate limit
This endpoint has no rate limit.
Request parameters
None.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
report_id | integer | Yes | The report to change. Must exist and be inside your tree. Sending it is what makes this an edit. |
reportPeriodType | string | Yes | How often to send it: day, week or month. It must fit the report's type, as when you scheduled it (for example month for an activity report). |
all_account | integer | Yes | 1 to cover every account under your partner, 0 to cover only the accounts in account. |
account | array of integers | When all_account is 0 | Account ids to cover. Required when all_account is 0. Each must exist and be inside your tree. Replaces the accounts the report covered before. |
Request payload
{
"report_id": 5,
"reportPeriodType": "month",
"all_account": 0,
"account": [
5994
]
}Response body
The payload is inside data.
| Field | Type | Description |
|---|---|---|
status | string | success. |
response | string | The confirmation message, Report has been updated successfully!. |
Response payload
{
"data": {
"status": "success",
"response": "Report has been updated successfully!"
}
}Examples
Success payload
See Response payload.
Error payload
403 Not a Partner token
{
"message": "This action is unauthorized."
}422 Report doesn't exist
{
"message": "The selected report id is invalid. (and 1 more error)",
"errors": {
"report_id": [
"The selected report id is invalid.",
"The selected report id does not belong to your company hierarchy."
]
}
}| Status | Meaning |
|---|---|
200 | The schedule is updated. |
401 | The token is missing, expired or invalid. |
403 | The token isn't a Partner token. |
422 | A required field is missing, the report or an account doesn't exist or is outside your tree, or reportPeriodType isn't day, week or month. |
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": "month", "all_account": 0, "account": [5994]}'Updated 17 days ago
Did this page help you?
