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.

Layout Template Resources

OperationHTTP VerbURL FormatAbility Requirements
ReadGEThttps://pi.pardot.com/api/v5/objects/layout-templates/<id>?<params>Marketing > Landing Pages > Layout Templates > View ability
CreatePOSThttps://pi.pardot.com/api/v5/objects/layout-templates?<params>Marketing > Landing Pages > Layout Templates > Create/Edit ability
UpdatePATCHhttps://pi.pardot.com/api/v5/objects/layout-templates/<id>?<params>Marketing > Landing Pages > Layout Templates > Create/Edit ability
DeleteDELETEhttps://pi.pardot.com/api/v5/objects/layout-templates/<id>Marketing > Landing Pages > Layout Templates > Delete ability
QueryGEThttps://pi.pardot.com/api/v5/objects/layout-templates?<params>Marketing > Landing Pages > Layout Templates > View ability

Fields

Required Editable Fields

FieldTypeDescription
nameStringName of the object for identification in Pardot.
layoutContentStringHTML content of this layout template encoded as JSON string.

Optional Editable Fields

FieldTypeDescription
formContentStringHTML content encoded as JSON string that controls form display logic. Uses default values if not provided.
siteSearchContentStringHTML content encoded as JSON string that controls the site search content. Uses default values if not provided.
isIncludeDefaultCssBooleanTrue if not supplying custom CSS styling.
folderIdIntegerID of the folder containing this object. Uses the asset type's uncategorized folder if not specified on create.

Read-Only Fields

FieldTypeDescription
idIntegerID of this object.
isDeletedBooleanTrue if this object is in the recycle bin in Pardot.
createdAtDateTimeCreation time of this object.
updatedAtDateTimeLast updated time for the object.
createdByIdIntegerID of the user who created the object.
updatedByIdIntegerID of the user who last updated the object.
createdByUserUser object representing the user who created the object. See documentation for User for fields.
updatedByUserUser object representing the user who last updated the object. See documentation for User for fields.
folderFolderFolder object representing the folder containing this object. See documentation for Folder for fields.

Defaults

formContent

siteSearchContent

Layout Template Creation

A Layout Template POST request must have a JSON body with all of the required fields specified. Note that all HTML content must be JSON escaped.

Example request:

Example response:

This example does not show all the headers, and 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.

Layout Template Update

Updating a layout template follows the conventions described in the Version 5 Overview.

Layout Template Deletion

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.

Layout Template Query

Retrieving a collection of layout templates follows the conventions described in Version 5 Overview.

Sortable Fields

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:

Filtering Results

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.

ParameterDescription
idReturns any layout templates where ID is equal to the given integer value.
idGreaterThanReturns any layout templates where ID is greater than the specified value, non-inclusive.
idGreaterThanOrEqualToReturns any layout templates where ID is greater than or equal to the specified value.
idLessThanReturns any layout templates where ID is less than the specified value, non-inclusive.
idLessThanOrEqualToReturns any layout templates where ID is less than or equal to the specified value.

Example request:

Example response: