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.
Important: Request header 'X-HTTP-Method-Override' needs to be set with value 'SEARCH'.
Request parameters
Required
Name |
Type |
Description |
Possible values |
---|---|---|---|
ids | array | The account ids to retrieve. Maximum of 200 account ids per request. If the array contains duplicate account ids, or exceeds the 200 limit, a 400 Bad Request will be returned. |
Optional
Name |
Type |
Description |
Possible values |
---|---|---|---|
depth |
string |
Level of detail returned by the request. The default will be minimal. Learn more about the depth parameter. Note: For accounts, |
|
Response parameters
Name |
Type |
Description |
Possible values |
---|---|---|---|
type |
string |
The type of asset in Eloqua. |
Account
|
id | string | The account id of the account. | |
createdAt | string | The date and time the account was created, expressed in Unix time. | |
depth | string |
The request's level of detail. Note: For accounts, |
|
description | string | The description of the account. | |
name |
string |
The name of the account. |
|
updatedAt | string | The date and time the contact was last updated, expressed in Unix time. | |
address1 | string | The account's first address. | |
city | string | The account's city. |
Note: For a full list of parameters returned within the account object see Retrieve an account response parameters.
Example
Retrieve 3 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, 5],
"depth": "minimal"
}
Response:
[
{
"type": "Account",
"id": "2",
"createdAt": "1462393916",
"depth": "minimal",
"description": "",
"name": "Initech",
"updatedAt": "1462393916",
"address1": "101 Mainstreet",
"city": "Austin",
"fieldValues": [
{
"type": "FieldValue",
"id": "100102"
},
{
"type": "FieldValue",
"id": "100094",
"value": "MDC13000000000002"
}
],
"province": "TX"
},
{
"type": "Account",
"id": "3",
"createdAt": "1462395731",
"depth": "minimal",
"description": "",
"name": "An Example Company",
"updatedAt": "1462395731",
"address1": "Business Blvd",
"businessPhone": "1111111111",
"city": "Deluge",
"country": "US",
"fieldValues": [
{
"type": "FieldValue",
"id": "100102"
},
{
"type": "FieldValue",
"id": "100094",
"value": "MDC13000000000003"
}
],
"postalCode": "MR4 5UX",
"province": "CT"
},
{
"type": "Account",
"id": "5",
"createdAt": "1462482690",
"depth": "minimal",
"description": "",
"name": "Globex",
"updatedAt": "1462482690",
"address1": "555 Downtown Lane",
"city": "Denver",
"fieldValues": [
{
"type": "FieldValue",
"id": "100102"
},
{
"type": "FieldValue",
"id": "100094",
"value": "MDC13000000000005"
}
],
"province": "Colorado"
}
]
Retrieve 3 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, 5],
"depth": "partial"
}
Response:
[
{
"type": "Account",
"id": "2",
"createdAt": "1462393916",
"depth": "partial",
"description": "",
"name": "Initech",
"updatedAt": "1462393916",
"address1": "101 Mainstreet",
"city": "Austin",
"fieldValues": [
{
"type": "FieldValue",
"id": "100102"
},
{
"type": "FieldValue",
"id": "100094",
"value": "MDC13000000000002"
}
],
"province": "TX"
},
{
"type": "Account",
"id": "3",
"createdAt": "1462395731",
"depth": "partial",
"description": "",
"name": "An Example Company",
"updatedAt": "1462395731",
"address1": "Business Blvd",
"businessPhone": "1111111111",
"city": "Deluge",
"country": "US",
"fieldValues": [
{
"type": "FieldValue",
"id": "100102"
},
{
"type": "FieldValue",
"id": "100094",
"value": "MDC13000000000003"
}
],
"postalCode": "MR4 5UX",
"province": "CT"
},
{
"type": "Account",
"id": "5",
"createdAt": "1462482690",
"depth": "partial",
"description": "",
"name": "Globex",
"updatedAt": "1462482690",
"address1": "555 Downtown Lane",
"city": "Denver",
"fieldValues": [
{
"type": "FieldValue",
"id": "100102"
},
{
"type": "FieldValue",
"id": "100094",
"value": "MDC13000000000005"
}
],
"province": "Colorado"
}
]
Retrieve 3 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, 5],
"depth": "complete"
}
Response:
[
{
"type": "Account",
"id": "2",
"createdAt": "1462393916",
"createdBy": "1462393916",
"depth": "complete",
"description": "",
"name": "Initech",
"updatedAt": "1462393916",
"address1": "101 Mainstreet",
"city": "Austin",
"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": "TX"
},
{
"type": "Account",
"id": "3",
"createdAt": "1462395731",
"createdBy": "1462395731",
"depth": "complete",
"description": "",
"name": "An Example Company",
"updatedAt": "1462395731",
"address1": "Business Blvd",
"businessPhone": "1111111111",
"city": "Deluge",
"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": "MR4 5UX",
"province": "CT"
},
{
"type": "Account",
"id": "5",
"createdAt": "1462482690",
"createdBy": "1462482690",
"depth": "complete",
"description": "",
"name": "Globex",
"updatedAt": "1462482690",
"address1": "555 Downtown Lane",
"city": "Denver",
"fieldValues": [
{
"type": "FieldValue",
"id": "100102"
},
{
"type": "FieldValue",
"id": "100094",
"value": "MDC13000000000005"
},
{
"type": "FieldValue",
"id": "100097"
},
{
"type": "FieldValue",
"id": "100100"
},
{
"type": "FieldValue",
"id": "100119"
},
{
"type": "FieldValue",
"id": "100170"
},
{
"type": "FieldValue",
"id": "100189"
}
],
"province": "Colorado"
}
]