Campaign Object
An Account Engagement campaign tracks the first interaction that a person has with your online marketing materials. Associate your assets to an Account Engagement campaign to organize and track your marketing efforts. Learn more about Account Engagement campaigns in Salesforce Help.
Include the authentication header with every request. For information on how to authenticate, see Authentication.
The API to access the Campaign object collection follows the conventions described in Version 5 Overview.
Operation | Verb | URL Format | Ability Requirements |
---|---|---|---|
Read | GET | https://pi.pardot.com/api/v5/objects/campaigns/<id>?<params> | Marketing > Other > Campaigns > View |
Query | GET | https://pi.pardot.com/api/v5/objects/campaigns?<params> | Marketing > Other > Campaigns > View |
Connect Salesforce Campaign | POST | https://pi.pardot.com/api/v5/objects/campaigns/<id>/do/connectSalesforceCampaign | Marketing > Other > Campaigns > Create |
Add Tag | POST | https://pi.pardot.com/api/v5/objects/campaigns/<id>/do/addTag | Marketing > Other > Campaigns > Create AND Marketing > Segmentation > Tags > Create |
Remove Tag | POST | https://pi.pardot.com/api/v5/objects/campaigns/<id>/do/removeTag | Marketing > Other > Campaigns > Create AND Marketing > Segmentation > Tags > Create |
Field | Type | Description |
---|---|---|
id | Integer | ID of the object. |
name | String | Name of the object for identification in Account Engagement. |
isDeleted | Boolean | True if the object is in the recycle bin in Account Engagement. |
folderId | Integer | ID of the folder containing this object. |
cost | Float | Cost of the campaign object. |
parentCampaignId | Integer | The ID of the parent campaign. |
createdById | Integer | ID of the individual who created this object. |
updatedById | Integer | ID of the individual who last updated this object. |
createdAt | DateTime | The timestamp of when this object was created. |
updatedAt | DateTime | The timestamp of when this object was last updated. |
salesforceId | String | Salesforce Id of the object. |
folder | Folder | JSON object representing the folder for this object. See documentation for folder for fields. |
createdBy | User | User object representing the user who created this object. See documentation for User for fields. |
updatedBy | User | User object representing the user who last updated this object. See documentation for User for fields. |
parentCampaign | Campaign | Campaign object representing the parent campaign for this campaign. See documentation for Campaign for fields. |
Retrieve a single campaign object following the conventions described in the Version 5 Overview.
Example request:
Example response:
Retrieving a collection of campaigns 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
createdAt
updatedAt
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 campaigns where ID is equal to the given integer value. |
idList | Returns any campaigns where ID is included in the given list of values. |
idGreaterThan | Returns any campaigns where ID is greater than the specified value, non-inclusive. |
idGreaterThanOrEqualTo | Returns any campaigns where ID is greater than or equal to the specified value. |
idLessThan | Returns any campaigns where ID is less than the specified value, non-inclusive. |
idLessThanOrEqualTo | Returns any campaigns where ID is less than or equal to the specified value. |
name | Returns any campaigns where Name is equal to the given string value. |
createdAt | Returns any campaigns where CreatedAt is equal to the given datetime value. |
createdAtAfter | Returns any campaigns where CreatedAt is after the given datetime value, non-inclusive. |
createdAtAfterOrEqualTo | Returns any campaigns where CreatedAt is after or equal to the given datetime value. |
createdAtBefore | Returns any campaigns where CreatedAt is before the given datetime value, non-inclusive. |
createdAtBeforeOrEqualTo | Returns any campaigns where CreatedAt is before or equal to the given datetime value. |
updatedAt | Returns any campaigns where UpdatedAt is equal to the given datetime value. |
updatedAtAfter | Returns any campaigns where UpdatedAt is after the given datetime value, non-inclusive. |
updatedAtAfterOrEqualTo | Returns any campaigns where UpdatedAt is after or equal to the given datetime value. |
updatedAtBefore | Returns any campaigns where UpdatedAt is before the given datetime value, non-inclusive. |
updatedAtBeforeOrEqualTo | Returns any campaigns where UpdatedAt is before or equal to the given datetime value. |
deleted | Determines whether to return deleted records. The value can be false (default), true , or all . |
Example request:
Example response:
Associates an Account Engagement campaign to a Salesforce campaign. The field salesforceCampaignId
is required.
Example Request
Example Response
Adds a Tag to the Campaign object, which creates a TaggedObject.
Example Request
Example Response
Remove a tag from a Campaign object. When you remove a tag, the associated TaggedObject record is deleted.
Example Request
Example Response
Returns code 204 no content
.