> For the complete documentation index, see [llms.txt](https://docs.floui.io/guia/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.floui.io/guia/conectores/categorias/servicos-externos/bling-erp-bling-api-v3/pedido-de-compra/consultar-um-pedido-de-compra.md).

# Consultar um pedido de compra

Consulta um pedido de compra no ERP Bling.

{% tabs %}
{% tab title="Parâmetros" %}

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdIEWFme4UX9bnjS3M9PSHMGkeMQFTY6wRR-mhLFYKloTMako8OsuTsrFsiup3QjrlZdxwc6wuozRjpvizf68Q4mfQT-hLGA-wEJIGv35GrqTy70BWM-FyyvTmjT0ot3gvMpQ11?key=yLogrgEbXy0K_a4zmB9ApgKO" alt=""><figcaption><p>Parâmetros de configuração</p></figcaption></figure>

| Campo                  | Tipo           | Descrição                                                                                                                                                                                                                                                  |
| ---------------------- | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Descrição              | Campo de texto | Descrição visual do conector no editor de fluxo                                                                                                                                                                                                            |
| Conta de serviço       | Seletor        | Permite selecionar a conta de serviço para conexão com ERP Bling. A conta de serviço deverá ser do tipo de autenticação OAuth2 e tipo de serviço Bling                                                                                                     |
| ID da conta de serviço | Campo de texto | <p>Configuração disponível quando selecionada a opção de conta de serviço personalizada. </p><p></p><p>Permite inserir o identificador da conta de serviço Bling. Pode ser usado para aplicar valores dinâmicos utilizando a notação Mustache {{msg}} </p> |
| ID do pedido de compra | Campo de texto | Identificador do pedido de compra cadastrado no ERP Bling.                                                                                                                                                                                                 |
| Output Path            | Campo de texto | Refere-se ao caminho do resultado da execução na saída do conector no contexto de execução do fluxo                                                                                                                                                        |
| {% endtab %}           |                |                                                                                                                                                                                                                                                            |

{% tab title="Payload" %}

## Sucesso

A requisição deste conector é feita para a API V3 na rota **GET** `/pedidos/compras/{idPedidoCompra}`, permitindo obter as informações de um único pedido de compra cadastrado na plataforma Bling. A documentação oficial pode ser consultada através do link [Bling Developer](https://developer.bling.com.br/referencia#/Pedidos%20-%20Compras/get_pedidos_compras__idPedidoCompra_)&#x20;

Quando a execução é bem-sucedida, os dados do pedido de compra ficam disponíveis na carga de dados do conector.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfJ2jGRU7uF-L4CkE3U7VFVDjYgKy90y7TohConBmn-q8m2O9lObl1_3UWXLPv7aFkjq78qfSA7XQdpXLHNXSBYVZiqg18n5md6lhFItjpD4QCB8mQXe8S55sGUSt7SIyvSD_fbNA?key=yLogrgEbXy0K_a4zmB9ApgKO" alt=""><figcaption><p>Sucesso na consulta</p></figcaption></figure>

## Erro

Em caso de erro, como quando o pedido de compra não é encontrado, a API retornará uma mensagem de erro detalhando o problema. Além disso, as chaves request e response serão incluídas na resposta, contendo os dados da requisição para facilitar a análise.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcxcu7o_KiNjT2WInn90KBnMtO-hqz-8yGdinXsjhZ4I5gqU8ldx8bebiSKQOePcg4YtYz0MhMVoX92mlVcCBWhWZL8EWZ_71rCpgmdcrGzvrqYZ9uoAuCtezpBzFaMRs1fIwBW1Q?key=yLogrgEbXy0K_a4zmB9ApgKO" alt=""><figcaption><p>Erro na consulta</p></figcaption></figure>
{% 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.floui.io/guia/conectores/categorias/servicos-externos/bling-erp-bling-api-v3/pedido-de-compra/consultar-um-pedido-de-compra.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.
