> ## Documentation Index
> Fetch the complete documentation index at: https://docs-api.dexchange.sn/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a Sub-Merchant

> Update sub-merchant information

# Update a Sub-Merchant

All fields are optional. Only provided fields will be modified.

## Endpoint

```bash theme={null}
PATCH /api/v1/sub-merchant/:subMerchantId
```

## Headers

| Name          | Type   | Required | Description           |
| ------------- | ------ | -------- | --------------------- |
| Authorization | string | Yes      | Bearer YOUR\_API\_KEY |
| Content-Type  | string | Yes      | application/json      |

## Request Body

```json theme={null}
{
  "commercialName": "New Name",
  "countries": ["SN", "CI", "BJ"]
}
```

All parameters from the [create endpoint](/en/api-reference/sub-merchants/create) are accepted, all optional.

## Success Response (200)

```json theme={null}
{
  "success": true,
  "message": "Sub-merchant updated successfully",
  "data": {
    "subMerchantId": "sm-7f4a9940c621",
    "commercialName": "New Name",
    "countries": ["SN", "CI", "BJ"],
    "isActive": true
  }
}
```
