Update custom object data
put
/api/rest/2.0/data/customObject/{parentId}/instance/{id}
Updates custom object data specified by the
id
parameter.Request
Supported Media Types
- application/json
Path Parameters
-
id(required): integer
Id of the custom object data.
-
parentId(required): integer
Id of the parent.
The request body defines the details of the custom object data to be updated.
Root Schema : CustomObjectData
Type:
object
Title:
Show Source
CustomObjectData
-
accountId:
string
The account record Id associated to this custom object data. This is a read-only property.
-
contactId:
string
The contact record Id associated to this custom object data.
-
createdAt:
string
Read Only:
true
The date and time the custom object data was created, expressed in Unix time. This is a read-only property. -
createdBy:
string
Read Only:
true
The login id of the user who created the custom object data. This is a read-only property. -
createdByName:
string
The name of the user who created the custom object data.
-
currentStatus:
string
The custom object data's current status.
-
customObjectRecordStatus:
string
The record status of the custom object data.
-
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 data.
-
fieldValues:
array fieldValues
Array containing
type
andid
values for all of the fields associated with a given custom object data asset. Custom object date field values must be in Unix time format. -
folderId:
string
Read Only:
true
The folder id of the folder which contains the custom object data. -
id:
string
Read Only:
true
Id of the custom object data. -
isMapped:
string
Whether or not the custom object data is mapped to a custom object.
-
name:
string
The name of the custom object data.
-
permissions:
array permissions
The permissions for the custom object data granted to your current instance. This is a read-only property.
-
scheduledFor:
string
Read Only:
true
The date the custom object data 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.
-
uniqueCode:
string
The unique code associated to the custom object data.
-
updatedAt:
string
Read Only:
true
Unix timestamp for the date and time the custom object data was last updated. -
updatedBy:
string
Read Only:
true
The login id of the user that last updated the custom object data. -
updatedByName:
string
The name of the user who last updated the custom object data.
Nested Schema : fieldValues
Type:
array
Array containing
Show Source
type
and id
values for all of the fields associated with a given custom object data asset. Custom object date field values must be in Unix time format.-
Array of:
object FieldValue
Title:
FieldValue
Nested Schema : permissions
Type:
array
The permissions for the custom object data granted to your current instance. This is a read-only property.
Show Source
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.
Response
Supported Media Types
- application/json
200 Response
OK.
Root Schema : CustomObjectData
Type:
object
Title:
Show Source
CustomObjectData
-
accountId:
string
The account record Id associated to this custom object data. This is a read-only property.
-
contactId:
string
The contact record Id associated to this custom object data.
-
createdAt:
string
Read Only:
true
The date and time the custom object data was created, expressed in Unix time. This is a read-only property. -
createdBy:
string
Read Only:
true
The login id of the user who created the custom object data. This is a read-only property. -
createdByName:
string
The name of the user who created the custom object data.
-
currentStatus:
string
The custom object data's current status.
-
customObjectRecordStatus:
string
The record status of the custom object data.
-
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 data.
-
fieldValues:
array fieldValues
Array containing
type
andid
values for all of the fields associated with a given custom object data asset. Custom object date field values must be in Unix time format. -
folderId:
string
Read Only:
true
The folder id of the folder which contains the custom object data. -
id:
string
Read Only:
true
Id of the custom object data. -
isMapped:
string
Whether or not the custom object data is mapped to a custom object.
-
name:
string
The name of the custom object data.
-
permissions:
array permissions
The permissions for the custom object data granted to your current instance. This is a read-only property.
-
scheduledFor:
string
Read Only:
true
The date the custom object data 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.
-
uniqueCode:
string
The unique code associated to the custom object data.
-
updatedAt:
string
Read Only:
true
Unix timestamp for the date and time the custom object data was last updated. -
updatedBy:
string
Read Only:
true
The login id of the user that last updated the custom object data. -
updatedByName:
string
The name of the user who last updated the custom object data.
Nested Schema : fieldValues
Type:
array
Array containing
Show Source
type
and id
values for all of the fields associated with a given custom object data asset. Custom object date field values must be in Unix time format.-
Array of:
object FieldValue
Title:
FieldValue
Nested Schema : permissions
Type:
array
The permissions for the custom object data granted to your current instance. This is a read-only property.
Show Source
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
The following examples demonstrate how to update the data (records) for a custom object using an HTTP request and cURL. For more information on requests, see API requests.
HTTP Request Example
Update the name of the custom object data asset, where the custom object has an ID of 15, and the custom object data has an ID of 9:
PUT /api/REST/2.0/data/customObject/15/instance/9
Content-Type: application/json
Request body:
{
"id":"9",
"name":"Frisbee"
}
Note:
The custom object data IDs for the elements you are updating must correspond to the custom object data in your Eloqua instance.Response:
{
"type": "CustomObjectData",
"id": "9",
"createdAt": "1489010068",
"depth": "complete",
"name": "Frisbee",
"updatedAt": "1581445412",
"contactId": "141",
"fieldValues": [
{
"type": "FieldValue",
"id": "97",
"value": "London"
},
{
"type": "FieldValue",
"id": "105",
"value": "Lillian"
},
{
"type": "FieldValue",
"id": "98",
"value": "Canada"
},
{
"type": "FieldValue",
"id": "99",
"value": "lilnight@email.com"
},
{
"type": "FieldValue",
"id": "101",
"value": "Latin"
},
{
"type": "FieldValue",
"id": "102",
"value": "Alo"
},
{
"type": "FieldValue",
"id": "103",
"value": "ON"
},
{
"type": "FieldValue",
"id": "104",
"value": "Miss"
},
{
"type": "FieldValue",
"id": "106",
"value": "Nightingale"
}
],
"isMapped": "Yes",
"uniqueCode": "DDC13000000000004"
}
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" --header "Content-Type: application/json" --request PUT --data '{"id":"9","name":"Frisbee","description":"Re-purposed pie plates."}' https://secure.p03.eloqua.com/api/REST/2.0/data/customObject/15/instance/9