Skip to content

Bulk Update Node Order

Given multiple EDL parent nodes, update the order of each set of children.

PUT/api/{version}/composites/trees/{object_name}/batch
NameDescription
Content-Typeapplication/json (default) or text/csv
Acceptapplication/json (default) or application/xml or text/csv
NameDescription
object_nameThe name of the corresponding hierarchy-enabled object for which to update the node order in bulk. For example, edl__v, edl_item__v, or edl_template__v.
NameDescription
idParam
optional
To identify nodes in your input by a unique field on the corresponding record, add idParam={field_name} to the request endpoint. You can use any record field that has unique set to true in the record metadata. For example, idParam=external_id__v. If idParam is included, parent_id and id are not required in the request body.

Expressed as a JSON or a CSV.

NameDescription
parent_id
conditional
The parent node ID from the veeva_hierarchy_node table. Not required if idParam is included. If idParam is included, add parent_{field} as a unique field on the corresponding record instead.
id
conditional
The node ID from the veeva_hierarchy_node table. Not required if idParam is included. If idParam is included, add {field} as a unique field on the corresponding record instead.
order__v
required
An integer specifying the sibling ordering. This is indexed at 1.
{field_name}
conditional
The unique field name to use instead of the id. You must also add the idParam query parameter, such as idParam=external_id__v.
parent_{field}
conditional
The unique field name on the corresponding parent record to use instead of the parent_id. This field name should match the input of the idParam query parameter with a parent_ prefix.
curl -X POST -H "Authorization: {SESSION_ID}" \
-H "Content-Type: application/json" \
-d '{"parent_id": "0000000000000AYI", "id": "0000000000000JLL","order": "2"}'
https://myvault.veevavault.com/api/v26.2/composites/trees/edl_hierarchy__v/batch
{
  "responseStatus": "SUCCESS",
  "data": [
    {
      "responseStatus": "SUCCESS",
      "data": {
        "parent_id": "0000000000000AYI",
        "id": "0000000000000JLL",
        "order__v": 1
      }
    }
  ]
}