Get templates

GET /v2/templates

List all templates available on this environment. Optionally, provide one or more filters to return a subset of templates. For example, you can return only the templates matching a tag or in a specific template group.

Parameters

tag string Filter the response to include only those templates matching the specified tag string.
tagRef integer Filter the response to include only those templates matching the specified tag reference.
templateGroupRef integer Filter the response to include only those templates in the specified template group. The template group is provided as a reference.
templateGroupRefs string Filter the response to include only those templates in the specified set of template groups. The template groups are provided as a comma-separated list of references.
categoryKey string Filter the response to include only those templates with the specified category key. The category key is a string representation of the category, for example the key “food-and-drink” matches the English text “Restaurants, Bars, Cafes & Clubs”.
accountHolderRef integer Filter the response to include only those custom templates owned by the specified account holder.

Response

{
    "templates":
    [
        {
            "ref": 1,
            "name": "YelAudio",
            "directory": "yelaudio",
            "thumbnail": "yelaudio.png",
            "fontSwatchRef": 98,
            "colorSwatchRef": 303,
            "githubRepository": null,
            "private": false,
            "gitRef": null,
            "updated":
            {
                "date": "2013-09-09 18:30:38",
                "timezone_type": 3,
                "timezone": "Europe\/London"
            },
            "groupRefs": [1, 2, 3]
        },
        {
            "ref": 2,
            "name": "Copenhagen Collective",
            "directory": "copenhagencollective",
            "thumbnail": "collective.png",
            "fontSwatchRef": 99,
            "colorSwatchRef": 308,
            "githubRepository": null,
            "private": false,
            "gitRef": null,
            "updated":
            {
                "date": "2013-09-09 18:30:38",
                "timezone_type": 3,
                "timezone": "Europe\/London"
            },
            "groupRefs": [1, 2, 3]
        },
        ...
    }
}

Note: The thubmnail URL of the template can be constructed like so:

http://55b558c7-resources.<brand domain>/42d91cf/templates/<directory>/<thumbnail>

For example:

http://55b558c7-resources.your-brand-domain.com/42d91cf/templates/yelaudio/yelaudio.png

Get template categories

GET /v2/templates/categories

Response

{
    "categories":
    [
        {
            "ref":9,
            "key":"food",
            "category":"Restaurants, Cafes & Bars"
        },
        ...
    ]
}