sObject Tree Request Body

Describes a collection of sObject trees to create with the sObject Tree resource.

Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.

The request body contains a records collection that includes sObject trees.

Properties

NameTypeDescriptionRequired or Optional
recordssObject Tree Input[]Collection of record trees to create. Each tree’s root record type must correspond to the sObject specified in the sObject Tree URI.Required

Root XML Tag: <SObjectTreeRequest>

JSON example

XML example

An sObject tree is a recursive data structure that contains a root record, its data, and its child records represented as other sObject trees.

Properties

NameTypeDescriptionRequired or Optional
attributesCollectionAttributes for this record. The attributes property contains two required subproperties: type (this record’s type) and referenceId (reference ID for this record). The ID is case-sensitive and must be unique in the context of the request. Values must start with an alphanumeric character and contain only letters, numbers, or underscores (’_’). In XML, include attributes inside the records element.Required
Required object fieldsDepends on fieldRequired fields and field values for this record.Required
Optional object fieldsDepends on fieldOptional fields and field values for this record.Optional
Child relationshipssObject Tree Collection InputThis record’s child relationships, such as an account’s child contacts. Child relationships are either master-detail or lookup relationships. To view an object’s valid child relationships, use the sObject Describe resource or Schema Builder. The value of this property is an sObject Tree Collection Input that contains child sObject trees.Optional

Root XML Tag: <records>

JSON example

XML example