> For the complete documentation index, see [llms.txt](https://developers.myhubdelivery.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.myhubdelivery.io/orders/merchants/logistic-operators.md).

# 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).
