Retrieve a custom object

get

/api/REST/2.0/assets/customObject/{id}

Retrieves the custom object specified by the id parameter.

Request

Supported Media Types
Path Parameters
Query Parameters
  • Level of detail returned by the request. Eloqua APIs can retrieve entities at three different levels of depth: minimal, partial, and complete. Any other values passed are reset to complete by default. For more information, see Request depth.
Back to Top

Response

Supported Media Types

200 Response

OK.
Body ()
Root Schema : CustomObject
Type: object
Title: CustomObject
Show Source
Nested Schema : fields
Type: array
Array consisting of custom object field properties.
Show Source
Nested Schema : permissions
Type: array
The permissions for the custom object granted to your current instance. This is a read-only property.
Show Source
Nested Schema : CustomObjectField
Type: object
Title: CustomObjectField
Show Source
Nested Schema : permissions
Type: array
This property is not used.
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

The following examples demonstrate how to retrieve a custom object using an HTTP request and cURL. For more information on requests, see API requests.

HTTP Request Example

Retrieve the custom object asset with Id #5:


GET /api/REST/2.0/assets/customObject/5?depth=complete
			

Response:



{
    "type":"CustomObject",
    "id":"5",
    "createdAt":"1402929826",
    "createdBy":"2",
    "depth":"complete",
    "description":"Opportunity",
    "folderId":"273",
    "name":"Opportunity",
    "updatedAt":"1402929826",
    "updatedBy":"2",
    "displayNameFieldId":"74",
    "emailAddressFieldId":"73",
    "fields":[
        {
            "type":"CustomObjectField",
            "id":"70",
            "depth":"complete",
            "name":"Opportunity ID",
            "dataType":"text",
            "defaultValue":"",
            "displayType":"text",
            "internalName":"Opportunity_ID1"
        },
        {
            "type":"CustomObjectField",
            "id":"71",
            "depth":"complete",
            "name":"Contact Role ID",
            "dataType":"text",
            "defaultValue":"",
            "displayType":"text",
            "internalName":"Contact_Role_ID1"
        },
        {
            "type":"CustomObjectField",
            "id":"72",
            "depth":"complete",
            "name":"Contact ID",
            "dataType":"text",
            "defaultValue":"",
            "displayType":"text",
            "internalName":"Contact_ID1"
        },
        {
            "type":"CustomObjectField",
            "id":"73",
            "depth":"complete",
            "name":"Email Address",
            "dataType":"text",
            "defaultValue":"",
            "displayType":"text",
            "internalName":"Email_Address1"
        },
        {
            "type":"CustomObjectField",
            "id":"74",
            "depth":"complete",
            "name":"Opportunity Name",
            "dataType":"text",
            "defaultValue":"",
            "displayType":"text",
            "internalName":"Opportunity_Name1"
        },
        {
            "type":"CustomObjectField",
            "id":"75",
            "depth":"complete",
            "name":"Account Name",
            "dataType":"text",
            "defaultValue":"",
            "displayType":"text",
            "internalName":"Account_Name1"
        },
        {
            "type":"CustomObjectField",
            "id":"76",
            "depth":"complete",
            "name":"Amount",
            "dataType":"text",
            "defaultValue":"",
            "displayType":"text",
            "internalName":"Amount1"
        },
        {
            "type":"CustomObjectField",
            "id":"77",
            "depth":"complete",
            "name":"Close Date",
            "dataType":"date",
            "defaultValue":"",
            "displayType":"text",
            "internalName":"Close_Date1"
        },
        {
            "type":"CustomObjectField",
            "id":"78",
            "depth":"complete",
            "name":"Description",
            "dataType":"largeText",
            "defaultValue":"",
            "displayType":"textArea",
            "internalName":"Description1"
        },
        {
            "type":"CustomObjectField",
            "id":"79",
            "depth":"complete",
            "name":"Expected Revenue",
            "dataType":"text",
            "defaultValue":"",
            "displayType":"text",
            "internalName":"Expected_Revenue1"
        },
        {
            "type":"CustomObjectField",
            "id":"80",
            "depth":"complete",
            "name":"Forecast Category",
            "dataType":"text",
            "defaultValue":"",
            "displayType":"text",
            "internalName":"Forecast_Category1"
        },
        {
            "type":"CustomObjectField",
            "id":"81",
            "depth":"complete",
            "name":"Lead Source",
            "dataType":"text",
            "defaultValue":"",
            "displayType":"text",
            "internalName":"Lead_Source1"
        },
        {
            "type":"CustomObjectField",
            "id":"82",
            "depth":"complete",
            "name":"Next Step",
            "dataType":"text",
            "defaultValue":"",
            "displayType":"text",
            "internalName":"Next_Step1"
        },
        {
            "type":"CustomObjectField",
            "id":"83",
            "depth":"complete",
            "name":"Opportunity Currency",
            "dataType":"text",
            "defaultValue":"",
            "displayType":"text",
            "internalName":"Opportunity_Currency1"
        },
        {
            "type":"CustomObjectField",
            "id":"84",
            "depth":"complete",
            "name":"Opportunity Owner",
            "dataType":"text",
            "defaultValue":"",
            "displayType":"text",
            "internalName":"Opportunity_Owner1"
        },
        {
            "type":"CustomObjectField",
            "id":"85",
            "depth":"complete",
            "name":"Opportunity Record Type",
            "dataType":"text",
            "defaultValue":"",
            "displayType":"text",
            "internalName":"Opportunity_Record_Type1"
        },
        {
            "type":"CustomObjectField",
            "id":"86",
            "depth":"complete",
            "name":"Primary Campaign Source",
            "dataType":"text",
            "defaultValue":"",
            "displayType":"text",
            "internalName":"Primary_Campaign_Source1"
        },
        {
            "type":"CustomObjectField",
            "id":"87",
            "depth":"complete",
            "name":"Probability (%)",
            "dataType":"text",
            "defaultValue":"",
            "displayType":"text",
            "internalName":"Probability____1"
        },
        {
            "type":"CustomObjectField",
            "id":"88",
            "depth":"complete",
            "name":"Quantity",
            "dataType":"text",
            "defaultValue":"",
            "displayType":"text",
            "internalName":"Quantity1"
        },
        {
            "type":"CustomObjectField",
            "id":"89",
            "depth":"complete",
            "name":"Stage",
            "dataType":"text",
            "defaultValue":"",
            "displayType":"text",
            "internalName":"Stage1"
        },
        {
            "type":"CustomObjectField",
            "id":"90",
            "depth":"complete",
            "name":"Type",
            "dataType":"text",
            "defaultValue":"",
            "displayType":"text",
            "internalName":"Type1"
        }
    ],
    "uniqueCodeFieldId":"70"
}
			

cURL Example

Here is the same example in cURL given an instance with the name APITest, username API.User, and POD of 3.


curl --user "APITest\API.User" --request GET https://secure.p03.eloqua.com/api/REST/2.0/assets/customObject/5?depth=complete
			
Back to Top