Retrieve a list of contacts
get
/api/REST/1.0/data/contacts
Retrieves all contacts that match the criteria specified by the request parameters
Request
Supported Media Types
- application/json
Query Parameters
-
count(optional): integer
Maximum number of entities to return. Must be less than or equal to 1000 and greater than or equal to 1.
-
depth(optional): 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 tominimal
by default. -
lastUpdatedAt(optional): integer
Unix timestamp for the date and time the contact was last updated. This is a read-only property.
-
orderBy(optional): string
Specifies the field by which list results are ordered.
-
page(optional): 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(optional): string
Specifies the search criteria used to retrieve entities. See the tutorial for information about using this parameter.
-
viewId(optional): integer
Id of the contact view to filter results. Must be a valid contact view id. Example:
?viewId=100006
.
Response
Supported Media Types
- application/json
200 Response
OK
Root Schema : QueryResultContact
Type:
object
Title:
Show Source
QueryResultContact
-
elements(optional):
array elements
Array of contact fields.
-
page(optional):
integer
The specified page.
-
pageSize(optional):
integer
The page size.
-
total(optional):
integer
The total amount of results.
-
type(optional):
string
The asset's type in Eloqua.
Nested Schema : elements
Type:
array
Array of contact fields.
Show Source
-
Array of:
object Contact
Title:
Contact
Nested Schema : Contact
Type:
object
Title:
Show Source
Contact
-
accessedAt(optional):
string
Read Only:
true
The date and time the contact was last accessed, expressed in Unix time. -
accountId(optional):
string
The account id in which the contact belongs. This is a read-only property.
-
accountName(optional):
string
The account name in which the contact belongs.
-
address1(optional):
string
The contact's first address.
-
address2(optional):
string
The contact's second address.
-
address3(optional):
string
The contact's third address.
-
bouncebackDate(optional):
string
The contact's bounceback date.
-
businessPhone(optional):
string
The contact's business phone number.
-
city(optional):
string
The contact's city.
-
country(optional):
string
The contact's country.
-
createdAt(optional):
string
Read Only:
true
The date and time the contact was created, expressed in Unix time. -
createdBy(optional):
string
Read Only:
true
The login id of the user who created the contact. -
currentStatus(optional):
string
The contact's current status.
-
depth(optional):
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(optional):
string
The description of the contact.
-
emailAddress(optional):
string
The contact's email address.
-
emailFormatPreference(optional):
string
The contact's email format preference.
-
fax(optional):
string
The contact's fax number.
-
fieldValues(optional):
array fieldValues
Array containing
type
andid
values for all of the contactFields associated with a given contact. -
firstName(optional):
string
The contact's first name.
-
id(optional):
string
Read Only:
true
Id of the contact. This is a read-only property. -
isBounceback(optional):
string
Whether or not the contact has any associated bouncebacks.
-
isSubscribed(optional):
string
Whether or not the contact is subscribed.
-
lastName(optional):
string
The contact's last name.
-
mobilePhone(optional):
string
The contact's mobile phone number.
-
name(optional):
string
The name of the contact.
-
permissions(optional):
string
The permissions for the contact granted to your current instance. This is a read-only property.
-
postalCode(optional):
string
The contact's postal code.
-
province(optional):
string
The contact's province.
-
salesPerson(optional):
string
The contact's account representative.
-
subscriptionDate(optional):
string
The contact's subscription date.
-
title(optional):
string
The contact's title.
-
type(optional):
string
The asset's type in Eloqua. This is a read-only property.
-
unsubscriptionDate(optional):
string
The contact's unsubscription date.
-
updatedAt(optional):
string
Read Only:
true
Unix timestamp for the date and time the contact was last updated. -
updatedBy(optional):
string
Read Only:
true
The login id of the user that last updated the contact.
Nested Schema : fieldValues
Type:
array
Array containing
Show Source
type
and id
values for all of the contactFields associated with a given contact.-
Array of:
object FieldValue
Title:
FieldValue
Nested Schema : FieldValue
Type:
object
Title:
Show Source
FieldValue
-
id(optional):
string
Read Only:
true
The id of the field to be set to the corresponding value. -
type(optional):
string
The asset's type in Eloqua. This is a read-only property.
-
value(optional):
string
The value to set the corresponding field id to. Date values must be submitted as a unix timestamp.
204 Response
No matching contacts 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 contacts in your database:
GET /api/REST/1.0/data/contacts?count=2
Response:
{
"elements":[
{
"type":"Contact",
"id":"1",
"createdAt":"1403034086",
"depth":"minimal",
"name":"george.washington@america.com",
"updatedAt":"1410193024",
"emailAddress":"george.washington@america.com"
},
{
"type":"Contact",
"id":"2",
"createdAt":"1403113589",
"depth":"minimal",
"name":"john.a.macdonald@canada.com",
"updatedAt":"1403113589",
"emailAddress":"john.a.macdonald@canada.com"
}
],
"page":1,
"pageSize":2,
"total":527
}