Salesforce logSalesforce

Form Object

Use forms to collect visitor information and create identified prospects. Learn more about forms in Salesforce Help.

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

Note

Form Resources

Resource NameOperationDescription
Form QueryGETRequest information for the forms that match the specified criteria.
Form ReadGETRequest information for a single form.

Form Query

Request information for forms that match the specified criteria. You can specify the forms and fields to request. A maximum of 200 records are returned. To return all forms, specify the output as mobile.

URI

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

Parameters to Select Forms

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

Notes:

ParameterTypePossible ValuesDescription
created_afterstringtoday, yesterday, last_7_days, this_month, last_month,<custom_time>Request forms created after the specified time. Example: To request forms created in 2020, use /api/form/version/3/do/query?created_after=2019-12-31 24:59:59.
created_beforestringtoday, yesterday, last_7_days, this_month, last_month, <custom_time>Request forms created before the specified time. Doesn’t include forms created at the specified time. Example: to request forms created before today (but not created today), use /api/form/version/3/do/query?created_before=today.
id_greater_thanintegerAny positive integerRequest forms that have a Pardot ID greater than the specified number.
id_less_thanintegerAny positive integerRequest forms that have a Pardot ID less than the specified number.
updated_afterstringtoday, yesterday, last_7_days, this_month, last_month, <custom_time>Request forms that were last updated after the specified time.
updated_beforestringtoday, yesterday, last_7_days, this_month, last_month, <custom_time>Request forms that were last updated before the specified time.

Parameters to Specify Which Results Are Returned

Use these parameters to specify which forms to return, and how the forms are sorted.

ParameterTypePossible ValuesDescription
limitintegerAny integer from 1 through 200.The number of forms to return. Default value is 200.
offsetintegerAny positive integerThe number of forms to omit from the response (the number to "skip over"). Example: Retrieve a list of forms, omitting the 50 most recently updated forms. Sort the query by the updated_at field and use offset=50: /api/form/version/3/do/query?sort_by=updated_at&offset=50
sort_bystringcreated_at, id, updated_atThe field by which the results are sorted. See Sort Order.
sort_orderstringascending, descendingThe sort order. The default value depends on which sort_by parameter you specify. See Sort Order.

Sort Order

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

ValueDefault Sort OrderDescription
created_atdescendingSort the results by the forms' created_at timestamps.
idascendingSort the results by the forms' id fields.
updated_atdescendingSort the results by the forms' updated_at timestamps.

Form Read

Request information for a single form.

URI

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

Replace <ID> with the Pardot ID of the form.

Example

Request information about the form with ID 1234.

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

XML Response

The XML response for a query request contains information for multiple forms. The XML response for a read request contains information for a single form.

XML Response for a Form Query

<rsp stat="ok" version="1.0">
    <result>
        <total_results>...</total_results>
        <form>...</form>
        <form>...</form>
        <form>...</form>
    </result>
</rsp>
TagDescription
<result>Contains the information about the forms that match the parameters specified in your query.
<total_results>Contains the number of forms selected by the query. Note: The query request returns a maximum of 200 forms. If your query matches more than 200 forms, you can make several requests to retrieve all matching forms.
<form>The information about an individual form. See Form in Object Field References for a complete description of fields.

XML Response for a Form Read

<?xml version="1.0" encoding="UTF-8"?>
<rsp stat="ok" version="1.0">
    <form>
        <id>38756</id>
        <name>Demo Request</name>
        <campaign>
            <id>113156</id>
            <name>Website Tracking</name>
        </campaign>
        <embedCode> </embedCode>
        <created_at>2020-04-20 00:00:00</created_at>
        <updated_at>2020-10-15 12:25:17</updated_at>
    </form>
</rsp>
TagDescription
<form>The information about an individual form. See Form in Object Field References for a complete description of fields.
<campaign>Contains the Pardot ID and name of the campaign to which this form is assigned.
<embedCode>Contains the iframe of the form that you can embed on your webpage.