Preview a landing page

Overview

Render a template as the customer would see it, without saving or sending anything.

Use this to check a design before using it.

You'll need a location id (store_id) and the HTML to preview.

The location's details fill the merge fields, and [allReviewSite] becomes the location's review sites with their direct links. [customerName] shows as Customer, [senderName] as the location's name, and [paragraph_1] is removed.

Returns the rendered page.

Prerequisites

Base URL

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

Endpoint

POST /api/v1/campaign/template/landing-page/preview

Authentication

Account token

  • store_id must be an existing location inside your own account tree; otherwise 422.

Rate limit

This endpoint has no rate limit.

Request parameters

None.

Request body

FieldTypeRequiredDescription
store_idintegerYesThe location whose details fill the page. Must be inside your account tree.
html_contentstringNoThe HTML to render. Leave it out to get an empty preview.

Request payload

{
  "store_id": 3007,
  "html_content": "<h1>Thanks for visiting [locationName]</h1><p>Hi [customerName], how did we do?</p>"
}

Response body

The payload is inside data.

FieldTypeDescription
statusstringsuccess.
dataobjectThe preview.
data.htmlstringThe rendered HTML.

Response payload

{
  "data": {
    "status": "success",
    "data": {
      "html": "<h1>Thanks for visiting Acme Coffee</h1><p>Hi Customer, how did we do?</p>"
    }
  }
}

Examples

Success payload

See Response payload.

Without html_content, html is empty:

{
  "data": {
    "status": "success",
    "data": {
      "html": ""
    }
  }
}

Error payload

422 Location outside your tree

{
  "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."
    ]
  }
}

422 Location doesn't exist

{
  "message": "The selected store id is invalid. (and 1 more error)",
  "errors": {
    "store_id": [
      "The selected store id is invalid.",
      "The selected store id does not belong to your company hierarchy."
    ]
  }
}

422 store_id missing

{
  "message": "The store id field is required.",
  "errors": {
    "store_id": [
      "The store id field is required."
    ]
  }
}
StatusMeaning
200The rendered page.
401The token is missing, expired or invalid.
422store_id is missing, doesn't exist or is outside your tree.
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": 3007, "html_content": "<h1>Thanks for visiting [locationName]</h1><p>Hi [customerName], how did we do?</p>"}'

Did this page help you?