# Update a Sales Channel

## update sales channel

<mark style="color:orange;">`PUT`</mark> `https://{{workspace}}.myeshopbox.com/api/v1/channel/:id`

This endpoint allows a user to update the records for a particular channel id

#### Headers

| Name           | Type   | Description                                    |
| -------------- | ------ | ---------------------------------------------- |
| Authentication | string | The Bearer token is required to access the API |

#### Request Body

| Name                | Type   | Description                                                                                        |
| ------------------- | ------ | -------------------------------------------------------------------------------------------------- |
| fulfillmentChannels | object | <p>A user can update single fulfillment center or can edit<br> multiple fulfillment center<br></p> |

{% tabs %}
{% tab title="200 Sales channel is successfully retrieved" %}

```
{
    "data": [
        {
            "id": "1",
            "integrationModelId": "1",
            "channelAccountId": "1",
            "portalId": "1",
            "externalChannelId": "TATA CLIQ VELOCY KAPAS KRAFT",
            "accountSlug": "CH1234",
            "portalName": "TATA CLIQ",
            "integrationModelName": "Amazon Prime",
            "channelAccountName": "Eshopbox channel account",
            "fulfillmentChannels": [
                {
                    "fulfillmentChannelId": "1",
                    "channelSubscriptionId": "1",
                    "warehouseId": "9",
                    "externalWmsChannelName": "Amazon_prime_Eshopbox",
                    "status": "0",
                    "enrollmentStatus": "INACTIVE",
                    "warehouseName": "Kapas Kraft Apparels Limited 1006",
                    "opsVerificationStatus": "0"
                },
                {
                    "fulfillmentChannelId": "2",
                    "channelSubscriptionId": "1",
                    "warehouseId": "16",
                    "externalWmsChannelName": "Amazon_prime_Eshopbox",
                    "status": "0",
                    "enrollmentStatus": "INACTIVE",
                    "warehouseName": "Kapas Kraft Apparels Limited 1006",
                    "opsVerificationStatus": "0"
                }
            ],
            "additionalDetails": {
                "fieldName1": "CH0001",
                "fieldName2": "CH0001"
            },
            "status": "0",
            "brandRegistrationStatus": "0",
            "enrollmentStatus": "IN PROCESS",
            "createdAt": "2019-04-08T12:41:05.000+05:30",
            "updatedAt": "2019-04-08T12:41:05.000+05:30"
        }
    ]
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X PUT https://{{workspace}}.myeshopbox.com/api/v1/channel/:id \
     -H "Authorization: Bearer XXXX" \
     -H "Content-Type: application/json" \
     -d $'{
      "data": {
         "fulfillmentChannels": [
        {
            "warehouseId": 9
        },
        {
            "warehouseId": 16
        }
    ]
      }
    }'
```

{% endtab %}
{% endtabs %}


---

# 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://eshop.gitbook.io/eshopbox-developers/setting/sales-channel-subscription/update-a-sales-channel.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.
