# Logistic Operators

## Lista de todos os operadores logísticos

<mark style="color:blue;">`GET`</mark> `https://{account}.myhubdelivery.io/merchants/api/v1/{merchantId}/logisticOperators`

{% tabs %}
{% tab title="200: OK " %}

```javascript
[
  {
    "id": "883i8thuT",
    "name": "Bdoo"
  }
]
```

{% endtab %}
{% endtabs %}

## Habilita o operador logístico no merchant

<mark style="color:green;">`POST`</mark> `https://{account}.myhubdelivery.io/merchants/api/v1/{merchantId}/logisticOperators/{logisticOperatorId}`

{% hint style="success" %}
**Exemplo do conteúdo da requisição**
{% endhint %}

```json
[
  { "key": "BDOO.CLIENT_ID", "value": "SEU CLIENT ID" },
  { "key": "BDOO.CLIENT_SECRET", "value": "SEU CLIENT SECRET" }
]
```

## Atualiza o operador logístico no merchant

<mark style="color:orange;">`PUT`</mark> `https://{account}.myhubdelivery.io/merchants/api/v1/{merchantId}/logisticOperators/{logisticOperatorId}`

{% hint style="success" %}
**Exemplo do conteúdo da requisição**
{% endhint %}

```json
[
  { "key": "BDOO.CLIENT_ID", "value": "SEU CLIENT ID" },
  { "key": "BDOO.CLIENT_SECRET", "value": "SEU CLIENT SECRET" }
]
```

## Remove o operador logístico do Merchant

<mark style="color:red;">`DELETE`</mark> `https://{account}.myhubdelivery.io/merchants/api/v1/{merchantId}/logisticOperators/{logisticOperatorId}`

## Consulta o operador logístico no Merchant

<mark style="color:blue;">`GET`</mark> `https://{account}.myhubdelivery.io/merchants/api/v1/{merchantId}/logisticOperators/{logisticOperatorId}`

{% tabs %}
{% tab title="200: OK " %}

```json
[
  { "key": "BDOO.CLIENT_ID", "value": "SEU CLIENT ID" },
  { "key": "BDOO.CLIENT_SECRET", "value": "SEU CLIENT SECRET" }
]
```

{% endtab %}
{% endtabs %}

## Associa um operador logístico ao canal de venda

<mark style="color:green;">`POST`</mark> `https://{account}.myhubdelivery.io/merchants/api/v1/{merchantId}/logisticOperators/{logisticOperatorId}/{saleChannelId}/associate`

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

## Desassocia um operador logístico ao canal de venda

<mark style="color:red;">`DELETE`</mark> `https://{account}.myhubdelivery.io/merchants/api/v1/{merchantId}/logisticOperators/{logisticOperatorId}/{saleChannelId}/disassociate`

{% tabs %}
{% tab title="200: OK " %}

```javascript
{}
```

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
**Considerações importantes**
{% endhint %}

Por questão de segurança, no ambiente sandbox a comunicação com os canais de venda e operadores logísticos são restritos, para a criação de pedidos utilize a rota de pedidos [Fake](/orders/orders.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://developers.myhubdelivery.io/orders/merchants/logistic-operators.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.
