---
page_source: https://juspay.io/in/docs/upi-merchant-stack/docs/submerchants/list-all-sub-merchant
page_title: List All Sub Merchant
---

## API Version: default


# List All Sub Merchants



This api lists all sub-merchants for the requested merchant.## Endpoints:
- Production: http://{{host}}/api/{uri}/merchants/sub/list

## Request Type: 
POST

## Headers:

#### Content-Type:
`application/json`
- Value: application/json
- Tags: string

#### x-merchant-signature:
This is a signature over combination of headers, payload. Refer Signature Calculation section for more details.
- Value: bypass
- Tags: string

#### x-merchant-id:
Will be shared while onboarding.
- Value: {{mid}}
- Tags: string

#### x-merchant-channel-id:
Will be shared while onboarding.
- Value: {{mcid}}
- Tags: string

#### Accept:
`application/json`
- Value: application/json
- Tags: string

#### x-timestamp:
This is an epoch unix timestamp string. For example, `1496918882000`. It can be used by us to invalidate older requests.
- Value: {{$timestamp}}
- Tags: string

#### x-sub-merchant-id:
Provided during on-boarding. To be passed in the apis if it needs to be invoked in sub merchant mode.
- Tags: String, Mandatory

#### x-sub-merchant-channel-id:
Provided during on-boarding. To be passed in the apis if it needs to be invoked in sub merchant mode.
- Tags: String, Mandatory
## Sample Code Snippets:
### Code Snippets:

#### Shell Code Snippet:

```shell
{"success":false,"message":"No Data found for the given path"}
```

### Sample Request and Response:

#### Request:
```json
{"success":false,"message":"No Data found for the given path"}
```

#### Response:
```json
{"success":false,"message":"No Data found for the given path"}
```

## Body Parameters:
### Parameters:

#### limit:
- Description: Number of sub-merchants to be returned
- Tags: Numeric, Mandatory

#### offset:
- Description: Offset value to be considered while listing
- Tags: Numeric, Mandatory

#### enabled:
- Description: Denotes if the sub-merchant is enabled or not**Constraints:** true, false
- Tags: String, optional

#### iat:
- Description: Timestamp to be used in JWS**Constraints:** As passed in the request body
- Tags: String, Mandatory
## API Responses:
### 200:

#### status:
- Description: Status of the API.**Values:** SUCCESS, FAILURE.
- Tags: String, Mandatory

#### responseCode:
- Description: SUCCESS if call succeeded. Otherwise shows the error code.**Values:** Refer error code section.
- Tags: String, Mandatory

#### responseMessage:
- Description: SUCCESS if call succeeded. Otherwise shows verbose error.**Values:** Refer error code section.
- Tags: String, Mandatory

#### payload:
- Value:
  - **SubMerchants**:
    - Description: Array of sub-merchant Information**Values:** See sample response.
    - Value:
      - **SubMerchantId**:
        - Description: merchantId of the sub-merchant**Values:** As passed while creation.
        - Tags: String, Mandatory
      - **SubMerchantChannelId**:
        - Description: channelId for the sub-merchant**Values:** As passed while creation.
        - Tags: String, Mandatory
    - Tags: String, Mandatory
  - **MerchantId**:
    - Description: Unique id for merchant.**Values:** As passed in request.
    - Tags: String, Mandatory
  - **MerchantChannelId**:
    - Description: Unique id for the channel via which request is made.**Values:** As passed in request.
    - Tags: String, Mandatory
  - **SubMerchantsCount**:
    - Description: Total number of sub-merchants configured for the aggregator.**Values:** Numeric.
    - Tags: Numeric, Mandatory
- Tags: String, Mandatory
