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

# List Merchants

> Returns merchants with stable UUIDs, scoped to the authenticated entity

<Info>
  This endpoint returns merchants visible to your API key. Results are sorted alphabetically by name.
</Info>

## Merchant IDs

Each merchant has a stable UUID that remains consistent across API calls. Use this ID with the `merchant_id` filter on `/v1/transactions` to get all transactions for a merchant.

```bash theme={null}
# 1. Get merchants
GET /v1/merchants
# Response: [{"id": "57846d47-...", "name": "Coffee Shop"}, ...]

# 2. Use the ID to filter transactions
GET /v1/transactions?merchant_id=57846d47-d196-5c48-a881-4003b1d5aa98
```

## Next Steps

<CardGroup cols={2}>
  <Card title="List Transactions" icon="list" href="/api-reference/transaction-reporting/list-transactions">
    Filter transactions by merchant\_id
  </Card>

  <Card title="List Branches" icon="code-branch" href="/api-reference/transaction-reporting/list-branches">
    Get branches for a specific merchant
  </Card>
</CardGroup>


## OpenAPI

````yaml api-reference/transaction-reporting/openapi.json GET /v1/merchants
openapi: 3.0.3
info:
  title: Transaction Reporting API
  description: >-
    Unified REST API for querying transaction history across all payment
    methods. Provides entity-scoped data isolation with cursor-based pagination.


    **Entity Hierarchy:** Partner → Merchant → Branch → Terminal → Transaction.
    All data access is scoped to the authenticated API key's entity level.


    **Cursor Pagination:** All list endpoints use opaque cursor-based
    pagination. Default page size is 20, maximum is 100.


    **Sorting:** Transactions can be sorted by `created_at` (default),
    `updated_at`, or `amount` in ascending or descending order.


    **Unified Response Model:** All transactions use the same `amount_details`
    schema regardless of payment method. The canonical GTV field is
    `amount_received`.
  version: 1.1.0
  contact:
    name: API Support
    email: support@moduluslabs.io
  license:
    name: Proprietary
servers:
  - url: https://api.sbx.moduluslabs.io/reports
    description: Sandbox
security:
  - ApiKeyAuth: []
tags:
  - name: Transactions
    description: Transaction queries and reporting
  - name: Entities
    description: Merchant and branch listing
  - name: Health
    description: Health check endpoints
paths:
  /v1/merchants:
    get:
      tags:
        - Entities
      summary: List merchants
      description: |-
        Returns merchants  with their stable logical UUIDs.
        Results are entity-scoped to the caller's hierarchy and sorted by name.
        No database queries on the request path — served .
      operationId: listMerchants
      responses:
        '200':
          description: Merchant list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MerchantListResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
components:
  schemas:
    MerchantListResponse:
      type: object
      required:
        - data
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Merchant'
    Merchant:
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: string
          format: uuid
          description: Stable logical merchant UUID.
        name:
          type: string
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
  responses:
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ServiceUnavailable:
      description: Both database circuit breakers are open, or registry unavailable.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >
        API key for authentication. Verified by APISIX via Vanguard.

        APISIX injects identity headers and strips the raw key before
        forwarding.

````