List landing page templates
Overview
Get the account's landing page templates.
Use this to pick one for a campaign.
You'll need an account or partner token.
Returns one entry per template. It works in two ways:
- With
store_id(for a campaign): every template you can use on that location (the location's, your account's and the shared ones) in one list, without counts ormeta. - Without
store_id: your account's own templates only (shared templates aren't included), a page at a time, with the number of text and email campaigns using each. A Partner token gets the templates of all its accounts, or of one account withaccount_id.
Prerequisites
- A bearer token. See Authentication.
- Optional: a location id (
store_id) to list every template you can use on that location.
Base URL
| Environment | URL |
|---|---|
| Production | https://production-api.shoutaboutus.com |
| Development | https://development-api.shoutaboutus.com |
Endpoint
GET /api/v1/campaign/template/landing-page/list
Authentication
Partner or Account token
- An Account token lists its own account's templates. A Partner token lists the templates of all the accounts under the partner, or of one with
account_id. store_id, when sent, must be a location inside your own account tree; otherwise422.
Rate limit
This endpoint has no rate limit.
Request parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
store_id | query | integer | No | List every template you can use on this location, in one list without counts. Must be inside your account tree. |
account_id | query | integer | No | Partner token: list only this account's templates. Ignored when it isn't one of your accounts, or when store_id is sent. |
page | query | integer | No | Page number, from 1. Ignored when store_id is sent. |
per_page | query | integer | No | Templates per page, 10 to 100 (below 10 is raised to 10; above 100 returns 422). Defaults to 10. Ignored when store_id is sent. |
Request body
None.
Request payload
None.
Response body
The payload is inside data.
| Field | Type | Description |
|---|---|---|
status | string | success. |
response | array of objects | The templates, sorted by name. |
response[].id | integer | The template's id. |
response[].value | integer | The template's id. Use it as landing_page_id. |
response[].label | string | The template's name. |
response[].company_id | integer or null | The account that owns the template. null for a shared (global) template. |
response[].company_name | string or null | The name of that account. null for a shared template. |
response[].unique_code | string | The template's encoded id. |
response[].sms_campaign_count | integer | Text campaigns using the template. Only without store_id. |
response[].email_campaign_count | integer | Email campaigns using the template. Only without store_id. |
meta | object | Paging details. Only without store_id. |
meta.current_page | integer | This page number. |
meta.per_page | integer | Templates per page. |
meta.total | integer | Templates in all pages. |
meta.last_page | integer | The last page number. |
Response payload
{
"data": {
"status": "success",
"response": [
{
"id": 4548,
"value": 4548,
"label": "Default Landing Page",
"company_id": 5994,
"company_name": "Acme Coffee",
"unique_code": "89kri1",
"sms_campaign_count": 4,
"email_campaign_count": 0
}
],
"meta": {
"current_page": 1,
"per_page": 10,
"total": 1,
"last_page": 1
}
}
}Examples
Success payload
See Response payload.
With store_id=3007, the shared templates are included, and there are no counts or meta:
{
"data": {
"status": "success",
"response": [
{
"id": 4548,
"value": 4548,
"label": "Default Landing Page",
"company_id": 5994,
"company_name": "Acme Coffee",
"unique_code": "89kri1"
},
{
"id": 1,
"value": 1,
"label": "Warm & Welcoming",
"company_id": null,
"company_name": null,
"unique_code": "9ocy"
}
]
}
}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 per_page above 100
{
"message": "The per page field must not be greater than 100.",
"errors": {
"per_page": [
"The per page field must not be greater than 100."
]
}
}| Status | Meaning |
|---|---|
200 | The templates. |
401 | The token is missing, expired or invalid. |
422 | store_id is outside your tree, or per_page is above 100. |
500 | Unexpected server error. |
Example request
curl --request GET \
--url "https://production-api.shoutaboutus.com/api/v1/campaign/template/landing-page/list?page=1&per_page=10" \
--header 'Authorization: Bearer <bearer-token>' \
--header 'Accept: application/json'Updated 17 days ago
Did this page help you?
