Layout Template Object
Layout templates are used to format landing pages, forms, and site search results. Learn more about layout templates in Salesforce Help.
The API to access the Layout Templates object follows the conventions described in Version 5 Overview.
Include the authentication header with every request. For information on how to authenticate, see Authentication.
Operation | HTTP Verb | URL Format | Ability Requirements |
---|---|---|---|
Read | GET | https://pi.pardot.com/api/v5/objects/layout-templates/<id>?<params> | Marketing > Landing Pages > Layout Templates > View ability |
Create | POST | https://pi.pardot.com/api/v5/objects/layout-templates?<params> | Marketing > Landing Pages > Layout Templates > Create/Edit ability |
Update | PATCH | https://pi.pardot.com/api/v5/objects/layout-templates/<id>?<params> | Marketing > Landing Pages > Layout Templates > Create/Edit ability |
Delete | DELETE | https://pi.pardot.com/api/v5/objects/layout-templates/<id> | Marketing > Landing Pages > Layout Templates > Delete ability |
Query | GET | https://pi.pardot.com/api/v5/objects/layout-templates?<params> | Marketing > Landing Pages > Layout Templates > View ability |
Field | Type | Description |
---|---|---|
name | String | Name of the object for identification in Account Engagement. |
layoutContent | String | HTML content of this layout template encoded as JSON string. |
| Field | Type | Description |
| --------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --- |
| formContent
| String | HTML content encoded as a JSON string that controls form display logic. Uses default values if they're not provided. | |
| isIncludeDefaultCss
| Boolean | True if not supplying custom CSS styling. |
| folderId
| Integer | ID of the folder containing this object. Uses the asset type's uncategorized folder if not specified on create. |
Field | Type | Description |
---|---|---|
id | Integer | ID of this object. |
isDeleted | Boolean | The value is true if this object is in the recycle bin in Account Engagement. |
createdAt | DateTime | Creation time of this object. |
updatedAt | DateTime | The last-updated time for the object. |
createdById | Integer | ID of the user who created the object. |
updatedById | Integer | ID of the user who last updated the object. |
createdBy | User | User object representing the user who created the object. See documentation for User for fields. |
updatedBy | User | User object representing the user who last updated the object. See documentation for User for fields. |
siteSearchContent | String | HTML content encoded as a JSON string that controls the site search content. Uses default values if they're not provided. |
folder | Folder | Folder object representing the folder containing this object. See documentation for Folder for fields. |
A Layout Template POST request must have a JSON body that specifies all the required fields. All HTML content must be JSON escaped.
Example request:
Example response:
This example doesn't show all the headers. Whitespace has been added to make it easier to read.
Examples include extra spaces for readability and don't always include headers. The fields in the response body and Location
header match the fields specified on the example request.
Updating a layout template follows the conventions described in the Version 5 Overview.
Deleting a layout template follows the conventions described in the Version 5 Overview. Layout templates that are in use on Forms and Landing Pages can't be deleted. To successfully delete, remove all usages.
Retrieving a collection of layout templates follows the conventions described in Version 5 Overview.
When executing a query, the following fields can be specified in the orderBy
parameter. See the conventions for query described in the Version 5 Overview.
id
Example request:
Example response:
When executing a query, the following parameters can be used to filter the returned results. These parameters can be specified in the request along with any shared parameters defined in Version 5 Overview. When specifying more than one parameter, all parameters must match the record in order for it to be returned in the results.
Parameter | Description |
---|---|
id | Returns any layout templates where ID is equal to the given integer value. |
idList | Returns any layout templates where ID is included in the given list of values. |
idGreaterThan | Returns any layout templates where ID is greater than the specified value, non-inclusive. |
idGreaterThanOrEqualTo | Returns any layout templates where ID is greater than or equal to the specified value. |
idLessThan | Returns any layout templates where ID is less than the specified value, non-inclusive. |
idLessThanOrEqualTo | Returns any layout templates where ID is less than or equal to the specified value. |
name | Returns any layout templates where Name is equal to the given string value. |
deleted | Determines whether to return deleted records. The value can be false (default), true , or all . |
Example request:
Example response: