Retrieve account information
post
/api/rest/2.0/data/accounts
Retrieves account information for up to 200 accounts, searched by account id. Use the
depth
parameter when making the request to specify the account information returned in the response. Note that for accounts, minimal
and partial
depths return the same information.Request
Supported Media Types
- application/json
Header Parameters
-
X-HTTP-Method-Override(required): string(string)
The request header
X-HTTP-Method-Override
must be set with valueSEARCH
.Default Value:SEARCH
The request body defines the details of the request.
Root Schema : EntitySearchByIds
Type:
object
Title:
Show Source
EntitySearchByIds
-
depth:
string
Read Only:
true
Level of detail returned by the request. The default will beminimal
. Learn more about the depth parameter. -
ids:
array ids
The ids to retrieve. Maximum of 200 ids per request. If the array contains duplicate ids, or exceeds the 200 limit, a 400 Bad Request will be returned.
-
type:
string
The asset's type in Eloqua. This is a read-only property.
Nested Schema : ids
Type:
array
The ids to retrieve. Maximum of 200 ids per request. If the array contains duplicate ids, or exceeds the 200 limit, a 400 Bad Request will be returned.
Show Source
Response
Supported Media Types
- application/json
200 Response
OK.
Root Schema : Account
Type:
object
Title:
Show Source
Account
-
address1:
string
The account's first address.
-
address2:
string
The account's second address.
-
address3:
string
The account's third address.
-
businessPhone:
string
The account's business phone number.
-
city:
string
The account's city.
-
country:
string
The account's country.
-
createdAt:
string
Read Only:
true
The date and time the account was created, expressed in Unix time. -
createdBy:
string
Read Only:
true
The login id of the user who created the account. -
crmSystemMappings:
array crmSystemMappings
Lists CRM Users linked to the Account. Each
crmSystemMappings
contains atype
,CRMUsername
(s), and EloqualoginName
values for all of the Eloqua Users linked to the Account. This property is only returned if Eloqua Users are linked to the Account. For instructions on how to link Eloqua Users to Accounts, refer to thelinkUsers
parameter in this tutorial. This property is also only returned when the request depth iscomplete
. -
currentStatus:
string
The account'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 account.
-
fieldValues:
array fieldValues
Array containing
type
andid
values for all of the accountFields associated with a given account. -
folderId:
string
Read Only:
true
The folder id of the folder which contains the account. -
id:
string
Read Only:
true
Id of the account. This is a read-only property. -
name:
string
The name of the account.
-
permissions:
array permissions
The permissions for the account granted to your current instance. This is a read-only property.
-
postalCode:
string
The account's postal code.
-
province:
string
The account's province.
-
scheduledFor:
string
Read Only:
true
The date the account is scheduled. -
sourceTemplateId:
string
Id of the template used to create the asset.
-
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 account was last updated. -
updatedBy:
string
Read Only:
true
The login id of the user that last updated the account.
Nested Schema : crmSystemMappings
Type:
array
Lists CRM Users linked to the Account. Each
Show Source
crmSystemMappings
contains a type
, CRMUsername
(s), and Eloqua loginName
values for all of the Eloqua Users linked to the Account.
This property is only returned if Eloqua Users are linked to the Account. For instructions on how to link Eloqua Users to Accounts, refer to the linkUsers
parameter in this tutorial.
This property is also only returned when the request depth is complete
.-
Array of:
object CrmSystemMapping
Title:
CrmSystemMapping
Nested Schema : fieldValues
Type:
array
Array containing
Show Source
type
and id
values for all of the accountFields associated with a given account.-
Array of:
object FieldValue
Title:
FieldValue
Nested Schema : permissions
Type:
array
The permissions for the account granted to your current instance. This is a read-only property.
Show Source
Nested Schema : CrmSystemMapping
Type:
object
Title:
Show Source
CrmSystemMapping
-
createdAt:
string
Read Only:
true
-
createdBy:
string
Read Only:
true
-
currentStatus:
string
-
depth:
string
Read Only:
true
-
description:
string
-
folderId:
string
Read Only:
true
-
id:
string
Read Only:
true
-
loginName:
string
-
MSDUserName:
string
-
name:
string
-
OSCUserName:
string
-
permissions:
array permissions
-
scheduledFor:
string
Read Only:
true
-
SFDCUserName:
string
-
SODUserName:
string
-
sourceTemplateId:
string
-
type:
string
-
updatedAt:
string
Read Only:
true
-
updatedBy:
string
Read Only:
true
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 2 accounts at minimal depth:
POST api/REST/2.0/data/accounts
X-HTTP-Method-Override: SEARCH
Content-Type: application/json
Request body:
{
"ids": [2, 3],
"depth": "minimal"
}
Response:
[
{
"type":"Account",
"id":"2",
"createdAt":"1470257701",
"depth":"minimal",
"description":"This is an example account",
"name":"Cyberdyne Systems",
"updatedAt":"1470257701",
"address1":"123 Industry Lane",
"address2":"567 Company Road",
"address3":"1738 Market Circle",
"businessPhone":"(888) 757-6662",
"city":"Los Angeles",
"fieldValues":[
{
"type":"FieldValue",
"id":"100102"
},
{
"type":"FieldValue",
"id":"100094",
"value":"ME10T000000000002"
}
],
"postalCode":"45317"
},
{
"type":"Account",
"id":"3",
"createdAt":"1470257701",
"depth":"minimal",
"description":"",
"name":"Umbrella Corporation",
"updatedAt":"1470257701",
"address1":"88 Capcom Blvd.",
"address2":"145 Biomede Lane",
"address3":"1738 Resident Drive",
"businessPhone":"(303) 455-3930",
"city":"Riverside",
"fieldValues":[
{
"type":"FieldValue",
"id":"100102"
},
{
"type":"FieldValue",
"id":"100094",
"value":"ME10T000000000003"
}
],
"postalCode":"45318"
}
]
Retrieve 2 accounts at partial depth:
POST api/REST/2.0/data/accounts
X-HTTP-Method-Override: SEARCH
Content-Type: application/json
Request body:
{
"ids": [2, 3],
"depth": "partial"
}
Response:
[
{
"type": "Account",
"id": "2",
"createdAt": "1462393916",
"depth": "partial",
"description": "",
"name": "Cyberdyne Systems",
"updatedAt": "1462393916",
"address1": "123 Industry Lane",
"city": "Los Angeles",
"fieldValues": [
{
"type": "FieldValue",
"id": "100102"
},
{
"type": "FieldValue",
"id": "100094",
"value": "MDC13000000000002"
}
],
"province": "CA"
},
{
"type": "Account",
"id": "3",
"createdAt": "1470257701",
"depth": "partial",
"description": "",
"name": "Umbrella Corporation",
"updatedAt": "1470257701",
"address1": "88 Capcom Blvd.",
"businessPhone": "(303) 455-3930",
"city": "Riverside",
"country": "US",
"fieldValues": [
{
"type": "FieldValue",
"id": "100102"
},
{
"type": "FieldValue",
"id": "100094",
"value": "MDC13000000000003"
}
],
"postalCode": "45318",
"province": "CA"
},
]
Retrieve 2 accounts at complete depth:
POST api/REST/2.0/data/accounts
X-HTTP-Method-Override: SEARCH
Content-Type: application/json
Request body:
{
"ids": [2, 3],
"depth": "complete"
}
Response:
[
{
"type": "Account",
"id": "2",
"createdAt": "1470257701",
"createdBy": "1470257701",
"depth": "complete",
"description": "",
"name": "Initech",
"updatedAt": "1470257701",
"address1": "123 Industry Lane",
"city": "Los Angeles",
"fieldValues": [
{
"type": "FieldValue",
"id": "100102"
},
{
"type": "FieldValue",
"id": "100094",
"value": "MDC13000000000002"
},
{
"type": "FieldValue",
"id": "100097"
},
{
"type": "FieldValue",
"id": "100100"
},
{
"type": "FieldValue",
"id": "100119"
},
{
"type": "FieldValue",
"id": "100170"
},
{
"type": "FieldValue",
"id": "100189"
}
],
"province": "CA"
},
{
"type": "Account",
"id": "3",
"createdAt": "1470257701",
"createdBy": "1470257701",
"depth": "complete",
"description": "This is an example company",
"name": "Umbrella Corporation",
"updatedAt": "1470257701",
"address1": "88 Capcom Blvd.",
"businessPhone": "(303) 455-3930",
"city": "Riverside",
"country": "US",
"fieldValues": [
{
"type": "FieldValue",
"id": "100102"
},
{
"type": "FieldValue",
"id": "100094",
"value": "MDC13000000000003"
},
{
"type": "FieldValue",
"id": "100097"
},
{
"type": "FieldValue",
"id": "100100"
},
{
"type": "FieldValue",
"id": "100119"
},
{
"type": "FieldValue",
"id": "100170",
"value": "6666666666"
},
{
"type": "FieldValue",
"id": "100189"
}
],
"postalCode": "45318",
"province": "CA"
}