Campaigns
The API to access the Campaign object collection follows the conventions described in Version 5 Overview.
Supported Operations
Operation | HTTP Verb | URL Format | Ability Requirements |
---|---|---|---|
Read | GET |
https://pi.pardot.com/api/v5/objects/campaigns/<id>?<params> |
Marketing > Other > Campaigns > View ability |
Query | GET |
https://pi.pardot.com/api/v5/objects/campaigns?<params> |
Marketing > Other > Campaigns > View ability |
Fields
Required Editable Fields
None.
Optional Editable Fields
None.
Read-Only Fields
Field | Type | Description |
---|---|---|
id |
Integer | ID of the object. |
name |
String | Name of the object for identification in Pardot. |
isDeleted |
Boolean | True if the object is in the recycle bin in Pardot. |
folderId |
Integer | ID of the folder containing this object. |
folder |
Folder | JSON object representing the folder for this object. See documentation for folder for fields. |
Campaign Read
Retrieve a single campaign object following the conventions described in the Version 5 Overview.
Example request:
GET /api/v5/objects/campaigns/101?fields=id,name,isDeleted
Host: pi.pardot.com
Authorization: Bearer <access-token>
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": 101,
"name": "My Campaign",
"isDeleted": "false"
}
Campaign Query
Retrieving a collection of campaigns 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:
GET /api/v5/objects/campaigns?fields=id,name,isDeleted&orderBy=id
Host: pi.pardot.com
Authorization: Bearer <access-token>
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
{
"values": [
{
"id": 101,
"name": "My Campaign",
"isDeleted": "false"
}
]
}
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.
Parameter | Description |
---|---|
id |
Returns any campaigns where ID is equal to the given integer value. |
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. |
Example request:
GET /api/v5/objects/campaigns?fields=id,name&orderBy=id desc&idGreaterThan=200&idLessThan=300
Host: pi.pardot.com
Authorization: Bearer <access-token>
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
{
"values": [
{
"id": 283,
"name": "Winter Sale Campaign"
},
{
"id": 282,
"name": "Spring Sale Campaign"
},
{
"id": 239,
"name": "Promotion Campaign"
},
{
"id": 202,
"name": "Rewards Campaign"
}
]
}