> For the complete documentation index, see [llms.txt](https://docs.zapsign.com.br/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zapsign.com.br/documentos/update-document/reorder-envelope.md).

# Reordenar documentos de um envelope

Este endpoint permite definir a ordem em que os documentos serão exibidos dentro de um envelope específico. É útil quando a ordem de leitura ou assinatura dos documentos é relevante.

## Atualizar documento

<mark style="color:blue;">`PUT`</mark> `https://api.zapsign.com.br/api/v1/docs/{doc_token}/document-display-order/`

#### Condições

* O documento identificado por `doc_token` deve ser um **envelope** (ou seja, um documento que agrupa vários arquivos).
* A reordenação só é permitida se o envelope estiver **em andamento**.
* É necessário incluir **todos** os tokens dos documentos que compõem o envelope, na ordem desejada.\
  Esses tokens estão disponíveis na resposta da criação do documento ou nos detalhes do envelope.

#### Path Parameters

<table><thead><tr><th width="116.28765869140625">Name</th><th width="106.6824951171875">Type</th><th>Description</th></tr></thead><tbody><tr><td>doc_token</td><td>string</td><td>Token do documento</td></tr></tbody></table>

#### Headers

<table><thead><tr><th width="166.25921630859375">Name</th><th width="105.82525634765625">Type</th><th>Description</th></tr></thead><tbody><tr><td>Authorization<mark style="color:red;">*</mark></td><td>string</td><td><p>Api token a frente do texto "Bearer". </p><p>Ex: Bearer c7f35c84-7893-4087-b4fb-d1f06c23</p></td></tr></tbody></table>

#### Body

<table><thead><tr><th width="168.664794921875">Campo</th><th width="108.22021484375">Tipo</th><th>Descrição</th></tr></thead><tbody><tr><td>document_display_order</td><td>array de string</td><td>Lista ordenada de tokens dos documentos, indicando a nova ordem de exibição.</td></tr></tbody></table>

#### Exemplo body

```json
{
  "document_display_order": [
    "6a4c7b7d-433e-4faf-a4b1-1f96bbf72c68",    
    "09d983a1-7c26-472a-a2ef-8ee10470b5ed",
    "9f8c63bb-eb1b-461d-8ede-0ae90d75c18a"
  ]
}


```

{% tabs %}
{% tab title="200 Sucesso" %}

```javascript
{
    "message": "Documento atualizado corretamente"

}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.zapsign.com.br/documentos/update-document/reorder-envelope.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
