Retrieve a list of activities
get
/api/REST/1.0/data/activities/contact/{id}
Retrieves all activities that match the criteria specified by the request parameters. Note that the query parameters
endDate
, startDate
, and type
are required. See activity detail values for more information about the different activity detail values for each asset type.Request
Supported Media Types
- application/json
Path Parameters
-
id(required): integer
Id of the activity.
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.
-
endDate(required): integer
The end date and time (10 digit integer Unix time).
-
startDate(required): integer
The start date and time (10 digit integer Unix time).
-
type(required): string
The type of activity you wish to retrieve from the specified contact:
emailOpen
,emailSend
,emailClickThrough
,emailSubscribe
,emailUnsubscribe
,formSubmit
,webVisit
, orcampaignMembership
.
Response
Supported Media Types
- application/json
200 Response
OK
Root Schema : Activity
Type:
object
Title:
Show Source
Activity
-
activityDate:
string
The date the activity was performed expressed in 10 digit integer Unix time. This is a read-only property.
-
activityType:
string
The activity's type. This is a read-only property.
-
asset:
string
Id of the associated asset. This is a read-only property.
-
assetType:
string
Type of the associated asset. This is a read-only property.
-
contact:
string
Id of the contact whose activity is being returned expressed in 10 digit integer Unix time. This is a read-only property.
-
details:
array details
An array of detail values, specific to individual activity types.
-
id:
string
Id of the activity. This is a read-only property.
-
type:
string
The asset's type in Eloqua. This is a read-only property.
Nested Schema : details
Type:
array
An array of detail values, specific to individual activity types.
Show Source
-
Array of:
object items
Additional Properties Allowed: additionalProperties
204 Response
No matching activities were found in the search.
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 "emailOpen" activities associated with the contact id #1 in the given time frame:
GET /api/REST/1.0/data/activities/contact/1?type=emailOpen&startDate=1262304000&endDate=1433808000&count=2
Response:
[
{
"type": "Activity",
"activityDate": "1424813164",
"activityType": "emailOpen",
"asset": "12",
"assetType": "email",
"contact": "2",
"details": [
{
"Key": "EmailWebLink",
"Value": ""
},
{
"Key": "IPAddress",
"Value": "10.156.127.40"
},
{
"Key": "EmailName",
"Value": "test"
},
{
"Key": "EmailRecipientID",
"Value": "88886ee8-fee9-4cee-85e8-2e16af3a5b53"
},
{
"Key": "DeploymentId",
"Value": "12345"
},
{
"Key": "EmailContent",
"Value": null
},
{
"Key": "SubjectLine",
"Value": "test"
}
],
"id": "15"
},
{
"type": "Activity",
"activityDate": "1424811308",
"activityType": "emailOpen",
"asset": "12",
"assetType": "email",
"contact": "2",
"details": [
{
"Key": "EmailWebLink",
"Value": ""
},
{
"Key": "IPAddress",
"Value": "10.156.127.40"
},
{
"Key": "EmailName",
"Value": "test"
},
{
"Key": "EmailRecipientID",
"Value": "88886ee8-fee9-4cee-85e8-2e16af3a5b53"
},
{
"Key": "DeploymentId",
"Value": "58921"
},
{
"Key": "EmailContent",
"Value": null
},
{
"Key": "SubjectLine",
"Value": "test"
}
],
"id": "14"
}
]