Generate previous month's insight report

Overview

Backs the UI 'Generate report' button. The button is shown only for the PREVIOUS calendar month when the scheduled run produced no report (it failed, or the location was onboarded mid-month). Always targets last month. If a non-failed report for that month already exists it comes back unchanged (no regeneration). Otherwise it behaves like the submit endpoint — queues an async ReviewData run and bills 1 unit against the store's insight_report quota. The store must have enough recent reviews.

Prerequisites

  • A bearer token in the Authorization header.

Base URL

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

Endpoint

POST /api/v1/account/insight-report/generate

Authentication

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

  • Bearer account / partner token. store_id scoped by an ownership check.

Rate limit

  • No rate limit.

Request body

FieldTypeRequiredDescription
store_idintegerRequiredMust be an existing location, in caller's hierarchy. Must have >= the minimum recent reviews and >= 1 linked review site with a configured publisher. Year/month are forced to last month; The endpoint ignores other body fields on this route.
{
  "store_id": "<storeId>"
}

How it works

  • 202 — fresh report queued ({ data: {. Status: 'queued', task_id } }). Poll Check status (poll until complete) for the result.
  • 200 — an existing non-failed report for the month comes back as-is (deduped).
  • Emits X-Feature-* usage headers.
  • 403 — quota exceeded (hard-stop) / feature disabled.
  • 422 — not enough recent reviews, or store has no publisher-linked review site.

Response

202 Queued · 202

{
  "data": {
    "insight_report_id": 1,
    "store_id": 42,
    "review_site_id": null,
    "publisher": "all",
    "year": 2026,
    "month": 6,
    "theme": "home-services",
    "status": "queued",
    "task_id": "rd-task-abc123",
    "remaining": 4,
    "overage": false
  }
}

200 Existing report (deduped) · 200

{
  "data": {
    "insight_report_id": 1,
    "store_id": 42,
    "review_site_id": null,
    "publisher": "all",
    "year": 2026,
    "month": 6,
    "theme": "home-services",
    "status": "completed",
    "task_id": "rd-task-abc123",
    "remaining": 4,
    "overage": false
  }
}

422 Not enough reviews · 422

{
  "message": "This location needs at least 10 reviews in the last 48 months before an insight report can be generated.",
  "errors": {
    "store_id": [
      "This location needs at least 10 reviews in the last 48 months before an insight report can be generated."
    ]
  }
}

Errors

StatusMeaning
401The bearer token is missing, expired or invalid
403Returned quota exceeded (hard-stop) / feature disabled
422Not enough reviews
500Unexpected server error

Example request

curl --request POST \
  --url "https://production-api.shoutaboutus.com/api/v1/account/insight-report/generate" \
  --header 'Authorization: Bearer <bearer-token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"store_id": "<storeId>"}'

Did this page help you?