Templates
Returns an account's available templates.
Table-Specific Information
Select
The provider uses the Mailchimp API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client-side within the provider.
| Column | Supported Operators |
| Id | = |
| Type | = |
| Category | = |
| DateCreated | <, >, <=, >= |
| CreatedBy | = |
| FolderId | = |
| ContentType | = |
SELECT * FROM Templates WHERE Id = '1245'
SELECT * FROM Templates WHERE Type = 'base'
SELECT * FROM Templates WHERE Category = 'asdw'
SELECT * FROM Templates WHERE FolderId = '15151'
SELECT * FROM Templates WHERE ContentType = 'template'
SELECT * FROM Templates WHERE CreatedBy = 'abcd'
SELECT * FROM Templates WHERE DateCreated >= '2024-02-07 00:00:37.0'
SELECT * FROM Templates WHERE DateCreated <= '2024-02-07 00:00:37.0'
SELECT * FROM Templates WHERE DateCreated > '2024-02-07 00:00:37.0'
SELECT * FROM Templates WHERE DateCreated < '2024-02-07 00:00:37.0'
Insert
The Name and Html columns are required for INSERT operations.
INSERT INTO Templates (Name, Html) VALUES ('test_template', '<title></title>')
Update
The Html column is required for UPDATE operations. Since the Html column is not returned from the server during SELECT operations, you must specify it in the UPDATE statement.
UPDATE Templates SET Html = '<title></title>', Name = 'abcd' WHERE Id = '13693'
Delete
The following is an example of a DELETE operation:DELETE FROM Templates WHERE Id = '13695'
Columns
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | Integer | True |
The unique Id for the template. | |
| Type | String | True |
The type of template (user, base, or gallery). The allowed values are user, base, gallery. | |
| Name | String | False |
The name of the template. | |
| DragAndDrop | Boolean | True |
Indicates whether the template uses the drag-and-drop editor. | |
| Responsive | Boolean | True |
Indicates whether the template contains media queries to make it responsive. | |
| Category | String | True |
If available, the category the template is listed in. | |
| DateCreated | Datetime | True |
The date and time the template was created. | |
| CreatedBy | String | True |
The login name for template's creator. | |
| Active | Boolean | True |
Indicates whether the template is active. User templates are not deleted but are instead marked as inactive. | |
| FolderId | String | False |
The Id of the folder the template is currently in. | |
| Thumbnail | String | True |
If available, the URL for a thumbnail of the template. | |
| ShareUrl | String | True |
The URL used for template sharing. For more information, see: http://kb.mailchimp.com/templates/basic-and-themes/how-to-share-a-template | |
| ContentType | String | True |
The method by which the template's content is assembled. The allowed values are template, multichannel, html. | |
| DateEdited | Datetime | True |
The date and time the template was edited in ISO 8601 format. | |
| EditedBy | String | True |
The login name who last edited the template. |
Pseudo-Columns
Pseudo column fields are used in the WHERE clause of SELECT statements and offer more granular control over the data returned from the data source.
| Name | Type | Description |
| Html | String |
The raw HTML for the template. The Mailchimp Template Language is supported in any HTML code passed via the API. Can be used for INSERT and UPDATE. |