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 or meta.
  • 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 with account_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

EnvironmentURL
Productionhttps://production-api.shoutaboutus.com
Developmenthttps://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; otherwise 422.

Rate limit

This endpoint has no rate limit.

Request parameters

ParameterInTypeRequiredDescription
store_idqueryintegerNoList every template you can use on this location, in one list without counts. Must be inside your account tree.
account_idqueryintegerNoPartner token: list only this account's templates. Ignored when it isn't one of your accounts, or when store_id is sent.
pagequeryintegerNoPage number, from 1. Ignored when store_id is sent.
per_pagequeryintegerNoTemplates 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.

FieldTypeDescription
statusstringsuccess.
responsearray of objectsThe templates, sorted by name.
response[].idintegerThe template's id.
response[].valueintegerThe template's id. Use it as landing_page_id.
response[].labelstringThe template's name.
response[].company_idinteger or nullThe account that owns the template. null for a shared (global) template.
response[].company_namestring or nullThe name of that account. null for a shared template.
response[].unique_codestringThe template's encoded id.
response[].sms_campaign_countintegerText campaigns using the template. Only without store_id.
response[].email_campaign_countintegerEmail campaigns using the template. Only without store_id.
metaobjectPaging details. Only without store_id.
meta.current_pageintegerThis page number.
meta.per_pageintegerTemplates per page.
meta.totalintegerTemplates in all pages.
meta.last_pageintegerThe 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."
    ]
  }
}
StatusMeaning
200The templates.
401The token is missing, expired or invalid.
422store_id is outside your tree, or per_page is above 100.
500Unexpected 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'

Did this page help you?