# Get

## Obter Documento

## Devolve Documento a partir do seu :id.

<mark style="color:blue;">`GET`</mark> `https://api.cloudinvoice.net/documents/:id/`

#### Path Parameters

| Name | Type    | Description     |
| ---- | ------- | --------------- |
| id   | integer | ID do Documento |

#### Query Parameters

| Name     | Type    | Description                                                                                       |
| -------- | ------- | ------------------------------------------------------------------------------------------------- |
| extended | boolean | Inclui mais informação na resposta, incluindo listas de linhas, pagamentos e taxas  do documento. |

{% tabs %}
{% tab title="Exemplo de Pedido" %}

```shell
curl https://api.cloudinvoice.net/documents/1/
    -H "Content-Type: application/json"
```

{% endtab %}

{% tab title="Exemplo de Resposta" %}

```json
{
    "id": 1,
    "doc_key": "FSI A01/1",
    "document_date": "2023-01-10",
    "document_time": "11:30:48",
    "document_number": 1,
    "document_reference": "",
    "our_reference": "",
    "module_origin": 2,
    "party_id": 1,
    "party": {
        "class": 1601,
        "code": 1,
        "name": "Consumidor Final",
        "commercial_name": "",
        "fiscal_number": "999999990",
        "street1": "",
        "street2": "",
        "zip_code": "",
        "zip_locale": ""
    },
    "line_details_count": 5,
    "lines_total_quantity": 9.0,
    "is_valued": true,
    "is_tax_included": true,
    "total_gross_amount": 54.9,
    "global_discount1": 0.0,
    "total_global_discount": 0.0,
    "total_line_discount": 0.0,
    "total_net_amount": 44.6341463414,
    "total_taxes_amount": 10.2658536586,
    "total_amount": 54.9,
    "total_document_amount": 54.9,
    "total_round_amount": 0.0,
    "total_due_amount": 0.0,
    "due_date": "2023-01-10",
    "is_converted": false,
    "header_text": "",
    "footer_text": "",
    "number_of_prints": 0,
    "is_transport_document": false,
    "obs": "",
    "document_nature_id": 302,
    "document_nature": {
        "code": "FS",
        "description": "Factura Simplificada"
    },
    "document_id": 2,
    "document": {
        "code": "FSI",
        "document_name": "Factura Simplificada",
        "ask_payment_onclose": true
    },
    "document_serie_id": 1,
    "document_serie": {
        "code": "A01",
        "description": "Série A01"
    },
    "document_status_id": 1202,
    "document_status": {
        "code": "F",
        "description": "Finalizado"
    },
    "warehouse_id": 1,
    "warehouse": {
        "code": 1,
        "description": "Armazém 1"
    },
    "salesman_id": 1,
    "salesman": {
        "code": 1,
        "salesman_name": "Empregado 1"
    },
    "payment_term_id": 1,
    "payment_term": {
        "code": 1,
        "description": "Pronto Pagamento"
    },
    "payment_method_id": 1,
    "payment_method": {
        "code": 1,
        "description": "Dinheiro"
    },
    "origin_document_header_id": null,
    "origin_document_header": null
}
```

{% endtab %}
{% endtabs %}

Para ver exemplos de pedidos nas várias linguagens, consulte a página[ Exemplos de Pedidos.](/introducao/exemplos-de-pedidos.md)


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://apidocs.cloudinvoice.net/documentacao-api/documentos/get.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
