# Lookup wallet

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/wallets/lookup:
    get:
      summary: Lookup wallet
      deprecated: false
      description: >
        Retrieve wallet details by account number or external reference.

        This endpoint provides a quick way to locate a wallet linked to a
        closed-loop business account, using either system-generated identifiers
        or client-assigned references.


        Use this to fetch wallet metadata, confirm linkage to a business, or
        validate wallet existence before initiating transactions (e.g., payouts
        or funds).
      operationId: lookup-wallet
      tags:
        - Vrtx Closed loop/Wallets
        - Wallets
      parameters:
        - name: account_number
          in: query
          description: Twelve-digit wallet account number issued by closed-loop.
          required: false
          example: '054200003017'
          schema:
            type: string
        - name: external_reference
          in: query
          description: Partner-assigned wallet reference (requires business_id).
          required: false
          example: WALLET-Revenue-123
          schema:
            type: string
        - name: business_id
          in: query
          description: Owning business ID, required when using external_reference.
          required: false
          example: 2bb58ca6-1b9a-47b4-ab4d-b2996f0498f3
          schema:
            $ref: '#/components/schemas/UUID'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                x-apidog-orders: []
                x--orders: []
                properties: {}
                x--ignore-properties: []
              examples:
                Wallet:
                  summary: Wallet
                  value:
                    id: 622ea233-3f21-450f-8758-e42cdd4e5e74
                    business_id: 2bb58ca6-1b9a-47b4-ab4d-b2996f0498f3
                    name: Wallet for marketplace revenue
                    external_reference: WALLET-Revenue-123
                    can_overdraft: false
                    status: ACTIVE
                    account_number: '054200003017'
                    currency: SAR
                    balance: '0.00'
                    created_at: '2025-10-25T07:13:51.196Z'
                    updated_at: '2025-10-25T07:13:51.196Z'
          headers: {}
          x-apidog-name: OK
        '401':
          description: Not Authorized
          content:
            application/json:
              schema: &ref_0
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Unauthorized:
                  summary: Unauthorized
                  value:
                    error_code: UNAUTHORIZED_ACCESS
                    error_message: You are not authorized to access this resource.
                    details:
                      - field: authorization
                        message: Valid Bearer token required
                        code: unauthorized_access
                    status_code: 401
          headers: {}
          x-apidog-name: Unauthorized
        '403':
          description: Not Allowed
          content:
            application/json:
              schema: *ref_0
              examples:
                Forbidden:
                  summary: Forbidden
                  value:
                    error_code: FORBIDDEN
                    error_message: Forbidden
                    details:
                      - field: authorization
                        message: Insufficient permissions to access this resource
                        code: forbidden
                    status_code: 403
          headers: {}
          x-apidog-name: Forbidden
      security:
        - bearerAuth3: []
          x-apidog:
            schemeGroups:
              - id: GAS45DiaxPtswTWEIwr2V
                schemeIds:
                  - bearerAuth3
            required: true
            use:
              id: GAS45DiaxPtswTWEIwr2V
            scopes:
              GAS45DiaxPtswTWEIwr2V:
                bearerAuth3: []
      x-apidog-folder: Vrtx Closed loop/Wallets
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/1053095/apis/api-24814177-run
components:
  schemas:
    UUID:
      type: string
      format: uuid
      pattern: >-
        [a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}
      x-apidog-folder: ''
    ErrorResponse:
      type: object
      properties:
        error_code:
          type: string
        error_message:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/ErrorDetail'
        status_code:
          type: integer
          format: int32
      x-apidog-orders:
        - error_code
        - error_message
        - details
        - status_code
      x--orders:
        - error_code
        - error_message
        - details
        - status_code
      x--ignore-properties: []
      x-apidog-folder: ''
    ErrorDetail:
      type: object
      properties:
        field:
          type: string
        message:
          type: string
        code:
          type: string
      x-apidog-orders:
        - field
        - message
        - code
      x--orders:
        - field
        - message
        - code
      x--ignore-properties: []
      x-apidog-folder: ''
  securitySchemes:
    bearerAuth:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      description: Enter your JWT access token for authentication
    bearerAuth1:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
    bearerAuth2:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      description: Enter your JWT access token for authentication
    bearerAuth3:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT issued by Keycloak. The client_id/azp in the token must map to a
        configured tenant (public, fai, neomrs; e.g., fai-sandbox -> fai) or
        requests will return 403.
    bearerAuth4:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      description: Enter your JWT access token for authentication
    bearer:
      type: http
      scheme: bearer
servers:
  - url: https://api.sandbox.vrtx.sa
    description: Sandbox
security:
  - bearer: []

```
