Preview landing page template

Overview

Resolve draft landing-page HTML for an editor preview. It runs the supplied HTML through the same send-time path. This expands the [allReviewSite] grid into the store's enabled sites (using the store's DIRECT landing-page URLs — never click-tracking). It fills location/account tokens. It also swaps recipient-only tokens ([customerName], [senderName], [paragraph_1]) for friendly sample values. The endpoint saves no template and no recipient/campaign is involved.

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/campaign/template/landing-page/preview

Authentication

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

  • bearer token, account role — authentication. store_id must exist and belong to the caller's hierarchy (an ownership check).

Rate limit

  • No rate limit.

Request body

FieldTypeRequiredDescription
store_idintegerRequiredMust be an existing location inside your own account tree.
html_contentstringOptionalDraft HTML to resolve. Empty resolves to an empty preview.
{
  "store_id": 12345,
  "html_content": "<h1>Hi [customerName]</h1><div>[allReviewSite]</div>"
}

How it works

  • Synchronous. 200 OK with data.data.html = the resolved HTML string. 422 on validation failure. If the store cannot be loaded post-validation the controller returns a 500-coded error envelope (Store not found).

Response

200 OK · 200

{
  "data": {
    "status": "success",
    "data": {
      "html": "<h1>Hi Customer</h1><div><a href=\"https://example.com/lp/site-1\">Google</a></div>"
    }
  }
}

422 Invalid store · 422

{
  "message": "The selected store id does not belong to your company hierarchy.",
  "errors": {
    "store_id": [
      "The selected store id does not belong to your company hierarchy."
    ]
  }
}

Errors

StatusMeaning
401The bearer token is missing, expired or invalid
422Invalid store
500Unexpected server error

Example request

curl --request POST \
  --url "https://production-api.shoutaboutus.com/api/v1/campaign/template/landing-page/preview" \
  --header 'Authorization: Bearer <bearer-token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"store_id": 12345, "html_content": "<h1>Hi [customerName]</h1><div>[allReviewSite]</div>"}'

Did this page help you?