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

# List applications for a source

> Retrieve all applications associated with an application source



## OpenAPI

````yaml GET /v1/crm/lead-sources/{leadSourceId}/leads
openapi: 3.1.0
info:
  title: PayHub API
  description: >-
    The PayHub API is a REST interface for the SignaPay PayHub Platform — a CRM
    and back-office system for payment processing agents, ISOs, partners, and
    merchants.


    ## Authentication


    All protected endpoints require a session token or API key passed in the
    `Authorization` header. Use the **Authentication** endpoints to create and
    manage sessions, including MFA challenge/response and session impersonation.
    Password resets, OTP delivery (email and SMS), and email address
    verification are handled by their own endpoint groups. SAML and OAuth2 flows
    are also supported.


    ## Core Resources


    The API is organized around five primary entity types:


    - **Leads** — Merchant applications in progress. Full lifecycle management
    including status transitions, risk profiling, document collection, principal
    and business address capture, deposit information, pricing configuration,
    equipment ordering, and e-signature sessions.

    - **Clients** — Approved merchant accounts. Mirrors the Lead resource
    structure with additional settings for portal configuration, security
    policies, API key provisioning, and user access.

    - **Partners** — ISO/partner organizations. Manage business details,
    principals, documents, notes, and pricing templates and packages.

    - **Merchants** — Active processing accounts linked to clients. Supports the
    same document, note, pricing, and equipment order sub-resources as Leads and
    Partners.

    - **Agents** — Sales agents associated with leads and merchants. Includes
    document and note management.


    ## Pricing & Reference Data


    Pricing is modeled at multiple levels (items, packages, rules, templates)
    and can be scoped to leads, partners, or merchants. Reference data endpoints
    provide read-only lists of Pricing Models, Merchant Category Codes (MCC),
    MCC relations and card processing profiles, Bank BINs, Industry Types,
    Merchant Types, and Merchant Risk Categories.


    ## Compliance & Validation


    Dedicated validation endpoints support MATCH Pro and Clear screening,
    address validation, and both lead-level and client-level business rule
    checks.


    ## Financial Reporting


    Read-only endpoints expose Deposits, Deposit Details, Chargebacks, Residuals
    (with merchant-level summaries, overrides, and detail), Transactions,
    Transaction Batches, and Statements.


    ## Support & Workflow


    A ticketing system (Tickets, Categories, Activities, Watchers, Clients,
    Documents) handles internal support requests. The FastApply group provides a
    streamlined MPA form submission flow. SAM Action Logs and Export endpoints
    round out back-office tooling.


    ## User & Access Management


    Manage platform users, their phone and email addresses, role-based
    permissions, feature flags, and user groups.
  version: 1.0.0
servers: []
security: []
tags:
  - name: FastApply
    description: Endpoints for the fast-apply MPA form flow.
  - name: Authentication
    description: Endpoints for session management.
  - name: Password Reset
    description: Endpoints for password reset and OTP verification.
  - name: Email Verification
    description: Endpoints for email address verification.
  - name: OTP
    description: Endpoints for one-time password generation and verification.
  - name: Lead
    description: Endpoints for lead management.
  - name: Lead Sources
    description: Endpoints for lead source management.
  - name: Lead Document
    description: Endpoints for lead document management.
  - name: Document Types
    description: Endpoints for document type management.
  - name: Pricing Models
    description: Endpoints for listing available pricing models.
  - name: Merchant Category Codes
    description: Endpoints for listing merchant category codes (MCC).
  - name: MCC Relations
    description: Endpoints for listing MCC relations.
  - name: MCC Card Processing Profiles
    description: Endpoints for listing MCC card processing profiles.
  - name: Bank BINs
    description: Endpoints for listing bank BINs.
  - name: Industry Types
    description: Endpoints for listing industry types.
  - name: Merchant Types
    description: Endpoints for listing merchant types.
  - name: Merchant Risk Categories
    description: Endpoints for listing merchant risk categories.
  - name: Lead Business Address
    description: Endpoints for lead business address management.
  - name: Lead Principal
    description: Endpoints for lead principal management.
  - name: Lead Deposit Info
    description: Endpoints for lead deposit info management.
  - name: Lead Note
    description: Endpoints for lead note management.
  - name: Signing
    description: Endpoints for e-signature signing sessions.
  - name: Lead Validations
    description: Endpoints for lead validation services.
  - name: Lead Pricing Items
    description: Endpoints for lead pricing items management.
  - name: Lead Pricing Packages
    description: Endpoints for lead pricing packages management.
  - name: Lead Pricing Rules
    description: Endpoints for lead pricing rules management.
  - name: Client Validations
    description: Endpoints for client validation services.
  - name: MATCH Pro
    description: >-
      Endpoints for Mastercard MATCH Pro services including inquiry history,
      retroactive monitoring, and terminated merchant reporting.
  - name: Clear
    description: Endpoints for Clear identity verification services.
  - name: Search
    description: Endpoints for Algolia-backed search.
  - name: Address Validation
    description: Endpoints for US address autocomplete and verification (Smarty proxy).
  - name: Client
    description: Endpoints for client management.
  - name: Client Business Address
    description: Endpoints for client business address management.
  - name: Client Principal
    description: Endpoints for client principal management.
  - name: Client Deposit Info
    description: Endpoints for client deposit info management.
  - name: Client Document
    description: Endpoints for client document management.
  - name: Client Note
    description: Endpoints for client note management.
  - name: Client Portal Settings
    description: Endpoints for client portal settings management.
  - name: Client Security Settings
    description: Endpoints for client security settings management.
  - name: Client API Key
    description: Endpoints for client API key management.
  - name: Partner
    description: Endpoints for partner management.
  - name: Partner Business Address
    description: Endpoints for partner business address management.
  - name: Partner Principal
    description: Endpoints for partner principal management.
  - name: Partner Document
    description: Endpoints for partner document management.
  - name: Partner Note
    description: Endpoints for partner note management.
  - name: Partner Pricing Items
    description: Endpoints for partner pricing items management.
  - name: Partner Pricing Templates
    description: Endpoints for partner pricing templates management.
  - name: Partner Pricing Packages
    description: Endpoints for partner pricing packages management.
  - name: Partner Pricing Rules
    description: Endpoints for partner pricing rules management.
  - name: Partner Processor Settings
    description: Endpoints for partner processor settings management.
  - name: Merchant
    description: Endpoints for merchant management.
  - name: Merchant Business Address
    description: Endpoints for merchant business address management.
  - name: Merchant Principal
    description: Endpoints for merchant principal management.
  - name: Merchant Document
    description: Endpoints for merchant document management.
  - name: Merchant Note
    description: Endpoints for merchant note management.
  - name: Merchant Pricing Items
    description: Endpoints for merchant pricing items management.
  - name: Merchant Pricing Templates
    description: Endpoints for merchant pricing templates management.
  - name: Merchant Pricing Packages
    description: Endpoints for merchant pricing packages management.
  - name: Merchant Pricing Rules
    description: Endpoints for merchant pricing rules management.
  - name: Merchant ISO Package
    description: Endpoints for merchant ISO package associations.
  - name: Agent
    description: Endpoints for agent management.
  - name: Agent Document
    description: Endpoints for agent document management.
  - name: Agent Note
    description: Endpoints for agent note management.
  - name: Ticket Categories
    description: Endpoints for ticket category management.
  - name: Tickets
    description: Endpoints for ticket management.
  - name: Ticket Activities
    description: Endpoints for ticket activity management.
  - name: Ticket Watchers
    description: Endpoints for ticket watcher management.
  - name: Ticket Clients
    description: Endpoints for ticket client management.
  - name: Ticket Documents
    description: Endpoints for ticket document management.
  - name: Client User
    description: Endpoints for client user management.
  - name: Users
    description: Endpoints for user management.
  - name: User Phones
    description: Endpoints for user phone number management.
  - name: User Emails
    description: Endpoints for user email address management.
  - name: Roles
    description: Endpoints for role management.
  - name: Role Features
    description: Endpoints for role feature management.
  - name: Features
    description: Endpoints for browsing the features catalog (the role permissions list).
  - name: Groups
    description: Endpoints for group management.
  - name: Group Users
    description: Endpoints for group user management.
  - name: SAM Action Logs
    description: Endpoints for SAM action log management.
  - name: Notification
    description: Endpoints for notification management.
  - name: Deposit
    description: Endpoints for deposit management.
  - name: Deposit Details
    description: Endpoints for deposit details management.
  - name: Chargeback
    description: Endpoints for chargeback management.
  - name: Residual
    description: Endpoints for residual report management.
  - name: Residual Merchant Summary
    description: Endpoints for merchant-level residual summaries.
  - name: Residual Override
    description: Endpoints for residual override management.
  - name: Residual Merchant Detail
    description: Endpoints for residual merchant fee category details.
  - name: Transaction
    description: Endpoints for transaction management.
  - name: Transaction Note
    description: Endpoints for transaction note management.
  - name: Transaction Batch
    description: Endpoints for transaction batch management.
  - name: Transaction Batch Note
    description: Endpoints for transaction batch note management.
  - name: Statement Note
    description: Endpoints for statement note management.
  - name: Lead Equipment Models
    description: Endpoints for lead equipment model management.
  - name: Lead Equipment Order
    description: Endpoints for lead equipment order management.
  - name: Lead Equipment Order Items
    description: Endpoints for lead equipment order item management.
  - name: Lead Equipment Order Gateway
    description: Endpoints for lead equipment order gateway management.
  - name: Lead Equipment Order File Build Type
    description: Endpoints for lead equipment order file build type management.
  - name: Merchant Equipment Models
    description: Endpoints for merchant equipment model management.
  - name: Merchant Equipment Order
    description: Endpoints for merchant equipment order management.
  - name: Merchant Equipment Order Items
    description: Endpoints for merchant equipment order item management.
  - name: Merchant Equipment Order Gateway
    description: Endpoints for merchant equipment order gateway management.
  - name: Merchant Equipment Order File Build Type
    description: Endpoints for merchant equipment order file build type management.
  - name: Export
    description: Endpoints for data export.
  - name: SAML
    description: Endpoints for SAML SSO identity provider integration.
  - name: OAuth2
    description: OAuth2 authorization server endpoints with Okta compatibility layer.
paths:
  /v1/crm/lead-sources/{leadSourceId}/leads:
    get:
      tags:
        - Lead Sources
      summary: List Leads for a Lead Source
      description: Returns a paginated list of leads associated with a lead source
      operationId: getLeadSourceLeads
      parameters:
        - in: query
          name: q
          schema:
            type: string
        - in: query
          name: size
          schema:
            default: 20
            type: number
        - in: query
          name: page
          schema:
            default: 1
            type: number
        - in: query
          name: sort
          schema:
            default: '-createdAt'
            type: string
        - in: query
          name: filter
          schema:
            default: {}
            type: object
            propertyNames:
              type: string
            additionalProperties:
              anyOf:
                - {}
                - type: array
                  items: {}
        - in: query
          name: expand
          schema:
            anyOf:
              - type: string
              - type: array
                items:
                  type: string
        - in: query
          name: searchable
          schema:
            type: array
            items:
              type: string
        - in: query
          name: before
          schema:
            type: object
            propertyNames:
              type: string
            additionalProperties:
              type: string
        - in: query
          name: after
          schema:
            type: object
            propertyNames:
              type: string
            additionalProperties:
              type: string
        - schema:
            type: string
          in: path
          name: leadSourceId
          required: true
      responses:
        '200':
          description: The paginated list of leads for the lead source.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LeadPaginated'
        '403':
          description: The user does not have permission to access this resource.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: number
                  code:
                    type: string
                  detail:
                    type: string
                required:
                  - status
                  - code
                  - detail
        '404':
          description: The requested resource was not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: number
                  code:
                    type: string
                  detail:
                    type: string
                required:
                  - status
                  - code
                  - detail
      security:
        - bearerAuth: []
        - apiKey: []
components:
  schemas:
    LeadPaginated:
      type: object
      properties:
        meta:
          type: object
          properties:
            totalCount:
              type: number
            totalPages:
              type: number
            page:
              type: number
            perPage:
              type: number
          required:
            - totalCount
            - totalPages
            - page
            - perPage
        data:
          type: array
          items:
            type: object
            properties:
              accountType:
                anyOf:
                  - type: string
                    enum:
                      - checking
                      - savings
                      - other
                  - type: 'null'
              amexAccountNumber:
                anyOf:
                  - type: string
                    maxLength: 18
                  - type: 'null'
              appProcessingEmail:
                anyOf:
                  - type: string
                    maxLength: 256
                    format: email
                    pattern: >-
                      ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                  - type: 'null'
              assignedTo:
                anyOf:
                  - anyOf:
                      - $ref: '#/components/schemas/User'
                      - type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  - type: 'null'
              underwriterId:
                anyOf:
                  - anyOf:
                      - $ref: '#/components/schemas/User'
                      - type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  - type: 'null'
              averageAmexVolume:
                anyOf:
                  - type: number
                  - type: 'null'
              averageTicket:
                anyOf:
                  - type: number
                  - type: 'null'
              bankId:
                anyOf:
                  - type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  - type: 'null'
              bankBinId:
                anyOf:
                  - type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  - type: 'null'
              businessPhoneNumber:
                anyOf:
                  - type: string
                    maxLength: 32
                  - type: 'null'
              cardOnFile:
                anyOf:
                  - type: boolean
                  - type: 'null'
              clientId:
                anyOf:
                  - type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  - type: 'null'
              clientPath:
                type: string
              companyWebsite:
                anyOf:
                  - anyOf:
                      - type: string
                      - type: string
                        maxLength: 256
                        format: uri
                  - type: 'null'
              createdAt:
                type: string
              createdBy:
                type: string
                format: uuid
                pattern: >-
                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
              customerServiceEmail:
                anyOf:
                  - type: string
                    maxLength: 256
                    format: email
                    pattern: >-
                      ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                  - type: 'null'
              customReturnPolicy:
                anyOf:
                  - type: string
                    maxLength: 100
                  - type: 'null'
              dateEstablished:
                anyOf:
                  - type: string
                  - type: 'null'
              dateSigned:
                anyOf:
                  - type: string
                  - type: 'null'
              yearsInBusiness:
                anyOf:
                  - type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  - type: 'null'
              dba:
                type: string
                maxLength: 80
              email:
                anyOf:
                  - anyOf:
                      - type: string
                        const: ''
                      - type: string
                        maxLength: 256
                        format: email
                        pattern: >-
                          ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                  - type: 'null'
              federalTaxId:
                anyOf:
                  - type: string
                  - type: 'null'
              firstName:
                type: string
                maxLength: 80
              id:
                type: string
                format: uuid
                pattern: >-
                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
              industryTypeId:
                anyOf:
                  - type: number
                  - type: 'null'
              internet:
                anyOf:
                  - type: number
                  - type: 'null'
              keyed:
                anyOf:
                  - type: number
                  - type: 'null'
              lastName:
                anyOf:
                  - type: string
                    maxLength: 80
                  - type: 'null'
              legal:
                anyOf:
                  - type: string
                    maxLength: 80
                  - type: 'null'
              liability:
                anyOf:
                  - type: string
                    enum:
                      - full_liability
                      - split_liability
                      - no_liability
                  - type: 'null'
              mcc:
                anyOf:
                  - type: string
                    minLength: 4
                    maxLength: 4
                  - type: 'null'
              merchantTypeId:
                anyOf:
                  - type: number
                  - type: 'null'
              monthlyAmexVolume:
                anyOf:
                  - type: number
                  - type: 'null'
              monthlyVolume:
                anyOf:
                  - type: number
                  - type: 'null'
              moto:
                anyOf:
                  - type: number
                  - type: 'null'
              numberOfEmployees:
                anyOf:
                  - type: string
                    enum:
                      - 1-10
                      - 10-50
                      - 50-100
                      - 100-1000
                      - 1000+
                  - type: 'null'
              numberOfSalesAgents:
                anyOf:
                  - type: number
                  - type: 'null'
              officeContactEmail:
                anyOf:
                  - type: string
                    maxLength: 256
                    format: email
                    pattern: >-
                      ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                  - type: 'null'
              ownershipType:
                anyOf:
                  - type: string
                    enum:
                      - Corporation
                      - Sole Proprietorship
                      - Partnership
                      - Association/Estate/Trust
                      - Tax Exempt (501C)
                      - International
                      - Limited Liability (LLC)
                      - Government Agency
                  - type: 'null'
              partnerLiability:
                anyOf:
                  - type: boolean
                  - type: 'null'
              partnerLiabilityPercent:
                anyOf:
                  - type: number
                  - type: 'null'
              phoneNumber:
                anyOf:
                  - type: string
                    maxLength: 32
                  - type: 'null'
              processorId:
                anyOf:
                  - type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  - type: 'null'
              recruiter:
                anyOf:
                  - type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  - type: 'null'
              relationshipManager:
                anyOf:
                  - type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  - type: 'null'
              retail:
                anyOf:
                  - type: number
                  - type: 'null'
              returnPolicy:
                anyOf:
                  - type: string
                    enum:
                      - no_questions
                      - 90_days
                      - 90+_days
                      - all_sales_final
                      - custom
                  - type: 'null'
              businessType:
                anyOf:
                  - type: string
                    maxLength: 50
                  - type: 'null'
              goodsAndServices:
                anyOf:
                  - type: string
                  - type: 'null'
              riskCategoryId:
                anyOf:
                  - type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  - type: 'null'
              riskProfile:
                anyOf:
                  - type: string
                    enum:
                      - level_1
                      - level_2
                      - level_3
                      - high_risk
                  - type: 'null'
              stateOfIncorporation:
                anyOf:
                  - type: string
                    minLength: 2
                    maxLength: 2
                  - type: 'null'
              status:
                anyOf:
                  - type: string
                    enum:
                      - data_entry
                      - lead
                      - review
                      - uw_review
                      - pending
                      - pending_review
                      - conditionally_approved
                      - approved
                      - closed
                      - withdrawn
                      - deleted
                      - pending_boarding
                  - type: 'null'
              type:
                type: string
                enum:
                  - partner
                  - merchant
              updatedAt:
                type: string
              updatedBy:
                type: string
                format: uuid
                pattern: >-
                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
              yearsInPaymentIndustry:
                anyOf:
                  - type: number
                  - type: 'null'
              depositTypeSetting:
                anyOf:
                  - type: string
                    enum:
                      - gross
                      - net
                  - type: 'null'
              fundingDelay:
                anyOf:
                  - type: string
                    enum:
                      - '0'
                      - '1'
                      - '2'
                  - type: 'null'
              nextDayFunding:
                anyOf:
                  - type: boolean
                  - type: 'null'
              minimumDiscountType:
                anyOf:
                  - type: string
                    enum:
                      - daily
                      - monthly
                  - type: 'null'
              reservePercent:
                anyOf:
                  - type: number
                    minimum: 0
                    maximum: 100
                  - type: 'null'
              underwriter:
                anyOf:
                  - $ref: '#/components/schemas/User'
                  - type: 'null'
              bank:
                anyOf:
                  - $ref: '#/components/schemas/Client'
                  - type: 'null'
              processor:
                anyOf:
                  - $ref: '#/components/schemas/Client'
                  - type: 'null'
            required:
              - clientPath
              - createdAt
              - createdBy
              - dba
              - firstName
              - id
              - type
              - updatedAt
              - updatedBy
      required:
        - meta
        - data
    User:
      type: object
      properties:
        avatar:
          anyOf:
            - type: string
            - type: 'null'
        createdAt:
          type: string
        firstName:
          type: string
        id:
          type: string
        lastName:
          type: string
        lastLoginAt:
          anyOf:
            - type: string
            - type: 'null'
        mfaEnabled:
          type: boolean
        mfaMethod:
          type: string
          enum:
            - email
            - sms
        timezone:
          type: string
        updatedAt:
          type: string
      required:
        - createdAt
        - firstName
        - id
        - lastName
        - mfaEnabled
        - mfaMethod
        - timezone
        - updatedAt
    Client:
      type: object
      properties:
        id:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        parentClientId:
          anyOf:
            - type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            - type: 'null'
        clientPath:
          type: string
        passwordExpirationDays:
          type: number
        loginFailureAttempts:
          type: number
        loginTimeoutMinutes:
          type: number
        tokenTimeoutMinutes:
          type: number
        otpValidityMinutes:
          type: number
        accountCooldownMinutes:
          type: number
        previousPasswordLimit:
          type: number
        multifactorEnabled:
          type: boolean
        createdAt:
          type: string
        createdBy:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        dba:
          anyOf:
            - type: string
              maxLength: 80
            - type: 'null'
        legal:
          anyOf:
            - type: string
              maxLength: 80
            - type: 'null'
        type:
          type: string
          enum:
            - sgpy
            - processor
            - bank
            - partner
            - merchant
            - agent
        status:
          type: string
          enum:
            - active
            - inactive
            - closed
        updatedAt:
          type: string
        updatedBy:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        firstName:
          anyOf:
            - type: string
              maxLength: 80
            - type: 'null'
        lastName:
          anyOf:
            - type: string
              maxLength: 80
            - type: 'null'
        email:
          anyOf:
            - anyOf:
                - type: string
                  const: ''
                - type: string
                  maxLength: 256
                  format: email
                  pattern: >-
                    ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
            - type: 'null'
        phoneNumber:
          anyOf:
            - type: string
              maxLength: 32
            - type: 'null'
        federalTaxId:
          anyOf:
            - type: string
            - type: 'null'
        hashedFederalTaxId:
          anyOf:
            - type: string
            - type: 'null'
        accountType:
          anyOf:
            - type: string
              enum:
                - checking
                - savings
                - other
            - type: 'null'
        bankIca:
          anyOf:
            - type: string
            - type: 'null'
        bankIsDefault:
          anyOf:
            - type: boolean
            - type: 'null'
        encryptionKeyId:
          anyOf:
            - type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            - type: 'null'
        dateSigned:
          anyOf:
            - type: string
            - type: 'null'
        qaInitiatedAt:
          anyOf:
            - type: string
            - type: 'null'
        qaCompletedAt:
          anyOf:
            - type: string
            - type: 'null'
        assignedTo:
          anyOf:
            - type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            - type: 'null'
        underwriterId:
          anyOf:
            - type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            - type: 'null'
        recruiter:
          anyOf:
            - type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            - type: 'null'
        relationshipManager:
          anyOf:
            - type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            - type: 'null'
        businessPhoneNumber:
          anyOf:
            - type: string
              maxLength: 32
            - type: 'null'
        officeContactEmail:
          anyOf:
            - type: string
              maxLength: 256
              format: email
              pattern: >-
                ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
            - type: 'null'
        appProcessingEmail:
          anyOf:
            - type: string
              maxLength: 256
              format: email
              pattern: >-
                ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
            - type: 'null'
        customerServiceEmail:
          anyOf:
            - type: string
              maxLength: 256
              format: email
              pattern: >-
                ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
            - type: 'null'
        numberOfSalesAgents:
          anyOf:
            - type: number
            - type: 'null'
        yearsInPaymentIndustry:
          anyOf:
            - type: number
            - type: 'null'
        partnerLiability:
          anyOf:
            - type: boolean
            - type: 'null'
        partnerLiabilityPercent:
          anyOf:
            - type: number
            - type: 'null'
        mcc:
          anyOf:
            - type: string
              minLength: 4
              maxLength: 4
            - type: 'null'
        industryTypeId:
          anyOf:
            - type: number
            - type: 'null'
        merchantTypeId:
          anyOf:
            - type: number
            - type: 'null'
        ownershipType:
          anyOf:
            - type: string
              enum:
                - Corporation
                - Sole Proprietorship
                - Partnership
                - Association/Estate/Trust
                - Tax Exempt (501C)
                - International
                - Limited Liability (LLC)
                - Government Agency
            - type: 'null'
        numberOfEmployees:
          anyOf:
            - type: string
              enum:
                - 1-10
                - 10-50
                - 50-100
                - 100-1000
                - 1000+
            - type: 'null'
        dateEstablished:
          anyOf:
            - type: string
            - type: 'null'
        stateOfIncorporation:
          anyOf:
            - type: string
              minLength: 2
              maxLength: 2
            - type: 'null'
        companyWebsite:
          anyOf:
            - anyOf:
                - type: string
                - type: string
                  maxLength: 256
                  format: uri
            - type: 'null'
        averageTicket:
          anyOf:
            - type: number
            - type: 'null'
        monthlyVolume:
          anyOf:
            - type: number
            - type: 'null'
        internet:
          anyOf:
            - type: number
            - type: 'null'
        keyed:
          anyOf:
            - type: number
            - type: 'null'
        moto:
          anyOf:
            - type: number
            - type: 'null'
        retail:
          anyOf:
            - type: number
            - type: 'null'
        monthlyAmexVolume:
          anyOf:
            - type: number
            - type: 'null'
        averageAmexVolume:
          anyOf:
            - type: number
            - type: 'null'
        amexAccountNumber:
          anyOf:
            - type: string
              maxLength: 18
            - type: 'null'
        bankId:
          anyOf:
            - type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            - type: 'null'
        bankBinId:
          anyOf:
            - type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            - type: 'null'
        processorId:
          anyOf:
            - type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            - type: 'null'
        riskCategoryId:
          anyOf:
            - type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            - type: 'null'
        riskProfile:
          anyOf:
            - type: string
              enum:
                - level_1
                - level_2
                - level_3
                - high_risk
            - type: 'null'
        liability:
          anyOf:
            - type: string
              enum:
                - full_liability
                - split_liability
                - no_liability
            - type: 'null'
        returnPolicy:
          anyOf:
            - type: string
              enum:
                - no_questions
                - 90_days
                - 90+_days
                - all_sales_final
                - custom
            - type: 'null'
        customReturnPolicy:
          anyOf:
            - type: string
              maxLength: 100
            - type: 'null'
        depositTypeSetting:
          anyOf:
            - type: string
              enum:
                - gross
                - net
            - type: 'null'
        fundingDelay:
          anyOf:
            - type: string
              enum:
                - '0'
                - '1'
                - '2'
            - type: 'null'
        nextDayFunding:
          anyOf:
            - type: boolean
            - type: 'null'
        minimumDiscountType:
          anyOf:
            - type: string
              enum:
                - daily
                - monthly
            - type: 'null'
        reservePercent:
          anyOf:
            - type: number
              minimum: 0
              maximum: 100
            - type: 'null'
        businessType:
          anyOf:
            - type: string
            - type: 'null'
        goodsAndServices:
          anyOf:
            - type: string
            - type: 'null'
        yearsInBusiness:
          anyOf:
            - type: integer
              minimum: 0
              maximum: 9007199254740991
            - type: 'null'
      required:
        - id
        - clientPath
        - passwordExpirationDays
        - loginFailureAttempts
        - loginTimeoutMinutes
        - tokenTimeoutMinutes
        - otpValidityMinutes
        - accountCooldownMinutes
        - previousPasswordLimit
        - multifactorEnabled
        - createdAt
        - createdBy
        - type
        - status
        - updatedAt
        - updatedBy
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Enter token in following format: Bearer <token>'
    apiKey:
      type: apiKey
      name: Authorization
      in: header
      description: 'Enter api-key in following format: Api-Key <api-key>'

````