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
- A bearer token. See Authentication.
- A location id (
store_id).
Base URL
| Environment | URL |
|---|---|
| Production | https://production-api.shoutaboutus.com |
| Development | https://development-api.shoutaboutus.com |
Endpoint
POST /api/v1/campaign/template/landing-page/preview
Authentication
Account token
store_idmust be an existing location inside your own account tree; otherwise422.
Rate limit
This endpoint has no rate limit.
Request parameters
None.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
store_id | integer | Yes | The location whose details fill the page. Must be inside your account tree. |
html_content | string | No | The 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.
| Field | Type | Description |
|---|---|---|
status | string | success. |
data | object | The preview. |
data.html | string | The 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."
]
}
}| Status | Meaning |
|---|---|
200 | The rendered page. |
401 | The token is missing, expired or invalid. |
422 | store_id is missing, doesn't exist or is outside your tree. |
500 | Unexpected 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>"}'Updated 17 days ago
Did this page help you?
