Pardot's developer content is getting a makeover! Starting July 12th, you’ll be redirected to our new site.

Custom Redirect Resources

Track links on your website or third-party site with Pardot’s custom redirects. For example, you can track a link on your Twitter page or a banner ad on a third-party site. When a user clicks a link, a corresponding activity is created on their profile. Learn about custom redirects in Salefsorce Help.

Note: Include the authentication header with every request. For information on how to authenticate, see Authentication.

Resource Name Operation Description
Custom Redirect Read GET Request information for a single custom redirect record.
Custom Redirect Query GET Request information for custom redirects that match the specified criteria.

Custom Redirect Read

Request information for a single custom redirect record.

URI

/api/customRedirect/version/3/do/read/id/<ID>

Replace <ID> with the Pardot ID of the custom redirect.

Example

Request the information for the custom redirect with ID 1234.

/api/customRedirect/version/3/do/read/id/1234

Custom Redirect Query

Requests information about custom redirects that match the specified criteria. You can specify the custom redirects and fields to request. A maximum of 200 custom redirects are returned. To return all custom redirects, specify the output as mobile.

Note: To request information about a specific custom redirect, use Custom Redirect Read.

URI

/api/customRedirect/version/3/do/query?...

Parameters to Select Custom Redirects

Use these parameters to specify the custom redirects to return. Parameters can be used in any combination and in any order unless otherwise specified.

Notes:

Parameter Type Possible Values Description
created_after string today, yesterday, last_7_days, this_month, last_month,<custom_time> Requests custom redirects created after the specified time. Example: To request custom redirects created in 2020, use //api/customRedirect/version/3/do/query?created_after=2019-12-31%2024:59:59.
created_before string today, yesterday, last_7_days, this_month, last_month, <custom_time> Requests custom redirects created before the specified date and time. Doesn’t include custom redirects created at the specified time. Example: To request custom redirects created before today (but not created today), use /api/customRedirect/version/3/do/query?created_before=today.
id_greater_than integer Any positive integer Requests custom redirects that have an ID greater than the specified number.
id_less_than integer Any positive integer Returns custom redirects that have an ID less than the specified number.
updated_after string today, yesterday, last_7_days, this_month, last_month, <custom_time> Requests custom redirects that were last updated after the specified date and time.
updated_before string today, yesterday, last_7_days, this_month, last_month, <custom_time> Selects custom redirects that were last updated before the specified date and time.

Parameters to Specify Which Results Are Returned

Use these parameters to specify which custom redirect fields are returned, and how the custom redirects are sorted.

Parameter Type Possible Values Description
limit integer Any integer from 1 through 200. The number of custom redirects to return. Default value is 200.
offset integer Any positive integer The number of custom redirects to omit from the response (the number to "skip over"). Example: Retrieve a list of custom redirects, omitting the 50 most recently updated custom redirects. Sort the query by the updated_at field and use offset=50: api/customRedirect/version/3/do/query?sort_by=updated_at&offset=50
sort_by string created_at, id The field by which the results are sorted. See Sort Order.
sort_order string ascending, descending, updated_at The sort order. The default value depends on which sort_by parameter you specify. See Sort Order.

Sort Order

Use the sort_by parameter to specify which field Pardot uses to sort the results. Different fields have different default sort orders.

Value Default Sort Order Description
created_at descending Sort the results by the custom redirects' created_at timestamps.
id ascending Sort the results by the custom redirects' id fields.
updated_at descending Sort the results by the custom redirects' updated_at timestamps.

XML Response

The XML response for a query request contains information about multiple custom redirects. The XML response for a read request contains information about a single custom redirect.

XML Response for a Custom Redirect Query

<rsp stat="ok" version="1.0">
    <result>
        <total_results>...</total_results>
        <customRedirect>...</customRedirect>
        <customRedirect>...</customRedirect>
        <customRedirect>...</customRedirect>
    </result>
</rsp>
Tag Description
<result> Parent tag. The custom redirects that match the parameters specified in your query.
<total_results> The number of custom redirects selected by the query. Note: The query request returns a maximum of 200 custom redirects. If your query matches more than 200 custom redirects, you can make several requests to retrieve all matching custom redirects.
<customRedirect> The information for a single custom redirect. See Custom Redirect in Object Field References.

XML Response for a Custom Redirect Read

<rsp stat="ok" version="1.0">
  <customRedirect>
    <id>21</id>
    <name>Linkedin Home Page</name>
    <url>http://www2.pardot.com/l/1/2021-09-21/EMDL2</url>
    <destination_url>http://www.linkedin.com</destination_url>
    <campaign>
        <id>2</id>
        <name>LinkedIn</name>
    </campaign>
    <created_at>2021-09-21 18:47:42</created_at>
    <updated_at>2021-09-22 12:37:29</updated_at>
  </customRedirect>
</rsp>
Tag Description
<customRedirect> The information for a single custom redirect. See Custom Redirect in Object Field References.