**Source URL:** https://limited.veevavault.dev/sitevault/vault-api/api-reference/26.2/expected-document-lists/bulk-update-node-order.md

# Bulk Update Node Order



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

<Endpoint path="/api/{version}/composites/trees/{object_name}/batch" method="PUT"></Endpoint>

## Headers {#headers}

<FieldTable>
| Name | Description |
| --- | --- |
| `Content-Type` | `application/json` (default) or `text/csv` |
| `Accept` | `application/json` (default) or `application/xml` or `text/csv` |
</FieldTable>

## URI Path Parameters {#uri-path-parameters}

<FieldTable>
| Name | Description |
| --- | --- |
| `object_name` | The 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`. |
</FieldTable>

## Query Parameters {#query-parameters}

<FieldTable>
| Name | Description |
| --- | --- |
| `idParam` | 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. |
</FieldTable>

## Body Parameters {#body-parameters}

Expressed as a JSON or a CSV.

<FieldTable>
| Name | Description |
| --- | --- |
| `parent_id` | 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` | 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` | An integer specifying the sibling ordering. This is indexed at 1. |
| `{field_name}` | 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}` | 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. |
</FieldTable>

## Request {#request}

<CodeExample title="">
```
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

```
</CodeExample>

## Response {#response}

<CodeExample title="">
```
{
  "responseStatus": "SUCCESS",
  "data": [
    {
      "responseStatus": "SUCCESS",
      "data": {
        "parent_id": "0000000000000AYI",
        "id": "0000000000000JLL",
        "order__v": 1
      }
    }
  ]
}

```
</CodeExample>

---

**Previous:** [Update Node Order](/sitevault/vault-api/api-reference/26.2/expected-document-lists/update-node-order)  
**Next:** [Add EDL Matched Documents](/sitevault/vault-api/api-reference/26.2/expected-document-lists/add-edl-matched-documents)