Retrieve a campaign
get
/api/rest/2.0/assets/campaign/{id}
Retrieves a single campaign specified by the
id
parameter.Request
Supported Media Types
- application/json
Path Parameters
-
id(required): integer
Id of the campaign.
Query Parameters
-
depth: string
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.
Response
Supported Media Types
- application/json
200 Response
OK
Root 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 campaign asset with Id #12:
GET /api/REST/2.0/assets/campaign/12?depth=complete
Response:
{
"type": "Campaign",
"currentStatus": "Draft",
"id": "12",
"createdAt": "1461773489",
"createdBy": "11",
"depth": "complete",
"description": "Super simple nurture campaign.",
"folderId": "308",
"name": "Super Simple Nurture Campaign",
"permissions": [
"Retrieve",
"SetSecurity",
"Delete",
"Update",
"Activate"
],
"sourceTemplateId": "8589934608",
"updatedAt": "1461775397",
"updatedBy": "11",
"elements": [
{
"type": "CampaignSegment",
"id": "257",
"name": "Segment members",
"memberCount": "0",
"outputTerminals": [
{
"type": "CampaignOutputTerminal",
"id": "252",
"connectedId": "258",
"connectedType": "CampaignWaitAction",
"terminalType": "out"
}
],
"position": {
"type": "Position",
"x": "365",
"y": "39"
},
"isFinished": "false",
"isRecurring": "false"
},
{
"type": "CampaignWaitAction",
"id": "258",
"name": "Wait",
"memberCount": "0",
"outputTerminals": [
{
"type": "CampaignOutputTerminal",
"id": "253",
"connectedId": "259",
"connectedType": "CampaignEmail",
"terminalType": "out"
}
],
"position": {
"type": "Position",
"x": "365",
"y": "131"
},
"waitFor": "3600"
},
{
"type": "CampaignEmail",
"id": "259",
"name": "Email 1",
"memberCount": "0",
"outputTerminals": [
{
"type": "CampaignOutputTerminal",
"id": "274",
"connectedId": "263",
"connectedType": "CampaignWaitAction",
"terminalType": "out"
}
],
"position": {
"type": "Position",
"x": "365",
"y": "222"
},
"includeListUnsubscribeHeader": "false",
"isAllowingResend": "false",
"isAllowingSentToMasterExclude": "false",
"isAllowingSentToUnsubscribe": "false",
"sendTimePeriod": "sendAllEmailAtOnce"
},
{
"type": "CampaignWaitAction",
"id": "263",
"name": "Wait",
"memberCount": "0",
"outputTerminals": [
{
"type": "CampaignOutputTerminal",
"id": "270",
"connectedId": "279",
"connectedType": "CampaignEmail",
"terminalType": "out"
}
],
"position": {
"type": "Position",
"x": "365",
"y": "316"
},
"waitFor": "259200"
},
{
"type": "CampaignEmail",
"id": "279",
"name": "Email 2",
"memberCount": "0",
"outputTerminals": [
{
"type": "CampaignOutputTerminal",
"id": "275",
"connectedId": "281",
"connectedType": "CampaignMoveToContactListAction",
"terminalType": "out"
}
],
"position": {
"type": "Position",
"x": "365",
"y": "409"
},
"includeListUnsubscribeHeader": "true",
"isAllowingResend": "false",
"isAllowingSentToMasterExclude": "false",
"isAllowingSentToUnsubscribe": "false",
"sendTimePeriod": "sendAllEmailAtOnce"
},
{
"type": "CampaignMoveToContactListAction",
"id": "281",
"name": "Move to Shared List",
"memberCount": "0",
"position": {
"type": "Position",
"x": "365",
"y": "501"
}
}
],
"isReadOnly": "false",
"actualCost": "0.00",
"budgetedCost": "0.00",
"campaignCategory": "contact",
"campaignType": "",
"fieldValues": [
{
"type": "FieldValue",
"id": "4",
"value": ""
},
{
"type": "FieldValue",
"id": "5",
"value": ""
},
{
"type": "FieldValue",
"id": "6",
"value": ""
},
{
"type": "FieldValue",
"id": "7",
"value": ""
}
],
"isEmailMarketingCampaign": "false",
"isIncludedInROI": "true",
"isMemberAllowedReEntry": "false",
"isSyncedWithCRM": "true",
"product": "",
"region": ""
}