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
Path Parameters
Body ()
The request body defines the details of the custom object data to be updated.
Root Schema : CustomObjectData
Type: object
Title: CustomObjectData
Show Source
Nested Schema : fieldValues
Type: array
Array containing 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.
Show Source
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: FieldValue
Show Source
  • Read Only: true
    The id of the field to be set to the corresponding value.
  • Name of the field value.
  • The asset's type in Eloqua. This is a read-only property.
  • The value to set the corresponding field id to. Date values must be submitted as a unix timestamp.
Back to Top

Response

Supported Media Types

200 Response

OK.
Body ()
Root Schema : CustomObjectData
Type: object
Title: CustomObjectData
Show Source
Nested Schema : fieldValues
Type: array
Array containing 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.
Show Source
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: FieldValue
Show Source
  • Read Only: true
    The id of the field to be set to the corresponding value.
  • Name of the field value.
  • The asset's type in Eloqua. This is a read-only property.
  • 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.
Back to Top

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