Landing Page Redirect Rules

Landing Page Redirect Rules Endpoint Reference

Marketo offers a set of REST APIs for performing CRUD operations on Landing Page Redirect URLs.  These APIs follow the standard interface pattern for asset APIs providing Query, Create, Update, and Delete options.

Landing Page Redirect Rules provide the capability to redirect a landing page URL to another page URL.   You can redirect Marketo landing pages, non-Marketo landing pages, or combinations thereof.   Additional information on Redirect Landing Page Rules can be found here.

Query

Querying landing page redirect rules follows the standard query types for assets of by id, and browsing.

By Id

The Get Landing Page Redirect Rules by Id endpoint takes a single landing page rule redirect id path parameter and returns a single landing page redirect rule record.

Browse

The Get Landing Page Redirect Rules endpoint returns a list of landing page redirect rule records.

There are several optional query parameters that can be passed to filter results.

The offset parameter is an integer that specifies the maximum number of entries to return (default is 20).  Maximum is 200.  The maxReturn parameter is an integer that specifies where to begin retrieving entries.  Can be used on conjunction with offset (default is 0).

The hostname parameter can be used to filter on hostname of the landing pages.

The redirectToLandingPageId is an integer that can be used to filter on the Id of landing page that you are redirecting to.  The redirectToPath can be used to to filter on the path of the landing pages that you are redirecting to.

The earliestUpdatedAt and latestUpdatedAt parameters allow you to set low and high datetime watermarks for returning landing page redirect rules which were either updated or initially created within the given range.

Create

The Create Landing Page Redirect Rule endpoint is executed with an application/x-www-form-urlencoded POST that has the following three required parameters.

The hostname parameter specifies the hostname for the landing page.  This should belong to a branding domain or alias.  Maximum length is 255 characters.

The redirectFrom parameter specifies the source landing page.  This is a JSON object that contains a type/value pair which determines whether the source is a Marketo landing page, or a non-Marketo landing page.  The type attribute can be either “landingPageId” or “path”.

Landing Page Type redirectFrom type Example
Marketo landingPageId
{"type":"landingPageId","value":"2738"}
Non-Marketo path
{"type":"path","value":"lp/622-LME-718/welcome.html"}

The redirectTo parameter specifies the target landing page.  This is a JSON object that contains a type/value pair which determines whether the source is a Marketo landing page, or a non-Marketo landing page.  The type attribute can be either “landingPageId” or “url”.

Landing Page Type redirectTo type Example
Marketo landingPageId
{"type":"landingPageId","value":"1774"}
Non-Marketo url
{"type":"url","value":"www.contactLogs.com"}

More information on creating landing page redirect rules can be found here.

Update

The Update Landing Page Redirect Rules endpoint takes a single landing page redirect rule id path parameter.  This endpoint is executed with an application/x-www-form-urlencoded POST.

As with the create call described above, one or more of the following query parameters are passed to specify which attribute of the rule to update: hostname, redirectFrom, redirectTo.

The updated landing page redirect rule record is returned in the response.

Delete

The Delete Landing Page Redirect Rule by Id endpoint takes a single landing page rule redirect id path parameter.

Browse Landing Page Domains

The Get Landing Page Domains endpoint returns a list of landing page domain records.

There are two optional query parameters that can be passed to filter results.

The offset parameter is an integer that specifies the maximum number of entries to return (default is 20, maximum is 200).

The maxReturn parameter is an integer that specifies where to begin retrieving entries.  Can be used on conjunction with offset (default is 0).