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
Header Parameters
Body ()
The request body defines the details of the request.
Root Schema : EntitySearchByIds
Type: object
Title: EntitySearchByIds
Show Source
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
Back to Top

Response

Supported Media Types

200 Response

OK.
Body ()
Root Schema : Account
Type: object
Title: Account
Show Source
Nested Schema : crmSystemMappings
Type: array
Lists CRM Users linked to the Account. Each 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.
Show Source
Nested Schema : fieldValues
Type: array
Array containing type and id values for all of the accountFields associated with a given account.
Show Source
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: CrmSystemMapping
Show Source
Nested Schema : permissions
Type: array
Show Source
Nested Schema : FieldValue
Type: object
Title: FieldValue
Show Source

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.
Back to Top

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"
  }
			
Back to Top