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
- application/json
Path Parameters
-
id(required): integer
Id of the custom object
Query Parameters
-
depth: 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 tocomplete
by default. For more information, see Request depth.
Response
Supported Media Types
- application/json
200 Response
OK.
Root Schema : CustomObject
Type:
object
Title:
Show Source
CustomObject
-
createdAt:
string
Read Only:
true
The date and time the custom object was created, expressed in Unix time. -
createdBy:
string
Read Only:
true
The login id of the user who created the custom object. -
createdByName:
string
The name of the user who created the custom object.
-
currentStatus:
string
This property is not used for custom objects.
-
deleteLinkedCustomObjectData:
string
Whether or not custom object records are deleted when linked contact records are deleted. Does not apply to records that are unmapped or account deletion. Deleting records is irreversible and data cannot be recovered. The default value is
false
. This feature is released under our Controlled Availability program. You can request access to this feature by submitting a request to My Oracle Support. -
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 custom object.
-
displayNameFieldId:
string
For your custom object record to have a meaningful name field, you must create a custom object field which will act as a name. You can then use the desired custom object field's id as the value for this parameter.
-
emailAddressFieldId:
string
For your custom object record to have an email address field, you must create a custom object field which will act as an email address. You can then use the desired custom object field's id as the value for this parameter.
-
fields:
array fields
Array consisting of custom object field properties.
-
folderId:
string
Read Only:
true
This property is not used for custom objects. -
id:
string
Read Only:
true
Id of the custom object. -
name:
string
The name of the custom object.
-
permissions:
array permissions
The permissions for the custom object granted to your current instance. This is a read-only property.
-
scheduledFor:
string
Read Only:
true
This property is not used for custom objects. -
sourceTemplateId:
string
This property is not used for custom objects.
-
type:
string
The asset's type in Eloqua. This is a read-only property.
-
uniqueCodeFieldId:
string
For your custom object record to have a unique identifier, you must create a custom object field which will act as a GUID. You can then use the desired custom object field's id as the value for this parameter.
-
updatedAt:
string
Read Only:
true
Unix timestamp for the date and time the custom object was last updated. -
updatedBy:
string
Read Only:
true
The login id of the user that last updated the custom object. -
updatedByName:
string
The name of the user who last updated the custom object.
Nested Schema : fields
Type:
array
Array consisting of custom object field properties.
Show Source
-
Array of:
object CustomObjectField
Title:
CustomObjectField
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:
Show Source
CustomObjectField
-
checkedValue:
string
The checked value of a checkbox custom object field.
-
createdAt:
string
Read Only:
true
This property is not used for custom object fields. -
createdBy:
string
Read Only:
true
This property is not used for custom object fields. -
createdByName:
string
This property is not used for custom object fields.
-
currentStatus:
string
This property is not used for custom object fields.
-
dataType:
string
The custom object field's data type.
-
defaultValue:
string
The custom object field's default value.
-
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
This property is not used for custom object fields.
-
displayType:
string
The custom object field's display type.
-
folderId:
string
Read Only:
true
This property is not used for custom object fields. -
id:
string
Read Only:
true
Id of the custom object field. This is a read-only property. Use negative ids in order to reference custom object fields for other properties (e.g. emailAddressFieldId or uniqueCodeFieldId). See example. -
internalName:
string
The custom object field's internal name. This is a read-only property.
-
name:
string
The name of the custom object field.
-
optionListId:
string
The option list id for a single select custom object field.
-
permissions:
array permissions
This property is not used.
-
scheduledFor:
string
Read Only:
true
This property is not used for custom object fields. -
sourceTemplateId:
string
This property is not used for custom object fields.
-
type:
string
The asset's type in Eloqua. This is a read-only property.
-
uncheckedValue:
string
The unchecked value of a checkbox custom object field.
-
updatedAt:
string
Read Only:
true
This property is not used for custom object fields. -
updatedBy:
string
Read Only:
true
This property is not used for custom object fields. -
updatedByName:
string
This property is not used for custom object fields.
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
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