> 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/sale-channels.md).

# Sale Channels

## Lista de todos os canais de venda

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

#### Query Parameters

| Name                                          | Type   | Description               |
| --------------------------------------------- | ------ | ------------------------- |
| merchantId <mark style="color:red;">\*</mark> | String | Identificador do merchant |

#### Headers

| Name                                            | Type   | Description          |
| ----------------------------------------------- | ------ | -------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer ZjQ2MTRiY.... |

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

```javascript
[
  {
    "id": "er125wded",
    "sourceAppId": "b9d3ae05b30e4235b6ac1992aef5970b",
    "name": "Ifood",
    "installed": true
  }
]
```

{% endtab %}
{% endtabs %}

## Habilita o canal de vendas no merchant

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

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

```json
{
  "tradePolicy": {
    "policy": "NONE|UP|DOWN",
    "value": 0
  },
  "configurations": [
    {
      "key": "",
      "value": ""
    }
  ]
}
```

## Atualiza o canal de vendas no merchant

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

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

```json
{
  "tradePolicy": {
    "policy": "NONE|UP|DOWN",
    "value": 0
  },
  "configurations": [
    {
      "key": "",
      "value": ""
    }
  ]
}
```

## Remove o canal de venda para o Merchant

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

## Inicia a captação de vendas em todos os canais habilitados para o Merchant

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

## Pausa a captação de vendas em todos os canais habilitados para o Merchant

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

## Inicia a captação de vendas no canal de venda para o Merchant

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

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

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

{% endtab %}
{% endtabs %}

## Pausa a captação de vendas no canal de venda para o Merchant

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

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

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

{% 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
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 dynamically by asking a question.

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

```
GET https://developers.myhubdelivery.io/orders/merchants/sale-channels.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
