Retrieve a list of campaigns
get
/api/rest/2.0/assets/campaigns
Retrieves all campaigns that match the criteria specified by the request parameters.
Request
Supported Media Types
- application/json
Query Parameters
-
count: integer
Maximum number of entities to return. Must be less than or equal to 1000 and greater than or equal to 1.
-
depth: string
Level of detail returned by the request. Eloqua APIs can retrieve entities at three different levels of depth:
minimal
,partial
, andcomplete
. The default value isminimal
. -
lastUpdatedAt: integer
The date and time the campaign was last updated.
-
orderBy: string
Specifies the field by which list results are ordered.
-
page: integer
Specifies which page of entities to return (the count parameter defines the number of entities per page). If the page parameter is not supplied, 1 will be used by default.
-
search: string
Specifies the search criteria used to retrieve entities. See the tutorial for information about using this parameter.
Response
Supported Media Types
- application/json
200 Response
OK
Root Schema : QueryResultCampaign
Type:
object
Title:
Show Source
QueryResultCampaign
-
elements:
array elements
Array of campaign fields.
-
page:
integer
The specified page.
-
pageSize:
integer
The page size.
-
total:
integer
The total amount of results.
-
type:
string
The asset's type in Eloqua.
Nested Schema : elements
Type:
array
Array of campaign fields.
Show Source
-
Array of:
object Campaign
Title:
Campaign
Nested Schema : Campaign
Type:
object
Title:
Show Source
Campaign
-
actualCost:
string
The campaign's actual cost.
-
adCampaignId:
string
Campaign_Field_AdCampaignId_Description
-
badgeId:
string
The badge id of the campaign.
-
budgetedCost:
string
The campaign's projected cost.
-
campaignCategory:
string
Defines whether a Campaign is simple or multi-step. The value
emailMarketing
should be used for simple campaigns, andcontact
for multi-step campaigns. -
campaignClassification:
string
Campaign_Field_CampaignClassification_Description
-
campaignType:
string
The campaign's type.
-
clrEndDate:
string
The end date of the clr.
-
createdAt:
string
Read Only:
true
The date and time the campaign was created, expressed in Unix time. -
createdBy:
string
Read Only:
true
The login id of the user who created the campaign. -
createdByName:
string
The name of the user who created the campaign.
-
crmId:
string
The id of the customer relationship management application. When sending update requests, if
crmId
is not included in the request and acrmId
value exists, it will be blanked. -
currentStatus:
string
The campaign's current status:
Active
,Draft
,Scheduled
, orCompleted
. -
depth:
string
Read Only:
true
Level of detail returned by the request. Eloqua APIs can retrieve entities at three different levels of depth:minimal
,partial
, andcomplete
. For more information, see Request depth. -
description:
string
The description of the campaign.
-
elements:
array elements
A list of campaign elements.
-
endAt:
string
The date and time the campaign will end.
-
fieldValues:
array fieldValues
Array containing
type
andid
values for all of the contactFields associated with a given contact. For campaigns, "fieldValues" include all custom campaign fields (type, id, value). -
firstActivation:
string
Read Only:
true
The date and time the campaign was originally activated. -
folderId:
string
Read Only:
true
The folder id of the folder which contains the campaign. -
id:
string
Read Only:
true
Id of the campaign. -
isBypassHistoryDisabled:
string
Campaign_Field_IsBypassHistoryDisabled_Description
-
isEmailMarketingCampaign:
string
Whether or not the campaign is an email marketing campaign.
-
isExitHistoryDisabled:
string
Campaign_Field_IsExitHistoryDisabled_Description
-
isIncludedInROI:
string
Whether or not the campaign is included in return on investment.
-
isMemberAllowedReEntry:
string
Whether or not members are allowed to re-enter the campaign.
-
isReadOnly:
string
Whether or not the campaign is read only.
-
isSyncedWithCRM:
string
Whether or not the campaign is synced with a customer relationship management application.
-
isUpdatingCrmId:
string
Campaign_Field_IsUpdatingCrmId_Description
-
memberCount:
string
Read Only:
true
The amount of members that entered the campaign in the last 90 days. This property is only returned whendepth
is set topartial
orcomplete
. This is a read-only property. -
name:
string
The name of the campaign.
-
permissions:
array permissions
The permissions for the campaign granted to your current instance. This is a read-only property.
-
product:
string
The campaign's product value.
-
referenceProduct:
string
Campaign_Field_ReferenceProduct_Description
-
region:
string
The campaign's region value.
-
runAsUserId:
string
The login id of the user to activate the campaign.
-
scheduledFor:
string
Read Only:
true
The date the campaign is scheduled. -
sourceTemplateId:
string
Id of the template used to create the asset.
-
startAt:
string
The date time for which the campaign will activate, expressed in Unix time.
-
type:
string
The asset's type in Eloqua. This is a read-only property.
-
updatedAt:
string
Read Only:
true
Unix timestamp for the date and time the campaign was last updated. This is a read-only property. -
updatedBy:
string
Read Only:
true
The login id of the user that last updated the campaign. -
updatedByName:
string
The name of the user who last updated the campaign.
Nested Schema : elements
Type:
array
A list of campaign elements.
Show Source
-
Array of:
object CampaignElement
Title:
CampaignElement
Nested Schema : fieldValues
Type:
array
Array containing
Show Source
type
and id
values for all of the contactFields associated with a given contact. For campaigns, "fieldValues" include all custom campaign fields (type, id, value).-
Array of:
object FieldValue
Title:
FieldValue
Nested Schema : permissions
Type:
array
The permissions for the campaign granted to your current instance. This is a read-only property.
Show Source
Nested Schema : CampaignElement
Type:
object
Title:
Show Source
CampaignElement
-
createdAt:
string
Read Only:
true
The date and time the campaign element was created, expressed in Unix time. -
createdBy:
string
Read Only:
true
The login id of the user who created the campaign element. -
createdByName:
string
The name of the user who created the campaign element.
-
currentStatus:
string
The campaign element's current status.
-
depth:
string
Read Only:
true
Level of detail returned by the request. Eloqua APIs can retrieve entities at three different levels of depth:minimal
,partial
, andcomplete
. Any other values passed are reset tocomplete
by default. For more information, see Request depth. -
description:
string
The description of the campaign element.
-
folderId:
string
Read Only:
true
Id of the associated folder. -
id:
string
Read Only:
true
Id of the campaign element. This is a read-only property. -
memberCount:
string
Amount of members within the campaign element. This is a read-only property.
-
memberErrorCount:
string
Amount of members within the campaign element in errored status. This is a read-only property.
-
name:
string
Name of the campaign element. This is a read-only property.
-
outputTerminals:
array outputTerminals
A list of the campaign element ids within the campaign. This is a read-only property.
-
permissions:
array permissions
The permissions for the campaign element granted to your current instance. This is a read-only property.
-
position:
object Position
Title:
Position
-
scheduledFor:
string
Read Only:
true
The date the campaign element is scheduled. -
sourceTemplateId:
string
The id of the source template.
-
type:
string
The asset's type in Eloqua. This is a read-only property.
-
updatedAt:
string
Read Only:
true
Unix timestamp for the date and time the campaign element was last updated. -
updatedBy:
string
Read Only:
true
The login id of the user that last updated the campaign element. -
updatedByName:
string
The name of the user who last updated the campaign element.
Nested Schema : outputTerminals
Type:
array
A list of the campaign element ids within the campaign. This is a read-only property.
Show Source
-
Array of:
object CampaignOutputTerminal
Title:
CampaignOutputTerminal
Nested Schema : permissions
Type:
array
The permissions for the campaign element granted to your current instance. This is a read-only property.
Show Source
Nested Schema : Position
Type:
object
Title:
Show Source
Position
-
type:
string
The campaign element's type. This is a read-only property.
-
x:
string
The position of the campaign element on the x axis.
-
y:
string
The position of the campaign element on the y axis.
Nested Schema : CampaignOutputTerminal
Type:
object
Title:
Show Source
CampaignOutputTerminal
-
connectedId:
string
The connected id of the campaign output terminal. This is a read-only property.
-
connectedType:
string
The campaign output terminal's connection type. This is a read-only property.
-
createdAt:
string
Read Only:
true
The date and time the campaign output terminal was created, expressed in Unix time. -
createdBy:
string
Read Only:
true
The login id of the user who created the campaign output terminal. -
createdByName:
string
The name of the user who created the campaign output terminal.
-
currentStatus:
string
The campaign output terminal's current status.
-
depth:
string
Read Only:
true
Level of detail returned by the request. Eloqua APIs can retrieve entities at three different levels of depth:minimal
,partial
, andcomplete
. For more information, see Request depth. -
description:
string
The description of the campaign output terminal.
-
folderId:
string
Read Only:
true
Id of the associated folder. -
id:
string
Read Only:
true
Id of the campaign output terminal. This is a read-only property. -
name:
string
Name of the campaign output terminal.
-
permissions:
array permissions
The permissions for the campaign output terminal granted to your current instance.
-
scheduledFor:
string
Read Only:
true
The date the campaign output terminal is scheduled. -
sourceTemplateId:
string
The id of the source template.
-
terminalType:
string
The campaign output terminal type. This is a read-only property.
-
type:
string
The asset's type in Eloqua. This is a read-only property.
-
updatedAt:
string
Read Only:
true
Unix timestamp for the date and time the campaign output terminal was last updated. This is a read-only property. -
updatedBy:
string
Read Only:
true
The login id of the user that last updated the campaign output terminal. -
updatedByName:
string
The name of the user who last updated the campaign output terminal.
Nested Schema : permissions
Type:
array
The permissions for the campaign output terminal granted to your current instance.
Show Source
Nested Schema : FieldValue
Type:
object
Title:
Show Source
FieldValue
-
id:
string
Read Only:
true
The id of the field to be set to the corresponding value. -
name:
string
Name of the field value.
-
type:
string
The asset's type in Eloqua. This is a read-only property.
-
value:
string
The value to set the corresponding field id to. Date values must be submitted as a unix timestamp.
400 Response
Bad request. See Status Codes for information about other possible HTTP status codes.
401 Response
Unauthorized. See Status Codes for information about other possible HTTP status codes.
403 Response
Forbidden. See Status Codes for information about other possible HTTP status codes.
404 Response
The requested resource was not found. See Status Codes for information about other possible HTTP status codes.
500 Response
The service has encountered an error. See Status Codes for information about other possible HTTP status codes.
Examples
Retrieve the first 2 campaigns in your database:
Note:
See URL parameters for more information on how to customize requests.
GET /api/REST/2.0/assets/campaigns?count=2&page=1
Response:
{
"elements":[
{
"type":"Campaign",
"id":"2",
"createdAt":"1403035873",
"createdBy":"15",
"depth":"minimal",
"folderId":"308",
"name":"Test",
"updatedAt":"1403035877",
"updatedBy":"15"
},
{
"type":"Campaign",
"currentStatus":"Draft",
"id":"3",
"createdAt":"1403041992",
"createdBy":"15",
"depth":"minimal",
"folderId":"308",
"name":"Untitled Campaign",
"updatedAt":"1403041992",
"updatedBy":"15"
}
],
"page":1,
"pageSize":2,
"total":2
}