openapi: 3.0.4
info:
  title: PublicSquare Accounts API
  version: v1
servers:
  - url: https://api.publicsquare.com
paths:
  /account-invitations:
    get:
      tags:
        - Accounts
      description: "    Get a list of accounts invitations for the Account.\n\n    ### Permissions\n    * `account-invitation:read`"
      operationId: Get all account invitations
      parameters:
        - name: page
          in: query
          description: Page
          schema:
            maximum: 2147483647
            minimum: 0
            exclusiveMinimum: true
            type: integer
            description: Page
            format: int32
            nullable: true
            example: 8
        - name: size
          in: query
          description: Page size
          schema:
            maximum: 100
            minimum: 0
            exclusiveMinimum: true
            type: integer
            description: Page size
            format: int32
            nullable: true
            example: 20
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountInvitationPaginatedList'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - account-invitation:read
    post:
      tags:
        - Accounts
      description: "    Create a new account invitation for the Account.\n\n    ### Permissions\n    * `account-invitation:write`"
      operationId: Create account invitation
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAccountInvitationRequest'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountInvitation'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - account-invitation:write
  '/account-invitations/{id}/resend':
    post:
      tags:
        - Accounts
      description: "    Resend an account invitation for the Account.\n\n    ### Permissions\n    * `account-invitation:write`"
      operationId: Resend account invitation
      parameters:
        - name: id
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountInvitation'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - account-invitation:write
  '/account-invitations/{id}':
    delete:
      tags:
        - Accounts
      description: "    Delete an account invitation by ID from the Account.\n\n    ### Permissions\n    * `account-invitation:delete`"
      operationId: Delete account invitation
      parameters:
        - name: id
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
      responses:
        '204':
          description: No Content
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - account-invitation:delete
  /account-members:
    get:
      tags:
        - Accounts
      description: "    Get a list of members for the Account.\n\n    ### Permissions\n    * `account-member:read`"
      operationId: Get all account members
      parameters:
        - name: page
          in: query
          description: Page
          schema:
            maximum: 2147483647
            minimum: 0
            exclusiveMinimum: true
            type: integer
            description: Page
            format: int32
            nullable: true
            example: 8
        - name: size
          in: query
          description: Page size
          schema:
            maximum: 100
            minimum: 0
            exclusiveMinimum: true
            type: integer
            description: Page size
            format: int32
            nullable: true
            example: 20
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountMemberPaginatedList'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - account-member:read
  '/account-members/{id}':
    delete:
      tags:
        - Accounts
      description: "    Delete a member by ID from the Account.\n\n    ### Permissions\n    * `account-member:delete`"
      operationId: Delete account member
      parameters:
        - name: id
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
      responses:
        '204':
          description: No Content
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - account-member:delete
    put:
      tags:
        - Accounts
      description: "    Update an existing account member in the Account.\n\n    ### Permissions\n    * `account-member:write`"
      operationId: Update account member
      parameters:
        - name: id
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveAccountMemberRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountMember'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - account-member:write
  /accounts:
    get:
      tags:
        - Accounts
      description: "    Get the merchant and all accounts managed by the Account.\n\n    ### Permissions\n    * `account:read`"
      operationId: Get all accounts
      parameters:
        - name: type
          in: query
          description: Filter by account types
          schema:
            maxItems: 100
            type: array
            items:
              type: string
            description: Filter by account types
            nullable: true
            example:
              - merchant
        - name: payments_onboarding_status
          in: query
          description: Filter by account payments onboarding statuses
          schema:
            maxItems: 100
            type: array
            items:
              type: string
            description: Filter by account payments onboarding statuses
            nullable: true
            example:
              - verified
        - name: seller_onboarding_status
          in: query
          description: Filter by account seller onboarding statuses
          schema:
            maxItems: 100
            type: array
            items:
              type: string
            description: Filter by account seller onboarding statuses
            nullable: true
            example:
              - verified
        - name: credit_onboarding_status
          in: query
          description: Filter by account credit onboarding statuses
          schema:
            maxItems: 100
            type: array
            items:
              type: string
            description: Filter by account credit onboarding statuses
            nullable: true
            example:
              - verified
        - name: query
          in: query
          description: Filter by query
          schema:
            maxLength: 500
            type: string
            description: Filter by query
            nullable: true
            example: acc_B518niGwGYKzig6vtrRVZGGGV
        - name: page
          in: query
          description: Page
          schema:
            maximum: 2147483647
            minimum: 0
            exclusiveMinimum: true
            type: integer
            description: Page
            format: int32
            nullable: true
            example: 8
        - name: size
          in: query
          description: Page size
          schema:
            maximum: 100
            minimum: 0
            exclusiveMinimum: true
            type: integer
            description: Page size
            format: int32
            nullable: true
            example: 20
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountPaginatedList'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - account:read
    post:
      tags:
        - Accounts
      description: "    Create a new account.\n\n    ### Permissions\n    * `account:write`"
      operationId: Create account
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveAccountRequest'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - account:write
  /accounts/self:
    get:
      tags:
        - Accounts
      description: "    Get current account.\n\n    ### Permissions\n    * `account:read`"
      operationId: Get account
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - account:read
            - account:self:read
    put:
      tags:
        - Accounts
      description: "    Updates the account.\n\n    ### Permissions\n    * `account:write`"
      operationId: Update account
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAccountRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - account:write
    delete:
      tags:
        - Accounts
      description: "    Deletes the account. This operation is irreversible.\n\n    ### Permissions\n    * `account:delete`"
      operationId: Delete account
      responses:
        '204':
          description: No Content
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - account:delete
  /accounts/self/sellers:
    get:
      tags:
        - Accounts
      description: "    Get seller accounts managed by the Account.\n\n    ### Permissions\n    * `account:read`"
      operationId: Get seller accounts
      parameters:
        - name: type
          in: query
          description: Filter by account types
          schema:
            maxItems: 100
            type: array
            items:
              type: string
            description: Filter by account types
            nullable: true
            example:
              - merchant
        - name: payments_onboarding_status
          in: query
          description: Filter by account payments onboarding statuses
          schema:
            maxItems: 100
            type: array
            items:
              type: string
            description: Filter by account payments onboarding statuses
            nullable: true
            example:
              - verified
        - name: seller_onboarding_status
          in: query
          description: Filter by account seller onboarding statuses
          schema:
            maxItems: 100
            type: array
            items:
              type: string
            description: Filter by account seller onboarding statuses
            nullable: true
            example:
              - verified
        - name: credit_onboarding_status
          in: query
          description: Filter by account credit onboarding statuses
          schema:
            maxItems: 100
            type: array
            items:
              type: string
            description: Filter by account credit onboarding statuses
            nullable: true
            example:
              - verified
        - name: query
          in: query
          description: Filter by query
          schema:
            maxLength: 500
            type: string
            description: Filter by query
            nullable: true
            example: acc_B518niGwGYKzig6vtrRVZGGGV
        - name: page
          in: query
          description: Page
          schema:
            maximum: 2147483647
            minimum: 0
            exclusiveMinimum: true
            type: integer
            description: Page
            format: int32
            nullable: true
            example: 8
        - name: size
          in: query
          description: Page size
          schema:
            maximum: 100
            minimum: 0
            exclusiveMinimum: true
            type: integer
            description: Page size
            format: int32
            nullable: true
            example: 20
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountPaginatedList'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - account:read
  /accounts/self/managed-accounts:
    post:
      tags:
        - Accounts
      description: "    Create a new managed account with business details and product.\n\n    ### Permissions\n    * `account:write`\n    * `business:write`"
      operationId: Create managed account
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateManagedAccountRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnboardReview'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - account:write
            - business:write
    get:
      tags:
        - Accounts
      description: "    Get managed accounts by the Account.\n\n    ### Permissions\n    * `account:read`"
      operationId: Get managed accounts
      parameters:
        - name: start_dt
          in: query
          description: Inclusive start date to filter records by
          schema:
            maxLength: 40
            pattern: '^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?(\.\d+)?(Z|[+-]\d{2}:\d{2})?$'
            type: string
            description: Inclusive start date to filter records by
            format: date-time
            nullable: true
            example: '2024-05-30T12:14:56'
        - name: end_dt
          in: query
          description: Exclusive end date to filter records by
          schema:
            maxLength: 40
            pattern: '^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?(\.\d+)?(Z|[+-]\d{2}:\d{2})?$'
            type: string
            description: Exclusive end date to filter records by
            format: date-time
            nullable: true
            example: '2024-06-04T18:22:41'
        - name: type
          in: query
          description: Filter by account types
          schema:
            maxItems: 100
            type: array
            items:
              type: string
            description: Filter by account types
            nullable: true
            example:
              - merchant
        - name: payments_onboarding_status
          in: query
          description: Filter by account payments onboarding statuses
          schema:
            maxItems: 100
            type: array
            items:
              type: string
            description: Filter by account payments onboarding statuses
            nullable: true
            example:
              - verified
        - name: seller_onboarding_status
          in: query
          description: Filter by account seller onboarding statuses
          schema:
            maxItems: 100
            type: array
            items:
              type: string
            description: Filter by account seller onboarding statuses
            nullable: true
            example:
              - verified
        - name: credit_onboarding_status
          in: query
          description: Filter by account credit onboarding statuses
          schema:
            maxItems: 100
            type: array
            items:
              type: string
            description: Filter by account credit onboarding statuses
            nullable: true
            example:
              - verified
        - name: query
          in: query
          description: Filter by query
          schema:
            maxLength: 500
            type: string
            description: Filter by query
            nullable: true
            example: acc_B518niGwGYKzig6vtrRVZGGGV
        - name: page
          in: query
          description: Page
          schema:
            maximum: 2147483647
            minimum: 0
            exclusiveMinimum: true
            type: integer
            description: Page
            format: int32
            nullable: true
            example: 8
        - name: size
          in: query
          description: Page size
          schema:
            maximum: 100
            minimum: 0
            exclusiveMinimum: true
            type: integer
            description: Page size
            format: int32
            nullable: true
            example: 20
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountPaginatedList'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - account:read
  /accounts/self/permissions:
    get:
      tags:
        - Accounts
      description: "    Get permissions for the Account.\n\n    ### Permissions\n    * `account:read`"
      operationId: Get account permissions
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - account:read
  /accounts/self/products:
    post:
      tags:
        - Accounts
      description: "    Add a product to the Account.\n\n    ### Permissions\n    * `account:write`"
      operationId: Add product
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveProductRequest'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - account:write
  /account-settings:
    get:
      tags:
        - Accounts
      description: "    Get a list of settings for the Account.\n\n    ### Permissions\n    * `account:read`"
      operationId: Get all account settings
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AccountSetting'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - account:read
  /account-settings/request-access:
    post:
      tags:
        - Accounts
      description: "    Request account setting access in the Account.\n\n    ### Permissions\n    * `account:write`"
      operationId: Request account setting access
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RequestAccountSettingAccessRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountSetting'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - account:write
  /account-types:
    get:
      tags:
        - Accounts
      description: Get a list of account types.
      operationId: Get all account types
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AccountType'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey: [ ]
  /api-keys:
    get:
      tags:
        - API Keys
      description: "    Get a list of API keys for the Account.\n\n    ### Permissions\n    * `api-key:read`"
      operationId: Get all API keys
      parameters:
        - name: type
          in: query
          description: List of API key types to filter by
          schema:
            maxItems: 100
            type: array
            items:
              type: string
            description: List of API key types to filter by
            nullable: true
            example:
              - secret
        - name: page
          in: query
          description: Page
          schema:
            maximum: 2147483647
            minimum: 0
            exclusiveMinimum: true
            type: integer
            description: Page
            format: int32
            nullable: true
            example: 8
        - name: size
          in: query
          description: Page size
          schema:
            maximum: 100
            minimum: 0
            exclusiveMinimum: true
            type: integer
            description: Page size
            format: int32
            nullable: true
            example: 20
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKeyPaginatedList'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - api-key:read
    post:
      tags:
        - API Keys
      description: "    Create a new API key for the Account.\n\n    ### Permissions\n    * `api-key:write`"
      operationId: Create API key
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveApiKeyRequest'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKey'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - api-key:write
  '/api-keys/{id}':
    get:
      tags:
        - API Keys
      description: "    Get an API key by ID in the Account.\n\n    ### Permissions\n    * `api-key:read`"
      operationId: Get API key by ID
      parameters:
        - name: id
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKey'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - api-key:read
    put:
      tags:
        - API Keys
      description: "    Update an existing API key in the Account.\n\n    ### Permissions\n    * `api-key:write`"
      operationId: Update API key
      parameters:
        - name: id
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveApiKeyRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKey'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - api-key:write
    delete:
      tags:
        - API Keys
      description: "    Delete an API key by ID from the Account.\n\n    ### Permissions\n    * `api-key:delete`"
      operationId: Delete API key
      parameters:
        - name: id
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
      responses:
        '204':
          description: No Content
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - api-key:delete
  '/api-keys/{id}/reveal':
    get:
      tags:
        - API Keys
      description: "    Reveals the API key's `key`.\n\n    ### Permissions\n    * `api-key:read`"
      operationId: Reveal API key
      parameters:
        - name: id
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKey'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - api-key:read
  '/api-keys/{id}/regenerate':
    post:
      tags:
        - API Keys
      description: "    Regenerates an API key's `key` and returns the new key.\n\n    ### Permissions\n    * `payment-method:write`"
      operationId: Regenerate API key
      parameters:
        - name: id
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKey'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - api-key:write
  /api-key-types:
    get:
      tags:
        - API Keys
      description: Get a list of API key types.
      operationId: Get all API key types
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ApiKeyType'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey: [ ]
  /bank-account-holder-types:
    get:
      tags:
        - Business Bank Account
      description: Get a list of bank account holder types.
      operationId: Get all bank account holder types
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BankAccountHolderType'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey: [ ]
  /bank-account-statuses:
    get:
      tags:
        - Business Bank Account
      description: Get a list of bank account statues.
      operationId: Get all bank account statuses
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BankAccountStatus'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey: [ ]
  /bank-account-types:
    get:
      tags:
        - Business Bank Account
      description: Get a list of bank account types.
      operationId: Get all bank account types
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BankAccountType'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey: [ ]
  /business:
    get:
      tags:
        - Business
      description: "    Get the business details for the Account.\n\n    ### Permissions\n    * `business:read`"
      operationId: Get business
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Business'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:read
    put:
      tags:
        - Business
      description: "    Save the business details for the Account.\n\n    ### Permissions\n    * `business:write`"
      operationId: Save business
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveBusinessRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Business'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:write
  /business/ach-information:
    get:
      tags:
        - Business
      description: "    Get the business ACH information for the Account.\n\n    ### Permissions\n    * `business:read`"
      operationId: Get business ACH information
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessACHInformation'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:read
    put:
      tags:
        - Business
      description: "    Save the business ACH information for the Account.\n\n    ### Permissions\n    * `business:write`"
      operationId: Save business ACH information
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveBusinessACHInformationRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessACHInformation'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:write
  /business/bank-account:
    get:
      tags:
        - Business Bank Account
      description: "    Get the business bank account for the Account.\n\n    ### Permissions\n    * `business:read`"
      operationId: Get bank account
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessBankAccount'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:read
    put:
      tags:
        - Business Bank Account
      description: "    Save the business bank account for the Account.\n\n    ### Permissions\n    * `business:write`"
      operationId: Save bank account
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveBusinessBankAccountRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessBankAccount'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:write
  /business/bank-account/verification:
    get:
      tags:
        - Business Bank Account
      description: "    Get URL to initiate the bank account verification process for the Account.\n\n    ### Permissions\n    * `business:read`"
      operationId: Get bank verification URL
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankAccountVerificationIFrame'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:read
    post:
      tags:
        - Business Bank Account
      description: "    Save the bank account verification for the Account.\n\n    ### Permissions\n    * `business:write`"
      operationId: Save bank verification
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveBankAccountVerificationRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankAccountVerification'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:write
  /business/card-information:
    get:
      tags:
        - Business
      description: "    Get the business card information for the Account.\n\n    ### Permissions\n    * `business:read`"
      operationId: Get business card information
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessCardInformation'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:read
    put:
      tags:
        - Business
      description: "    Save the business card information for the Account.\n\n    ### Permissions\n    * `business:write`"
      operationId: Save business card information
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveBusinessCardInformationRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessCardInformation'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:write
  /business/credit-information:
    get:
      tags:
        - Business Credit Information
      description: "    Get the business credit information for the Account.\n\n    ### Permissions\n    * `business:read`"
      operationId: Get credit information
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessCreditInformation'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:read
    put:
      tags:
        - Business Credit Information
      description: "    Save the business credit information for the Account.\n\n    ### Permissions\n    * `business:write`"
      operationId: Save credit information
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveBusinessCreditInformationRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessCreditInformation'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:write
  /business/directors:
    get:
      tags:
        - Business Directors
      description: "    Get a list of business directors for the Account.\r\n\r\n    ### Permissions\r\n    * `business:read`"
      operationId: Get all directors
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BusinessDirector'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:read
    post:
      tags:
        - Business Directors
      description: "    Create a new business director for the Account.\r\n\r\n    ### Permissions\r\n    * `business:write`"
      operationId: Create director
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveBusinessDirectorRequest'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessDirector'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:write
  '/business/directors/{id}':
    get:
      tags:
        - Business Directors
      description: "    Get a business director by ID in the Account.\r\n\r\n    ### Permissions\r\n    * `business:read`"
      operationId: Get director by ID
      parameters:
        - name: id
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BusinessDirector'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:read
    put:
      tags:
        - Business Directors
      description: "    Update an existing business director in the Account.\r\n\r\n    ### Permissions\r\n    * `business:write`"
      operationId: Update director
      parameters:
        - name: id
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveBusinessDirectorRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessDirector'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:write
    delete:
      tags:
        - Business Directors
      description: "    Delete a business director by ID from the Account.\r\n\r\n    ### Permissions\r\n    * `business:write`"
      operationId: Delete director
      parameters:
        - name: id
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
      responses:
        '204':
          description: No Content
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:write
  /business-documents:
    get:
      tags:
        - Business Documents
      description: "    Get a list of business documents for the Account.\n\n    ### Permissions\n    * `business:read`"
      operationId: Get all business documents
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BusinessDocument'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:read
    post:
      tags:
        - Business Documents
      description: "    Uploads a business document for the Account.\n\n    ### Permissions\n    * `business:write`"
      operationId: Upload business document
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                type:
                  maxLength: 100
                  pattern: '^[a-zA-Z0-9_]+$'
                  type: string
                  description: Business document type
                  example: articles_of_incorporation
                file:
                  type: string
                  description: 'Business document file. Size must be less than 4 megabytes, and file type must be jpeg, png, or pdf.'
                  format: binary
                opt_out:
                  type: boolean
                  description: 'If `can_opt_out` is `true` for the document type, an optional flag to opt out of the business document because it is not applicable for your business.'
                  example: false
                entity_id:
                  maxLength: 50
                  pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
                  type: string
                  description: ID of the entity or person the document is associated with
                  example: rep_5mQSxcSAW3UZ4ijLzEt4RuAib
                entity_type:
                  maxLength: 100
                  pattern: '^[a-zA-Z0-9_]+$'
                  type: string
                  description: Type or role of entity the document is associated with
                  example: business_representative
            encoding:
              type:
                style: form
              file:
                style: form
              opt_out:
                style: form
              entity_id:
                style: form
              entity_type:
                style: form
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessDocument'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:write
  '/business-documents/{id}':
    get:
      tags:
        - Business Documents
      description: "    Get a business document by ID in the Account.\n\n    ### Permissions\n    * `business:read`"
      operationId: Get business document by ID
      parameters:
        - name: id
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessDocument'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:read
    delete:
      tags:
        - Business Documents
      description: "    Delete a business document by ID from the Account.\n\n    ### Permissions\n    * `business:write`"
      operationId: Delete business document
      parameters:
        - name: id
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
      responses:
        '204':
          description: No Content
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:write
  /business-document-types:
    get:
      tags:
        - Business Documents
      description: Get a list of business document types.
      operationId: Get all business document types
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BusinessDocumentType'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey: [ ]
  /business/fulfillment-information:
    get:
      tags:
        - Business
      description: "    Get the business fulfillment information for the Account.\n\n    ### Permissions\n    * `business:read`"
      operationId: Get business fulfillment information
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessFulfillmentInformation'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:read
    put:
      tags:
        - Business
      description: "    Save the business fulfillment information for the Account.\n\n    ### Permissions\n    * `business:write`"
      operationId: Save business fulfillment information
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveBusinessFulfillmentInformationRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessFulfillmentInformation'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:write
  /business-industries:
    get:
      tags:
        - Business Tax Information
      description: Get a list of business industries.
      operationId: Get all business industries
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BusinessIndustryGroup'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey: [ ]
  /business/representative:
    get:
      tags:
        - Business Representative
      description: "    Get the business representative for the Account.\n\n    ### Permissions\n    * `business:read`"
      operationId: Get business representative
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessRepresentative'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:read
    put:
      tags:
        - Business Representative
      description: "    Save the business representative for the Account.\n\n    ### Permissions\n    * `business:write`"
      operationId: Save business representative
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveBusinessRepresentativeRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessRepresentative'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:write
  /business/representative/as-owner:
    post:
      tags:
        - Business Representative
      description: "    Copies the business representative as an ultimate beneficial owner for the Account.\n\n    ### Permissions\n    * `business:write`"
      operationId: Copy business representative as owner
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UltimateBeneficialOwner'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:write
  /business/shareholders:
    get:
      tags:
        - Business Shareholders
      description: "    Get a list of business shareholders for the Account.\r\n\r\n    ### Permissions\r\n    * `business:read`"
      operationId: Get all shareholders
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BusinessShareholder'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:read
    post:
      tags:
        - Business Shareholders
      description: "    Create a new business shareholder for the Account.\r\n\r\n    ### Permissions\r\n    * `business:write`"
      operationId: Create shareholder
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveBusinessShareholderRequest'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessShareholder'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:write
  '/business/shareholders/{id}':
    get:
      tags:
        - Business Shareholders
      description: "    Get a business shareholder by ID in the Account.\r\n\r\n    ### Permissions\r\n    * `business:read`"
      operationId: Get shareholder by ID
      parameters:
        - name: id
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessShareholder'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:read
    put:
      tags:
        - Business Shareholders
      description: "    Update an existing business sharholder in the Account.\r\n\r\n    ### Permissions\r\n    * `business:write`"
      operationId: Update shareholder
      parameters:
        - name: id
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveBusinessShareholderRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessShareholder'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:write
    delete:
      tags:
        - Business Shareholders
      description: "    Delete a business shareholder by ID from the Account.\r\n\r\n    ### Permissions\r\n    * `business:write`"
      operationId: Delete shareholder
      parameters:
        - name: id
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
      responses:
        '204':
          description: No Content
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:write
  /business-structures:
    get:
      tags:
        - Business
      description: Get a list of business structures.
      operationId: Get all business structures
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BusinessStructure'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey: [ ]
  /business/tax-information:
    get:
      tags:
        - Business Tax Information
      description: "    Get the business tax information for the Account.\n\n    ### Permissions\n    * `business:read`"
      operationId: Get tax information
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessTaxInformation'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:read
    put:
      tags:
        - Business Tax Information
      description: "    Save the business tax information for the Account.\n\n    ### Permissions\n    * `business:write`"
      operationId: Save tax information
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveBusinessTaxInformationRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessTaxInformation'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:write
  /business-types:
    get:
      tags:
        - Business
      description: Get a list of business types.
      operationId: Get all business types
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BusinessType'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey: [ ]
  /business/ultimate-beneficial-owners:
    get:
      tags:
        - Business Ultimate Beneficial Owners
      description: "    Get a list of business ultimate beneficial owners for the Account.\n\n    ### Permissions\n    * `business:read`"
      operationId: Get all ultimate beneficial owners
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/UltimateBeneficialOwner'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:read
    post:
      tags:
        - Business Ultimate Beneficial Owners
      description: "    Create a new business ultimate beneficial owner for the Account.\n\n    ### Permissions\n    * `business:write`"
      operationId: Create ultimate beneficial owner
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveUltimateBeneficialOwnerRequest'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UltimateBeneficialOwner'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:write
  '/business/ultimate-beneficial-owners/{id}':
    get:
      tags:
        - Business Ultimate Beneficial Owners
      description: "    Get a business ultimate beneficial owner by ID in the Account.\n\n    ### Permissions\n    * `business:read`"
      operationId: Get ultimate beneficial owner by ID
      parameters:
        - name: id
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UltimateBeneficialOwner'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:read
    put:
      tags:
        - Business Ultimate Beneficial Owners
      description: "    Update an existing business ultimate beneficial owner in the Account.\n\n    ### Permissions\n    * `business:write`"
      operationId: Update ultimate beneficial owner
      parameters:
        - name: id
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveUltimateBeneficialOwnerRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UltimateBeneficialOwner'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:write
    delete:
      tags:
        - Business Ultimate Beneficial Owners
      description: "    Delete a business ultimate beneficial owner by ID from the Account.\n\n    ### Permissions\n    * `business:write`"
      operationId: Delete ultimate beneficial owner
      parameters:
        - name: id
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
      responses:
        '204':
          description: No Content
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:write
  '/contracts/{product}/latest':
    get:
      tags:
        - Contracts
      description: "    Get latest contract for a product in the Account.\n\n    ### Permissions\n    * `business:read`"
      operationId: Get latest product contract
      parameters:
        - name: product
          in: path
          required: true
          schema:
            maxLength: 10
            pattern: ^(credit|payments|seller)$
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Contract'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:read
  '/contracts/{id}':
    get:
      tags:
        - Contracts
      description: "    Get a contract by ID in the Account.\n\n    ### Permissions\n    * `business:read`"
      operationId: Get contract by ID
      parameters:
        - name: id
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Contract'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:read
  /contracts:
    post:
      tags:
        - Contracts
      description: "    Create a new contract for the Account.\n\n    ### Permissions\n    * `business:write`"
      operationId: Create contract
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateContractRequest'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Contract'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:write
  /countries:
    get:
      tags:
        - Business
      description: Get a list of business countries.
      operationId: Get all countries
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Country'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey: [ ]
  /credit-product-lines:
    get:
      tags:
        - Products
      description: Get a list of credit product lines.
      operationId: Get all credit product lines
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CreditProductLine'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey: [ ]
  /customers:
    get:
      tags:
        - Customers
      description: "    Get a list of customers for the Account.\n\n    ### Permissions\n    * `customer:read`"
      operationId: Get all customers
      parameters:
        - name: query
          in: query
          description: Filter by query
          schema:
            maxLength: 500
            type: string
            description: Filter by query
            nullable: true
            example: John Doe
        - name: page
          in: query
          description: Page
          schema:
            maximum: 2147483647
            minimum: 0
            exclusiveMinimum: true
            type: integer
            description: Page
            format: int32
            nullable: true
            example: 8
        - name: size
          in: query
          description: Page size
          schema:
            maximum: 100
            minimum: 0
            exclusiveMinimum: true
            type: integer
            description: Page size
            format: int32
            nullable: true
            example: 20
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerPaginatedList'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - customer:read
    post:
      tags:
        - Customers
      description: "    Create a new customer for the Account.\n\n    ### Permissions\n    * `customer:write`"
      operationId: Create customer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveCustomerRequest'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - customer:write
  '/customers/{id}':
    get:
      tags:
        - Customers
      description: "    Get a customer by ID in the Account.\n\n    ### Permissions\n    * `customer:read`"
      operationId: Get customer by ID
      parameters:
        - name: id
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - customer:read
    put:
      tags:
        - Customers
      description: "    Update an existing customer in the Account.\n\n    ### Permissions\n    * `customer:write`"
      operationId: Update customer
      parameters:
        - name: id
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveCustomerRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - customer:write
    delete:
      tags:
        - Customers
      description: "    Delete a customer by ID from the Account.\n\n    ### Permissions\n    * `customer:delete`"
      operationId: Delete customer
      parameters:
        - name: id
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
      responses:
        '204':
          description: No Content
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - customer:delete
  /events:
    get:
      tags:
        - Events
      description: "    Get a list of events for the Account.\n\n    ### Permissions\n    * `event:read`"
      operationId: Get all events
      parameters:
        - name: start_dt
          in: query
          description: Inclusive start date to filter records by
          schema:
            maxLength: 40
            pattern: '^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?(\.\d+)?(Z|[+-]\d{2}:\d{2})?$'
            type: string
            description: Inclusive start date to filter records by
            format: date-time
            nullable: true
            example: '2024-05-30T12:14:56'
        - name: end_dt
          in: query
          description: Exclusive end date to filter records by
          schema:
            maxLength: 40
            pattern: '^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?(\.\d+)?(Z|[+-]\d{2}:\d{2})?$'
            type: string
            description: Exclusive end date to filter records by
            format: date-time
            nullable: true
            example: '2024-06-04T18:22:41'
        - name: event_type
          in: query
          description: List of event types to filter by
          schema:
            maxItems: 100
            type: array
            items:
              type: string
            description: List of event types to filter by
            nullable: true
            example:
              - connection:update
        - name: query
          in: query
          description: Filter by query
          schema:
            maxLength: 500
            type: string
            description: Filter by query
            nullable: true
            example: pmt_2YKewBonG4tgk12MheY3PiHDy
        - name: page
          in: query
          description: Page
          schema:
            maximum: 2147483647
            minimum: 0
            exclusiveMinimum: true
            type: integer
            description: Page
            format: int32
            nullable: true
            example: 8
        - name: size
          in: query
          description: Page size
          schema:
            maximum: 100
            minimum: 0
            exclusiveMinimum: true
            type: integer
            description: Page size
            format: int32
            nullable: true
            example: 20
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventPaginatedList'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - event:read
  '/events/{id}':
    get:
      tags:
        - Events
      description: "    Get an event by ID in the Account.\n\n    ### Permissions\n    * `event:read`"
      operationId: Get event by ID
      parameters:
        - name: id
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Event'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - event:read
  /event-types:
    get:
      tags:
        - Events
      description: Get a list of event types.
      operationId: Get all event types
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EventType'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey: [ ]
  /business/firearms-questionnaire:
    get:
      tags:
        - Business
      description: "    Get the business firearms questionnaire for the Account.\n\n    ### Permissions\n    * `business:read`"
      operationId: Get business firearms questionnaire
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FirearmsQuestionnaire'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:read
    put:
      tags:
        - Business
      description: "    Save the business firearms questionnaire for the Account.\n\n    ### Permissions\n    * `business:write`"
      operationId: Save business firearms questionnaire
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveFirearmsQuestionnaireRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FirearmsQuestionnaire'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:write
  /holding-accounts:
    get:
      tags:
        - Holding Accounts
      description: "    Get a list of holding accounts for the Account.\n\n    ### Permissions\n    * `holding-account:read`"
      operationId: Get all holding accounts
      parameters:
        - name: type
          in: query
          description: Holding account type
          schema:
            maxLength: 50
            type: string
            description: Holding account type
            nullable: true
            example: 8
        - name: processor
          in: query
          description: Processor name
          schema:
            maxLength: 50
            type: string
            description: Processor name
            nullable: true
        - name: page
          in: query
          description: Page
          schema:
            maximum: 2147483647
            minimum: 0
            exclusiveMinimum: true
            type: integer
            description: Page
            format: int32
            nullable: true
            example: 8
        - name: size
          in: query
          description: Page size
          schema:
            maximum: 100
            minimum: 0
            exclusiveMinimum: true
            type: integer
            description: Page size
            format: int32
            nullable: true
            example: 20
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HoldingAccountPaginatedList'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - holding-account:read
  '/holding-accounts/{id}':
    get:
      tags:
        - Holding Accounts
      description: "    Get a holding account by ID.\n\n    ### Permissions\n* `holding-account:read`"
      operationId: Get holding account by ID
      parameters:
        - name: id
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HoldingAccount'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - holding-account:read
  '/holding-accounts/{id}/balance':
    get:
      tags:
        - Holding Accounts
      description: "Get balance of a holding account by ID.\n\n    ### Permissions\n* `holding-account:read`"
      operationId: Get holding account balance by ID
      parameters:
        - name: id
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HoldingAccount'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - holding-account:read
  '/onboarding/{product}/review':
    get:
      tags:
        - Onboarding
      description: "    Gets onboarding review for a product in the Account.\n\n    ### Permissions\n    * `business:read`"
      operationId: Review onboarding
      parameters:
        - name: product
          in: path
          required: true
          schema:
            maxLength: 10
            pattern: ^(credit|payments|seller)$
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnboardReview'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:read
  '/onboarding/{product}':
    post:
      tags:
        - Onboarding
      description: "    Starts the onboarding process for a product in the Account.\n\n    ### Permissions\n    * `business:write`"
      operationId: Onboard
      parameters:
        - name: product
          in: path
          required: true
          schema:
            maxLength: 10
            pattern: ^(credit|payments|seller)$
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnboardReview'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:write
  '/accounts/{accountId}/onboarding-invitations':
    get:
      tags:
        - Onboarding Invitations
      description: "    Get a list of onboarding invitations for the Account.\n\n    ### Permissions\n    * `onboarding-invitation:read`"
      operationId: Get all onboarding invitations
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
        - name: page
          in: query
          description: Page
          schema:
            maximum: 2147483647
            minimum: 0
            exclusiveMinimum: true
            type: integer
            description: Page
            format: int32
            nullable: true
            example: 8
        - name: size
          in: query
          description: Page size
          schema:
            maximum: 100
            minimum: 0
            exclusiveMinimum: true
            type: integer
            description: Page size
            format: int32
            nullable: true
            example: 20
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnboardingInvitationPaginatedList'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - onboarding-invitation:read
    post:
      tags:
        - Onboarding Invitations
      description: "    Create a new onboarding invitation for the Account.\n\n    ### Permissions\n    * `onboarding-invitation:write`"
      operationId: Create onboarding invitation
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveOnboardingInvitationRequest'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnboardingInvitation'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - onboarding-invitation:write
  '/accounts/{accountId}/onboarding-invitations/{id}':
    get:
      tags:
        - Onboarding Invitations
      description: Get a onboarding invitation by ID in the Account.
      operationId: Get onboarding invitation by ID
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
        - name: id
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnboardingInvitation'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    put:
      tags:
        - Onboarding Invitations
      description: "    Update an existing onboarding invitation in the Account.\n\n    ### Permissions\n    * `onboarding-invitation:write`"
      operationId: Update onboarding invitation
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
        - name: id
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveOnboardingInvitationRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnboardingInvitation'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - onboarding-invitation:write
    delete:
      tags:
        - Onboarding Invitations
      description: "    Delete an onboarding invitation by ID from the Account.\n\n    ### Permissions\n    * `onboarding-invitation:delete`"
      operationId: Delete onboarding invitation
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
        - name: id
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnboardingInvitation'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - onboarding-invitation:delete
  /permissions:
    get:
      tags:
        - API Keys
      description: Get a list of permissions.
      operationId: Get all permissions
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Permission'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey: [ ]
  /business/pharmaceutical-questionnaire:
    get:
      tags:
        - Business
      description: "    Get the business pharmaceutical questionnaire for the Account.\n\n    ### Permissions\n    * `business:read`"
      operationId: Get business pharmaceutical questionnaire
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PharmaceuticalQuestionnaire'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:read
    put:
      tags:
        - Business
      description: "    Save the business pharmaceutical questionnaire for the Account.\n\n    ### Permissions\n    * `business:write`"
      operationId: Save business pharmaceutical questionnaire
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SavePharmaceuticalQuestionnaireRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PharmaceuticalQuestionnaire'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - business:write
  /products:
    get:
      tags:
        - Products
      description: Get a list of products.
      operationId: Get all products
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Product'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey: [ ]
  /roles:
    get:
      tags:
        - Roles
      description: Get a list of account roles.
      operationId: Get all account roles
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Role'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey: [ ]
  '/webhooks/{webhookId}/events':
    get:
      tags:
        - Webhooks
      description: "    Get a list of webhook events by webhook ID for the Account.\n\n    ### Permissions\n    * `webhook:read`"
      operationId: Get all webhook events
      parameters:
        - name: webhookId
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
        - name: status
          in: query
          description: List of statuses to filter by
          schema:
            maxItems: 100
            type: array
            items:
              type: string
            description: List of statuses to filter by
            nullable: true
            example:
              - delivered
              - failed
        - name: start_dt
          in: query
          description: Inclusive start date to filter records by
          schema:
            maxLength: 40
            pattern: '^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?(\.\d+)?(Z|[+-]\d{2}:\d{2})?$'
            type: string
            description: Inclusive start date to filter records by
            format: date-time
            nullable: true
            example: '2024-05-30T12:14:56'
        - name: end_dt
          in: query
          description: Exclusive end date to filter records by
          schema:
            maxLength: 40
            pattern: '^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?(\.\d+)?(Z|[+-]\d{2}:\d{2})?$'
            type: string
            description: Exclusive end date to filter records by
            format: date-time
            nullable: true
            example: '2024-06-04T18:22:41'
        - name: event_type
          in: query
          description: List of event types to filter by
          schema:
            maxItems: 100
            type: array
            items:
              type: string
            description: List of event types to filter by
            nullable: true
            example:
              - connection:update
        - name: query
          in: query
          description: Filter by query
          schema:
            maxLength: 500
            type: string
            description: Filter by query
            nullable: true
            example: pmt_2YKewBonG4tgk12MheY3PiHDy
        - name: page
          in: query
          description: Page
          schema:
            maximum: 2147483647
            minimum: 0
            exclusiveMinimum: true
            type: integer
            description: Page
            format: int32
            nullable: true
            example: 8
        - name: size
          in: query
          description: Page size
          schema:
            maximum: 100
            minimum: 0
            exclusiveMinimum: true
            type: integer
            description: Page size
            format: int32
            nullable: true
            example: 20
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookEventPaginatedList'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - webhook:read
  '/webhooks/{webhookId}/events/{id}':
    get:
      tags:
        - Webhooks
      description: "    Get a webhook event by ID in the Account.\n\n    ### Permissions\n    * `webhook:read`"
      operationId: Get webhook event by ID
      parameters:
        - name: webhookId
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
        - name: id
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookEvent'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - webhook:read
  '/webhooks/{webhookId}/events/{id}/requeue':
    post:
      tags:
        - Webhooks
      description: "    Requeue a webhook event for delivery by ID in the Account.\n\n    ### Permissions\n    * `webhook:write`"
      operationId: Requeue a webhook event by ID
      parameters:
        - name: webhookId
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
        - name: id
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookEvent'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - webhook:write
  /webhooks:
    get:
      tags:
        - Webhooks
      description: "    Get a list of webhooks for the Account.\n\n    ### Permissions\n    * `webhook:read`"
      operationId: Get all webhooks
      parameters:
        - name: page
          in: query
          description: Page
          schema:
            maximum: 2147483647
            minimum: 0
            exclusiveMinimum: true
            type: integer
            description: Page
            format: int32
            nullable: true
            example: 8
        - name: size
          in: query
          description: Page size
          schema:
            maximum: 100
            minimum: 0
            exclusiveMinimum: true
            type: integer
            description: Page size
            format: int32
            nullable: true
            example: 20
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookPaginatedList'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - webhook:read
    post:
      tags:
        - Webhooks
      description: "    Create a new webhook for the Account.\n\n    ### Permissions\n    * `webhook:write`"
      operationId: Create webhook
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveWebhookRequest'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - webhook:write
  '/webhooks/{id}':
    get:
      tags:
        - Webhooks
      description: "    Get a webhook by ID in the Account.\n\n    ### Permissions\n    * `webhook:read`"
      operationId: Get webhook by ID
      parameters:
        - name: id
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - webhook:read
    put:
      tags:
        - Webhooks
      description: "    Update an existing webhook in the Account.\n\n    ### Permissions\n    * `webhook:write`"
      operationId: Update webhook
      parameters:
        - name: id
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveWebhookRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - webhook:write
    delete:
      tags:
        - Webhooks
      description: "    Delete a webhook by ID from the Account.\n\n    ### Permissions\n    * `webhook:delete`"
      operationId: Delete webhook
      parameters:
        - name: id
          in: path
          required: true
          schema:
            maxLength: 50
            pattern: '^[a-zA-Z]{2,6}_[1-9A-HJ-NP-Za-km-z]+$'
            type: string
      responses:
        '204':
          description: No Content
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
      security:
        - ApiKey:
            - webhook:delete
components:
  schemas:
    Account:
      required:
        - name
        - type
      type: object
      properties:
        id:
          type: string
          description: Account ID
          nullable: true
          example: acc_B518niGwGYKzig6vtrRVZGGGV
        business_name:
          type: string
          description: Name of the business if business customer type
          nullable: true
          example: 'Awesome Company, LLC'
        payments_onboarding_status:
          type: string
          description: Payment onboarding status
          nullable: true
          example: verified
        seller_onboarding_status:
          type: string
          description: Seller onboarding status
          nullable: true
          example: not_started
        credit_onboarding_status:
          type: string
          description: Credit onboarding status
          nullable: true
          example: in_progress
        products:
          type: array
          items:
            type: string
          description: Returns all accepted product invitation types
          nullable: true
          example:
            - payments
            - credit
        default_processor:
          type: string
          description: Default processor for the account
          nullable: true
          example: nuvei
        managed_by:
          type: string
          description: Account ID responsible for managing this account
          nullable: true
          example: acc_CeSpZTY89WVRstrEHoKJ4
        created_at:
          type: string
          description: Date account was created
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        modified_at:
          type: string
          description: Date account was modified
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        name:
          maxLength: 200
          minLength: 1
          type: string
          description: Name of the account
          example: 'Test Company, LLC'
        type:
          minLength: 1
          type: string
          description: Type of the account
          example: merchant
      additionalProperties: false
    AccountInvitation:
      required:
        - email
      type: object
      properties:
        id:
          type: string
          description: Member Invitation ID
          nullable: true
          example: ain_7X5G2jJtrCTFawhKJSEUngkAN
        account_id:
          type: string
          description: Account ID for the invitation
          nullable: true
          example: acc_B518niGwGYKzig6vtrRVZGGGV
        account_name:
          type: string
          description: Name of the account that created the invitation
          nullable: true
          example: 'Test Company, LLC'
        status:
          type: string
          description: Invitation status
          nullable: true
          example: pending
        invitation_url:
          type: string
          description: URL of where to forward the user to review the invitation
          nullable: true
          example: https://portal.publicsquare.com/accounts/invitations/ain_7X5G2jJtrCTFawhKJSEUngkAN
        expires_at:
          type: string
          description: Date invitation expires
          format: date-time
          example: '2024-07-08T01:02:29.212Z'
        created_at:
          type: string
          description: Date invitation was created
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        modified_at:
          type: string
          description: Date invitation was modified
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        email:
          maxLength: 250
          minLength: 1
          type: string
          description: Email address of user being invited to the account
          format: email
          example: john.smith@example.com
        role:
          maxLength: 50
          type: string
          description: Role to be assigned when the invitation is accepted
          nullable: true
          example: admin
      additionalProperties: false
    AccountInvitationPaginatedList:
      type: object
      properties:
        pagination:
          $ref: '#/components/schemas/Pagination'
        data:
          maxItems: 100
          type: array
          items:
            $ref: '#/components/schemas/AccountInvitation'
          nullable: true
      additionalProperties: false
    AccountMember:
      type: object
      properties:
        id:
          type: string
          description: Account member ID
          nullable: true
          example: acm_B7mcTLMurmytz2NHhbhSQhu1S
        account_id:
          type: string
          description: Account ID
          nullable: true
          example: acc_B518niGwGYKzig6vtrRVZGGGV
        email:
          type: string
          description: Member's email address
          nullable: true
          example: john.smith@example.com
        first_name:
          type: string
          description: Member's first name
          nullable: true
          example: John
        last_name:
          type: string
          description: Member's last name
          nullable: true
          example: Smith
        picture:
          type: string
          description: URL of the member's profile picture
          nullable: true
          example: https://examplewebsite.com/users/profile.png
        role:
          type: string
          description: Account role
          nullable: true
          example: admin
        created_at:
          type: string
          description: Date membership was created
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        modified_at:
          type: string
          description: Date membership was modified
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
      additionalProperties: false
    AccountMemberPaginatedList:
      type: object
      properties:
        pagination:
          $ref: '#/components/schemas/Pagination'
        data:
          maxItems: 100
          type: array
          items:
            $ref: '#/components/schemas/AccountMember'
          nullable: true
      additionalProperties: false
    AccountPaginatedList:
      type: object
      properties:
        pagination:
          $ref: '#/components/schemas/Pagination'
        data:
          maxItems: 100
          type: array
          items:
            $ref: '#/components/schemas/Account'
          nullable: true
      additionalProperties: false
    AccountPaginatedQuery:
      type: object
      properties:
        type:
          type: array
          items:
            type: string
          description: Filter by account types
          nullable: true
          example:
            - merchant
        payments_onboarding_status:
          type: array
          items:
            type: string
          description: Filter by account payments onboarding statuses
          nullable: true
          example:
            - verified
        seller_onboarding_status:
          type: array
          items:
            type: string
          description: Filter by account seller onboarding statuses
          nullable: true
          example:
            - verified
        credit_onboarding_status:
          type: array
          items:
            type: string
          description: Filter by account credit onboarding statuses
          nullable: true
          example:
            - verified
        query:
          maxLength: 500
          type: string
          description: Filter by query
          nullable: true
          example: acc_B518niGwGYKzig6vtrRVZGGGV
        page:
          maximum: 2147483647
          minimum: 0
          exclusiveMinimum: true
          type: integer
          description: Page
          format: int32
          nullable: true
          example: 8
        size:
          maximum: 100
          minimum: 0
          exclusiveMinimum: true
          type: integer
          description: Page size
          format: int32
          nullable: true
          example: 20
      additionalProperties: false
    AccountSetting:
      required:
        - type
        - value
      type: object
      properties:
        account_id:
          type: string
          description: Account ID for the contract
          nullable: true
          example: acc_B518niGwGYKzig6vtrRVZGGGV
        description:
          type: string
          description: Account settings type description
          nullable: true
          example: Enable bank account payment methods for ACH transactions for your account.
        name:
          type: string
          description: Account setting type name
          nullable: true
          example: Bank Accounts
        has_requested_access:
          type: boolean
          description: Returns 'true' if merchant has requested access to this account setting type
          example: false
        type:
          minLength: 1
          type: string
          description: Account setting type
          example: payment-methods:bank-accounts
        value:
          maxLength: 100
          minLength: 1
          type: string
          description: Account setting value
          example: 'true'
      additionalProperties: false
    AccountType:
      type: object
      properties:
        value:
          type: string
          description: Account type
          nullable: true
          example: merchant
        name:
          type: string
          description: Account type name
          nullable: true
          example: Merchant
        is_managed:
          type: boolean
          description: Returns 'true' if this account is managed by another account
          example: 'false'
      additionalProperties: false
    Address:
      required:
        - address_line_1
        - city
        - country
        - postal_code
        - state
      type: object
      properties:
        address_line_1:
          maxLength: 50
          minLength: 1
          type: string
          description: Street name
          example: 111 Colorado Ave.
        address_line_2:
          maxLength: 50
          type: string
          description: 'Apt, Suite or PO Box'
          nullable: true
          example: Apt 403
        city:
          maxLength: 100
          minLength: 1
          type: string
          description: City
          example: Des Moines
        state:
          maxLength: 3
          minLength: 2
          type: string
          description: 2 or 3 character ISO state code
          example: IA
        postal_code:
          maxLength: 30
          minLength: 1
          type: string
          description: Postal or zip code
          example: '51111'
        country:
          maxLength: 2
          minLength: 1
          type: string
          description: 2 character ISO country code
          example: US
      additionalProperties: false
    ApiKey:
      required:
        - name
        - permissions
      type: object
      properties:
        id:
          type: string
          description: API key ID
          nullable: true
          example: key_7Ay5mcUXAxwrN6wQEQUVEHBCJ
        account_id:
          type: string
          description: Account ID
          nullable: true
          example: acc_B518niGwGYKzig6vtrRVZGGGV
        environment:
          type: string
          description: Environment - Can be `test` or `production`
          nullable: true
          example: production
        key:
          type: string
          description: API key for performing API requests
          nullable: true
          example: pk_prod_6fpAaGyHBeGNpxTpJKMD5w5wk
        type:
          type: string
          description: 'API key type - Can be `publishable`, `secret` or `restricted`'
          nullable: true
          example: publishable
        created_at:
          type: string
          description: Date API key was created
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        modified_at:
          type: string
          description: Date API key was modified
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        name:
          maxLength: 100
          minLength: 1
          type: string
          description: Name of the API key
          example: Test Application
        permissions:
          minItems: 1
          type: array
          items:
            type: string
          description: List of permissions to assign to the API key
          example:
            - api-key:write
            - business:read
            - business:writer
      additionalProperties: false
    ApiKeyPaginatedList:
      type: object
      properties:
        pagination:
          $ref: '#/components/schemas/Pagination'
        data:
          maxItems: 100
          type: array
          items:
            $ref: '#/components/schemas/ApiKey'
          nullable: true
      additionalProperties: false
    ApiKeyType:
      type: object
      properties:
        value:
          type: string
          description: API key type
          nullable: true
          example: restricted
        name:
          type: string
          description: Name of the API key type
          nullable: true
          example: Restricted
      additionalProperties: false
    BankAccountHolderType:
      type: object
      properties:
        value:
          type: string
          description: Account holder type
          nullable: true
          example: company
        name:
          type: string
          description: Account holder type name
          nullable: true
          example: Company
      additionalProperties: false
    BankAccountStatus:
      type: object
      properties:
        value:
          type: string
          description: Bank account status
          nullable: true
          example: verified
        name:
          type: string
          description: Bank account status name
          nullable: true
          example: Verified
      additionalProperties: false
    BankAccountType:
      type: object
      properties:
        value:
          type: string
          description: Bank account type
          nullable: true
          example: checking
        name:
          type: string
          description: Bank account type name
          nullable: true
          example: Checking
      additionalProperties: false
    BankAccountVerification:
      type: object
      properties:
        bank_account_verification_id:
          type: string
          description: Bank account verification ID
          nullable: true
          example: bav_2b3c4d5e6f7g8h9i0j1k2l3m4
      additionalProperties: false
    BankAccountVerificationIFrame:
      type: object
      properties:
        authorization_url:
          type: string
          description: URL to initiate the bank account verification process
          nullable: true
          example: https://verification.publicsquare.com/?authorizeToken=d65f1adb-8ebc-48dc-be8b-20c773ba1565
      additionalProperties: false
    Business:
      required:
        - business_country
        - business_phone
        - business_type
        - business_website
        - date_of_establishment
        - headquarters_address
        - legal_name
      type: object
      properties:
        id:
          type: string
          description: Business ID
          nullable: true
          example: bus_AEMqSN2tWwKdEDepfRc7eSi51
        account_id:
          type: string
          description: Account ID
          nullable: true
          example: acc_B518niGwGYKzig6vtrRVZGGGV
        government_identifier_last4:
          type: string
          description: Last 4 of the SSN or EIN
          nullable: true
          example: '9642'
        created_at:
          type: string
          description: Date business was created
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        modified_at:
          type: string
          description: Date business was modified
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        legal_name:
          maxLength: 200
          minLength: 1
          type: string
          description: Legal name of the business
          example: 'Test Corporation, LLC'
        doing_business_as:
          maxLength: 200
          type: string
          description: Doing business as (DBA)
          nullable: true
          example: Test DBA
        government_identifier:
          type: string
          description: SSN or EIN of the business
          nullable: true
          example: 48-294876839
        business_country:
          maxLength: 2
          minLength: 1
          type: string
          description: 2 character ISO country code
          example: US
        date_of_establishment:
          type: string
          description: Date of establishment of the business
          format: date-time
          example: '2016-04-07'
        business_website:
          maxLength: 250
          minLength: 1
          type: string
          description: Business website
          example: https://www.testcorporation.com
        business_phone:
          maxLength: 50
          minLength: 4
          type: string
          description: Business phone number
          example: '+15552604982'
        business_email:
          maxLength: 250
          type: string
          description: Business email address
          format: email
          nullable: true
          example: contact@testcorporation.com
        customer_service_phone:
          maxLength: 50
          minLength: 4
          type: string
          description: Customer service phone number
          nullable: true
          example: '+15552601234'
        business_type:
          minLength: 1
          type: string
          description: Business type
          example: company
        business_structure:
          type: string
          description: Business structure
          nullable: true
          example: private_corporation
        business_structure_other:
          maxLength: 100
          type: string
          description: Business structure description if business structure is 'other'
          nullable: true
          example: Custom business structure
        is_firearms_merchant:
          type: boolean
          description: 'Does the business manufacture, distribute, or sell firearms?'
          nullable: true
          example: true
        headquarters_address:
          $ref: '#/components/schemas/Address'
        physical_address:
          $ref: '#/components/schemas/Address'
      additionalProperties: false
    BusinessACHInformation:
      type: object
      properties:
        id:
          type: string
          description: Business ACH information ID
          nullable: true
          example: ach_AEMqSN2tWwKdEDepfRc7eSi51
        account_id:
          type: string
          description: Account ID
          nullable: true
          example: acc_B518niGwGYKzig6vtrRVZGGGV
        created_at:
          type: string
          description: Date ACH information was created
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        modified_at:
          type: string
          description: Date ACH information was modified
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        max_daily_transaction_count:
          type: integer
          description: Maximum number of ACH transactions per day
          format: int32
          nullable: true
          example: 100
        max_monthly_transaction_count:
          type: integer
          description: Maximum number of ACH transactions per month
          format: int32
          nullable: true
          example: 2000
        max_single_transaction_amount:
          type: number
          description: Maximum single ACH transaction amount
          format: double
          nullable: true
          example: 5000
        max_daily_volume_amount:
          type: number
          description: Maximum total ACH volume per day
          format: double
          nullable: true
          example: 25000
        max_monthly_volume_amount:
          type: number
          description: Maximum total ACH volume per month
          format: double
          nullable: true
          example: 500000
        avg_single_transaction_amount:
          type: number
          description: Average single ACH transaction amount
          format: double
          nullable: true
          example: 150
        avg_monthly_volume_amount:
          type: number
          description: Average total ACH volume per month
          format: double
          nullable: true
          example: 125000
        statement_descriptor:
          maxLength: 10
          type: string
          description: Descriptor appearing on customer bank statements (max 10 characters)
          nullable: true
          example: MYSTORE
        debit_payment_percentage:
          type: number
          description: Expected percentage of debit payments (must total 100% with credit_payment_percentage)
          format: double
          nullable: true
          example: 75
        credit_payment_percentage:
          type: number
          description: Expected percentage of credit payments (must total 100% with debit_payment_percentage)
          format: double
          nullable: true
          example: 25
        email_notification_thresholds:
          type: boolean
          description: Receive email notifications for threshold alerts
          example: true
        email_notification_returns:
          type: boolean
          description: Receive email notifications for ACH returns
          example: true
        email_notification_bo_exceptions:
          type: boolean
          description: Receive email notifications for back office exceptions
          example: false
        special_instructions:
          maxLength: 2000
          type: string
          description: Special instructions for ACH processing (max 2000 characters)
          nullable: true
          example: Process all transactions after 2 PM EST
      additionalProperties: false
    BusinessBankAccount:
      type: object
      properties:
        id:
          type: string
          description: Bank account ID
          nullable: true
          example: bba_A4Ud7DxT2mGyj8hEyHx2KSfsp
        account_id:
          type: string
          description: Account ID
          nullable: true
          example: acc_B518niGwGYKzig6vtrRVZGGGV
        account_number_last4:
          type: string
          description: Last 4 digits of the account number
          nullable: true
          example: '1720'
        status:
          type: string
          description: Bank account verification status
          nullable: true
          example: verified
        fingerprint:
          type: string
          description: Fingerprint of the bank account to identify uniqueness
          nullable: true
          example: CC2XvyoohnqecEq4r3FtXv6MdCx4TbaW1UUTdCCN5MNL
        created_at:
          type: string
          description: Date bank account was created
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        modified_at:
          type: string
          description: Date bank account was modified
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        bank_account_verification_id:
          type: string
          description: Bank account verification ID
          nullable: true
          example: bav_2b3c4d5e6f7g8h9i0j1k2l3m4
        account_holder_name:
          type: string
          description: Bank account holder name
          nullable: true
          example: Test Corporation
        account_holder_type:
          type: string
          description: Bank account holder type
          nullable: true
          example: company
        account_type:
          type: string
          description: Bank account type
          nullable: true
          example: checking
        routing_number:
          type: string
          description: Bank routing number
          nullable: true
          example: '110000000'
        account_number:
          type: string
          description: Bank account number
          nullable: true
          example: '196420674034'
      additionalProperties: false
    BusinessCardInformation:
      type: object
      properties:
        id:
          type: string
          description: Business card information ID
          nullable: true
          example: bci_AEMqSN2tWwKdEDepfRc7eSi51
        account_id:
          type: string
          description: Account ID
          nullable: true
          example: acc_B518niGwGYKzig6vtrRVZGGGV
        created_at:
          type: string
          description: Date card information was created
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        modified_at:
          type: string
          description: Date card information was modified
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        amex_opt_out_communications:
          type: boolean
          description: Opt-out of Amex communications
          example: false
        amex_monthly_volume:
          type: number
          description: Monthly Amex transaction volume
          format: double
          nullable: true
          example: 50000
        amex_average_ticket:
          type: number
          description: Average Amex transaction amount
          format: double
          nullable: true
          example: 250
        high_ticket_amount:
          type: number
          description: Highest single transaction amount expected
          format: double
          nullable: true
          example: 10000
        swipe_percentage:
          type: number
          description: Percentage of swipe/chip transactions (must total 100% with ecomm_percentage and keyed_percentage)
          format: double
          nullable: true
          example: 25
        ecomm_percentage:
          type: number
          description: Percentage of e-commerce transactions (must total 100% with swipe_percentage and keyed_percentage)
          format: double
          nullable: true
          example: 65
        keyed_percentage:
          type: number
          description: Percentage of manually keyed transactions (must total 100% with swipe_percentage and ecomm_percentage)
          format: double
          nullable: true
          example: 10
        card_entry_merchant:
          type: boolean
          description: Card information entered by merchant
          example: true
        card_entry_consumer:
          type: boolean
          description: Card information entered by consumer
          example: false
        card_entry_other:
          type: boolean
          description: Card information entered via other method
          example: false
        card_entry_other_description:
          maxLength: 500
          type: string
          description: Description of other card entry method (max 500 characters)
          nullable: true
          example: Third-party payment gateway
        card_entry_via_internet:
          type: boolean
          description: Card information entered via internet
          example: true
        card_entry_ssl_encrypted:
          type: boolean
          description: Internet entry uses SSL encryption or better
          example: true
      additionalProperties: false
    BusinessCreditInformation:
      required:
        - credit_product_line
      type: object
      properties:
        id:
          type: string
          description: Business credit information ID
          nullable: true
          example: bcr_99Lg5YRt2pH17EJktU5HafsTY
        account_id:
          type: string
          description: Account ID
          nullable: true
          example: acc_B518niGwGYKzig6vtrRVZGGGV
        created_at:
          type: string
          description: Date credit information was created
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        modified_at:
          type: string
          description: Date credit information was modified
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        credit_product_line:
          minLength: 1
          type: string
          description: Business Credit Product Line
          example: firearms
      additionalProperties: false
    BusinessDirector:
      required:
        - country_of_residence
        - date_of_birth
        - first_name
        - last_name
        - title
      type: object
      properties:
        id:
          type: string
          description: Business director ID
          nullable: true
          example: dir_9azmvTSrmsavsWEWKMJKgRTYT
        account_id:
          type: string
          description: Account ID
          nullable: true
          example: acc_B518niGwGYKzig6vtrRVZGGGV
        created_at:
          type: string
          description: Date business director was created
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        modified_at:
          type: string
          description: Date business director was modified
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        title:
          maxLength: 100
          minLength: 1
          type: string
          description: Job title
          example: CEO
        first_name:
          maxLength: 100
          minLength: 1
          type: string
          description: First name
          example: John
        last_name:
          maxLength: 100
          minLength: 1
          type: string
          description: Last name
          example: Smith
        date_of_birth:
          type: string
          description: Date of birth
          format: date-time
          example: '1980-11-15'
        country_of_residence:
          maxLength: 2
          minLength: 1
          type: string
          description: 2 character ISO country code
          example: US
      additionalProperties: false
    BusinessDocument:
      type: object
      properties:
        id:
          type: string
          description: Business Document ID
          nullable: true
          example: doc_BK44jiqsyJvWK3xH7pMaPd6qK
        account_id:
          type: string
          description: Account ID
          nullable: true
          example: acc_B518niGwGYKzig6vtrRVZGGGV
        type:
          type: string
          description: Document type
          nullable: true
          example: proof_of_business
        content_type:
          type: string
          description: Document content type
          nullable: true
          example: application/pdf
        opt_out:
          type: boolean
          description: 'If true, the document is not required'
          nullable: true
          example: false
        size:
          type: integer
          description: Size of the document in bytes
          format: int64
          nullable: true
          example: 1048576
        filename:
          type: string
          description: Filename of the document
          nullable: true
          example: sample.pdf
        entity_id:
          type: string
          description: ID of the entity or person the document is associated with
          nullable: true
          example: ent_5mQSxcSAW3UZ4ijLzEt4RuAib
        entity_type:
          type: string
          description: Type or role of entity the document is associated with
          nullable: true
          example: business_representative
        created_at:
          type: string
          description: Date document was created
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        modified_at:
          type: string
          description: Date document was modified
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
      additionalProperties: false
    BusinessDocumentType:
      type: object
      properties:
        value:
          type: string
          description: Business document type
          nullable: true
          example: articles_of_incorporation
        name:
          type: string
          description: Business document type name
          nullable: true
          example: Articles of incorporation
        description:
          type: string
          description: Business document type description
          nullable: true
          example: Government issued document showing proof of business or articles of incorporation
        additional_information:
          type: string
          description: Additional information for this document type
          nullable: true
          example: 'Please provide as much as you have available. Note: Limited data may lengthen the underwriting and approval process'
        opt_out_description:
          type: string
          description: Description of how to opt out of this document type
          nullable: true
          example: I confirm that my state does not require me to provide this document
        can_opt_out:
          type: boolean
          description: Whether the user can opt out of this document type
          example: true
        max_allowed_files:
          type: integer
          description: Maximum number of files allowed for this document type
          format: int32
        document_url:
          type: string
          description: Url to download the document type
          nullable: true
          example: https://www.irs.gov/pub/irs-pdf/fw9.pdf
      additionalProperties: false
    BusinessFulfillmentInformation:
      type: object
      properties:
        id:
          type: string
          description: Business fulfillment information ID
          nullable: true
          example: bfi_AEMqSN2tWwKdEDepfRc7eSi51
        account_id:
          type: string
          description: Account ID
          nullable: true
          example: acc_B518niGwGYKzig6vtrRVZGGGV
        created_at:
          type: string
          description: Date fulfillment information was created
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        modified_at:
          type: string
          description: Date fulfillment information was modified
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        days_until_fulfillment:
          $ref: '#/components/schemas/DaysUntilFulfillmentValues'
        card_charged_timing:
          $ref: '#/components/schemas/CardChargedTimingValues'
        card_charged_timing_other_explanation:
          maxLength: 500
          type: string
          description: Explanation if card_charged_timing is 'other' (max 500 characters)
          nullable: true
          example: Cards charged upon shipment confirmation
        fulfillment_requires_deposit:
          type: boolean
          description: Whether fulfillment requires a deposit
          nullable: true
          example: false
        fulfillment_deposit_percent_of_sale:
          type: number
          description: Deposit as percentage of sale (0-100)
          format: double
          nullable: true
          example: 25
        fulfillment_deposit_flat_fee:
          type: number
          description: Deposit as flat fee amount
          format: double
          nullable: true
          example: 50
        final_payment_due_before_fulfillment:
          type: boolean
          description: Whether final payment is due before fulfillment
          nullable: true
          example: true
        final_payment_due_days_before_final_delivery:
          type: integer
          description: Days before delivery that final payment is due
          format: int32
          nullable: true
          example: 7
        offers_guarantee_or_warranty:
          type: boolean
          description: Whether business offers guarantee or warranty
          nullable: true
          example: true
        guarantee_type_replacement:
          type: boolean
          description: Offers replacement guarantee
          example: true
        guarantee_type_refund:
          type: boolean
          description: Offers full refund guarantee
          example: false
        guarantee_type_partial_refund:
          type: boolean
          description: Offers partial refund guarantee
          example: false
        refund_policy_days:
          $ref: '#/components/schemas/RefundPolicyDaysValues'
        offers_recurring_billing:
          type: boolean
          description: Whether business offers recurring billing
          nullable: true
          example: true
        recurring_billing_weekly:
          type: boolean
          description: Offers weekly recurring billing
          example: false
        recurring_billing_monthly:
          type: boolean
          description: Offers monthly recurring billing
          example: true
        recurring_billing_quarterly:
          type: boolean
          description: Offers quarterly recurring billing
          example: false
        recurring_billing_annually:
          type: boolean
          description: Offers annual recurring billing
          example: false
        recurring_billing_other:
          type: boolean
          description: Offers other recurring billing frequency
          example: false
        recurring_billing_other_explanation:
          maxLength: 500
          type: string
          description: Explanation of other recurring billing frequency (max 500 characters)
          nullable: true
          example: Bi-weekly billing available
        delivery_percentage_immediate:
          type: number
          description: Percentage of deliveries that are immediate (must total 100% across all delivery percentages)
          format: double
          nullable: true
          example: 10
        delivery_percentage_1to7_days:
          type: number
          description: Percentage of deliveries within 1-7 days (must total 100% across all delivery percentages)
          format: double
          nullable: true
          example: 50
        delivery_percentage_8to14_days:
          type: number
          description: Percentage of deliveries within 8-14 days (must total 100% across all delivery percentages)
          format: double
          nullable: true
          example: 30
        delivery_percentage_15to30_days:
          type: number
          description: Percentage of deliveries within 15-30 days (must total 100% across all delivery percentages)
          format: double
          nullable: true
          example: 10
        delivery_percentage_over30_days:
          type: number
          description: Percentage of deliveries over 30 days (must total 100% across all delivery percentages)
          format: double
          nullable: true
          example: 0
      additionalProperties: false
    BusinessIndustry:
      type: object
      properties:
        value:
          type: string
          description: Business industry
          nullable: true
          example: attorneys_lawyers
        name:
          type: string
          description: Business industry name
          nullable: true
          example: Attorneys and lawyers
        supported:
          type: boolean
          description: Flag if the business industry is supported
          example: true
      additionalProperties: false
    BusinessIndustryGroup:
      type: object
      properties:
        value:
          type: string
          description: Business industry group
          nullable: true
          example: retail
        name:
          type: string
          description: Business industry group name
          nullable: true
          example: Retail
        industries:
          type: array
          items:
            $ref: '#/components/schemas/BusinessIndustry'
          description: List of business industries for the group
          nullable: true
      additionalProperties: false
    BusinessRepresentative:
      required:
        - address
        - date_of_birth
        - email
        - first_name
        - is_politically_exposed_person
        - last_name
        - nationality
        - phone
        - title
      type: object
      properties:
        id:
          type: string
          description: Business representative ID
          nullable: true
          example: rep_5Pd4sfunq4U43Y9DASNNNg4uQ
        account_id:
          type: string
          description: Account ID
          nullable: true
          example: acc_B518niGwGYKzig6vtrRVZGGGV
        government_identifier_last4:
          type: string
          description: Last 4 of SSN or personal identifier
          nullable: true
          example: '8024'
        created_at:
          type: string
          description: Date representative was created
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        modified_at:
          type: string
          description: Date representative was modified
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        title:
          maxLength: 100
          minLength: 1
          type: string
          description: Job title
          example: CEO
        first_name:
          maxLength: 100
          minLength: 1
          type: string
          description: First name
          example: John
        last_name:
          maxLength: 100
          minLength: 1
          type: string
          description: Last name
          example: Smith
        nationality:
          maxLength: 2
          minLength: 1
          type: string
          description: 2 character ISO country code
          example: US
        government_identifier:
          type: string
          description: SSN or personal identifier
          nullable: true
          example: 483-97-8024
        email:
          maxLength: 250
          minLength: 1
          type: string
          description: Email address
          format: email
          example: john.smith@email.com
        phone:
          maxLength: 50
          minLength: 4
          type: string
          description: Phone number
          example: '+15554879043'
        date_of_birth:
          type: string
          description: Date of birth
          format: date-time
          example: '1980-11-15'
        is_politically_exposed_person:
          type: boolean
          description: Are they a politically exposed person?
          example: false
        address:
          $ref: '#/components/schemas/Address'
      additionalProperties: false
    BusinessShareholder:
      required:
        - company
        - establishment_date
      type: object
      properties:
        id:
          type: string
          description: Business shareholder ID
          nullable: true
          example: bsh_5frrpJv6vQ2LFvZTivvroHdfU
        account_id:
          type: string
          description: Account ID
          nullable: true
          example: acc_B518niGwGYKzig6vtrRVZGGGV
        created_at:
          type: string
          description: Date business shareholder was created
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        modified_at:
          type: string
          description: Date business shareholder was modified
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        company:
          maxLength: 200
          minLength: 1
          type: string
          description: Company name
          example: Berkshire Hathaway
        establishment_date:
          type: string
          description: Date of establishment
          format: date-time
          example: '1941-10-03'
      additionalProperties: false
    BusinessStructure:
      type: object
      properties:
        value:
          type: string
          description: Business structure
          nullable: true
          example: private_corporation
        name:
          type: string
          description: Business structure name
          nullable: true
          example: Private corporation
      additionalProperties: false
    BusinessTaxInformation:
      required:
        - annual_volume
        - average_transaction_amount
        - business_industry
        - ecommerce_annual_volume
        - instore_annual_volume
        - product_description
      type: object
      properties:
        id:
          type: string
          description: Business tax information ID
          nullable: true
          example: btx_99Lg5YRt2pH17EJktU5HafsTY
        account_id:
          type: string
          description: Account ID
          nullable: true
          example: acc_B518niGwGYKzig6vtrRVZGGGV
        created_at:
          type: string
          description: Date tax information was created
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        modified_at:
          type: string
          description: Date tax information was modified
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        product_description:
          maxLength: 200
          minLength: 1
          type: string
          description: Description of product or services
          example: Sell clothing and accessories
        business_industry:
          minLength: 1
          type: string
          description: Business industry
          example: computer_repair
        annual_volume:
          type: integer
          description: Annual transaction volume
          format: int32
          example: 1200000
        ecommerce_annual_volume:
          type: integer
          description: Annual ecommerce transaction volume
          format: int32
          example: 800000
        instore_annual_volume:
          type: integer
          description: Annual in-store transaction volume
          format: int32
          example: 400000
        average_transaction_amount:
          type: integer
          description: Average transaction amount
          format: int32
          example: 1500
        has_processed_transactions:
          type: boolean
          description: 'Has your company done any business, or processed any transactions before?'
          nullable: true
          example: false
      additionalProperties: false
    BusinessType:
      type: object
      properties:
        value:
          type: string
          description: Business type
          nullable: true
          example: company
        name:
          type: string
          description: Business type name
          nullable: true
          example: Company
      additionalProperties: false
    CardChargedTimingValues:
      enum:
        - DateOfOrder
        - DateOfShipment
        - DateOfDelivery
        - Other
      type: string
    Contract:
      type: object
      properties:
        id:
          type: string
          description: Contract ID
          nullable: true
          example: doc_BK44jiqsyJvWK3xH7pMaPd6qK
        account_id:
          type: string
          description: Account ID
          nullable: true
          example: acc_B518niGwGYKzig6vtrRVZGGGV
        product:
          type: string
          description: Product
          nullable: true
          example: payments
        status:
          type: string
          description: Contract status
          nullable: true
          example: signed
        recipient_name:
          type: string
          description: Recipient name of digital contract
          nullable: true
          example: John Smith
        recipient_email:
          type: string
          description: Recipient email of digital contract
          nullable: true
          example: john.smith@email.com
        recipient_url:
          type: string
          description: Contract URL for reviewing and signing of contract
          nullable: true
          example: https://contractsigningurl.com/
        created_at:
          type: string
          description: Date contract was created
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        modified_at:
          type: string
          description: Date contract was modified
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
      additionalProperties: false
    Country:
      type: object
      properties:
        value:
          type: string
          description: 2 character ISO country code
          nullable: true
          example: US
        name:
          type: string
          description: Country name
          nullable: true
          example: United States of America
      additionalProperties: false
    CreateAccountInvitationRequest:
      required:
        - email
      type: object
      properties:
        email:
          maxLength: 250
          minLength: 1
          type: string
          description: Email address of user being invited to the account
          format: email
          example: john.smith@example.com
        role:
          maxLength: 50
          type: string
          description: Role to be assigned when the invitation is accepted
          nullable: true
          example: admin
      additionalProperties: false
    CreateContractRequest:
      required:
        - product
      type: object
      properties:
        product:
          maxLength: 50
          minLength: 1
          type: string
          description: Product for the contract
          example: payments
        recipient_name:
          maxLength: 250
          type: string
          description: Name of the contract recipient
          nullable: true
          example: John Smith
        recipient_email:
          maxLength: 250
          type: string
          description: Email address of the contract recipient
          format: email
          nullable: true
          example: john.smith@email.com
      additionalProperties: false
    CreateManagedAccountRequest:
      required:
        - account_details
        - business_details
        - product
      type: object
      properties:
        account_details:
          $ref: '#/components/schemas/SaveAccountRequest'
        product:
          minLength: 1
          type: string
          example: payments
        business_details:
          $ref: '#/components/schemas/SaveManagedAccountBusinessRequest'
      additionalProperties: false
    CreditProductLine:
      type: object
      properties:
        value:
          type: string
          description: Credit product line
          nullable: true
          example: firearms
        name:
          type: string
          description: Credit product line name
          nullable: true
          example: Firearms
      additionalProperties: false
    Customer:
      required:
        - address
      type: object
      properties:
        id:
          type: string
          description: Customer ID
          nullable: true
          example: cus_7Ay5mcUXAxwrN6wQEQUVEHBCJ
        account_id:
          type: string
          description: Account ID
          nullable: true
          example: acc_B518niGwGYKzig6vtrRVZGGGV
        environment:
          type: string
          description: Environment - Can be `test` or `production`
          nullable: true
          example: production
        government_identifier_last4:
          type: string
          description: Last 4 of the SSN or EIN
          nullable: true
          example: '9642'
        created_at:
          type: string
          description: Date customer was created
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        modified_at:
          type: string
          description: Date customer was modified
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        external_id:
          maxLength: 100
          type: string
          description: Customer ID in merchant's system
          nullable: true
          example: e797ef3c-b586-4333-af90-7168d8427d85
        business_name:
          maxLength: 200
          type: string
          description: Name of the business if business customer type
          nullable: true
          example: 'Awesome Company, LLC'
        first_name:
          maxLength: 100
          type: string
          description: First name of the person if person customer type
          nullable: true
          example: John
        last_name:
          maxLength: 100
          type: string
          description: Last name of the person if person customer type
          nullable: true
          example: Smith
        government_identifier:
          type: string
          description: SSN or EIN of the customer
          nullable: true
          example: 48-294876839
        email:
          maxLength: 250
          type: string
          description: Email address
          format: email
          nullable: true
          example: john.smith@email.com
        phone:
          maxLength: 50
          minLength: 4
          type: string
          description: Phone number
          nullable: true
          example: '+15554829347'
        address:
          $ref: '#/components/schemas/Address'
        shipping_address:
          $ref: '#/components/schemas/Address'
      additionalProperties: false
    CustomerPaginatedList:
      type: object
      properties:
        pagination:
          $ref: '#/components/schemas/Pagination'
        data:
          maxItems: 100
          type: array
          items:
            $ref: '#/components/schemas/Customer'
          nullable: true
      additionalProperties: false
    DaysUntilFulfillmentValues:
      enum:
        - SameDay
        - OneToFive
        - SixToFifteen
        - SixteenToThirty
        - OverThirty
      type: string
    DocumentRequirement:
      type: object
      properties:
        document_id:
          type: string
          description: Document ID
          nullable: true
        document_filename:
          type: string
          description: Filename of the document
          nullable: true
          example: sample.pdf
        document_type:
          $ref: '#/components/schemas/BusinessDocumentType'
        status:
          type: string
          description: Status of the contract review
          nullable: true
          example: complete
        entity_id:
          type: string
          description: ID of the entity or person the document is associated with
          nullable: true
          example: rep_5mQSxcSAW3UZ4ijLzEt4RuAib
        entity_type:
          type: string
          description: Type or role of entity the document is associated with
          nullable: true
          example: business_representative
      additionalProperties: false
    Event:
      type: object
      properties:
        id:
          type: string
          description: Event ID
          nullable: true
          example: evnt_5jxWRFNLCAWeegrkCAG3a9DGc
        account_id:
          type: string
          description: Account ID
          nullable: true
          example: acc_B518niGwGYKzig6vtrRVZGGGV
        environment:
          type: string
          description: Environment - Can be `test` or `production`
          nullable: true
          example: production
        event_type:
          type: string
          description: Event type
          nullable: true
          example: connection:update
        entity_type:
          type: string
          description: Entity type of the event
          nullable: true
          example: connection
        entity_id:
          type: string
          description: Entity ID of the event
          nullable: true
          example: conn_73t7igFxDZvN9hypi7yoPwbxy
        entity:
          description: Current entity value of the event
          nullable: true
        created_at:
          type: string
          description: Date event was created
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
      additionalProperties: false
    EventPaginatedList:
      type: object
      properties:
        pagination:
          $ref: '#/components/schemas/Pagination'
        data:
          maxItems: 100
          type: array
          items:
            $ref: '#/components/schemas/Event'
          nullable: true
      additionalProperties: false
    EventType:
      type: object
      properties:
        type:
          type: string
          description: Event type
          nullable: true
          example: merchant-onboarding:update
        description:
          type: string
          description: Event type description
          nullable: true
          example: Merchant onboarding status has changed.
      additionalProperties: false
    FirearmsQuestionnaire:
      required:
        - are_background_checks_performed
        - are_customers_identified
        - has_buyer_complete_atf_form_33104
        - has_buyer_complete_atf_form_4473
        - has_federal_firearms_license
        - has_nfa_registration
        - has_sales_only_to_non_prohibited_person
        - shipping_policies
      type: object
      properties:
        id:
          type: string
          description: Business representative ID
          nullable: true
          example: frq_2eaN9wk5jaLJKCXKpBJYQJ6sB
        account_id:
          type: string
          description: Account ID
          nullable: true
          example: acc_B518niGwGYKzig6vtrRVZGGGV
        created_at:
          type: string
          description: Date firearms questionnaire was created
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        modified_at:
          type: string
          description: Date firearms questionnaire was modified
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        products_sold:
          type: string
          description: 'List of products sold by merchant (i.e. Firearms (in accordance with ATF definition), firearms parts, accessories, ammunition, explosives).'
          nullable: true
          example: Weapons and munitions
          deprecated: true
        states_shipped:
          type: string
          description: List all states that merchant ships to.
          nullable: true
          example: 'TX, IA, and AL'
          deprecated: true
        has_federal_firearms_license:
          minLength: 1
          type: string
          description: 'Merchant has an active and good-standing FFL license: ''yes'', ''no'', or ''not_applicable'''
          example: yes
        federal_firearms_license:
          type: string
          description: Federal firearms license
          nullable: true
          example: 1-22-333-44-5X-66666
        has_federal_firearms_license_adverse_actions:
          type: string
          description: 'Has Merchant or any principal of company had adverse action taken against an FFL license (i.e. revocation, willful violations, etc)? ''yes'' or ''no'''
          nullable: true
          example: no
          deprecated: true
        federal_firearms_license_adverse_actions_reason:
          type: string
          description: Description of adverse actions taken against FFL license
          nullable: true
          example: None
          deprecated: true
        has_export_controls:
          type: string
          description: 'Merchant has controls in place to block/prohibit transactions & shipment outside of the United States: ''yes'' or ''no'''
          nullable: true
          example: yes
          deprecated: true
        routing_controls:
          type: string
          description: 'What controls does merchant have in place to ensure proper MCC coding and routing in accordance with state law? If not applicable, state ‘N/A’.'
          nullable: true
          example: N/A
          deprecated: true
        has_nfa_registration:
          minLength: 1
          type: string
          description: 'Merchant has obtained NFA registration and registered inventory with the Bureau of Alcohol, Tobacco, Firearms and Explosives (ATF): ''yes'', ''no'', or ''not_applicable'''
          example: yes
        are_customers_identified:
          minLength: 1
          type: string
          description: 'Customers are identified via government issued identification: ''yes'', ''no'', or ''not_applicable'''
          example: yes
        customers_identified_not_applicable_reason:
          type: string
          description: Reason why customer identification is not applicable
          nullable: true
          example: Not required by state law
          deprecated: true
        are_background_checks_performed:
          minLength: 1
          type: string
          description: 'Background checks are performed on all customers via NICS or state point of contact: ''yes'', ''no'', or ''not_applicable'''
          example: yes
        background_checks_performed_not_applicable_reason:
          type: string
          description: Reason why customer background checks are not applicable
          nullable: true
          example: Not required by state law
          deprecated: true
        has_sales_only_to_non_prohibited_person:
          minLength: 1
          type: string
          description: 'Gun sales are only completed if the buyer is not a prohibited person: ''yes'', ''no'', or ''not_applicable'''
          example: yes
        has_buyer_complete_atf_form_4473:
          minLength: 1
          type: string
          description: 'The prospective buyer must complete and ATF Form 4473 (Firearms Transaction Record): ''yes'', ''no'', or ''not_applicable'''
          example: yes
        atf_form_4473_retention_period:
          type: string
          description: 'If yes, completed ATF Forms 4473 are retained by the dealer for a period of.'
          nullable: true
          example: 3 years
        has_buyer_complete_atf_form_33104:
          minLength: 1
          type: string
          description: 'The prospective buyer will complete Form 3310.4 (Report of Multiple Sale or Other Disposition of Pistols and Revolvers) if they are an unlicensed person purchasing or acquiring two or more handguns at one time or during five consecutive business days: ''yes'', ''no'', or ''not_applicable'''
          example: yes
        atf_form_33104_retention_period:
          type: string
          description: 'If yes, completed Form 3310.4 are retained by the dealer for a period of'
          nullable: true
          example: 1 year
        shipment_controls:
          type: string
          description: 'What controls are in place to ensure proper shipment of firearms in accordance with Federal law (i.e. shipping only to licensed FFL, completing Form 1508 to ship via UPS, USPS, or Fedex, etc). It not applicable, state ‘N/A’.'
          nullable: true
          example: Form 1508 with USPS
          deprecated: true
        shipping_policies:
          minLength: 1
          type: string
          description: 'What are your policies and procedures for shipping a firearm (who does the shipping, proof of delivery, shipping to dealers)?'
          example: 'Confirm the receiving dealer or gunsmith is licensed. '
        other_shipping_policy:
          type: string
          description: 'If ''Other'' was selected for shipping policies, please describe.'
          nullable: true
          example: Not required by state law
      additionalProperties: false
    GetApiKeysRequest:
      type: object
      properties:
        type:
          type: array
          items:
            type: string
          description: List of API key types to filter by
          nullable: true
          example:
            - secret
        page:
          maximum: 2147483647
          minimum: 0
          exclusiveMinimum: true
          type: integer
          description: Page
          format: int32
          nullable: true
          example: 8
        size:
          maximum: 100
          minimum: 0
          exclusiveMinimum: true
          type: integer
          description: Page size
          format: int32
          nullable: true
          example: 20
      additionalProperties: false
    GetCustomersRequest:
      type: object
      properties:
        query:
          maxLength: 500
          type: string
          description: Filter by query
          nullable: true
          example: John Doe
        page:
          maximum: 2147483647
          minimum: 0
          exclusiveMinimum: true
          type: integer
          description: Page
          format: int32
          nullable: true
          example: 8
        size:
          maximum: 100
          minimum: 0
          exclusiveMinimum: true
          type: integer
          description: Page size
          format: int32
          nullable: true
          example: 20
      additionalProperties: false
    GetEventsRequest:
      type: object
      properties:
        start_dt:
          type: string
          description: Inclusive start date to filter records by
          nullable: true
          example: '2024-05-30T12:14:56'
        end_dt:
          type: string
          description: Exclusive end date to filter records by
          nullable: true
          example: '2024-06-04T18:22:41'
        event_type:
          type: array
          items:
            type: string
          description: List of event types to filter by
          nullable: true
          example:
            - connection:update
        query:
          maxLength: 500
          type: string
          description: Filter by query
          nullable: true
          example: pmt_2YKewBonG4tgk12MheY3PiHDy
        page:
          maximum: 2147483647
          minimum: 0
          exclusiveMinimum: true
          type: integer
          description: Page
          format: int32
          nullable: true
          example: 8
        size:
          maximum: 100
          minimum: 0
          exclusiveMinimum: true
          type: integer
          description: Page size
          format: int32
          nullable: true
          example: 20
      additionalProperties: false
    GetWebhookEventsRequest:
      type: object
      properties:
        status:
          type: array
          items:
            type: string
          description: List of statuses to filter by
          nullable: true
          example:
            - delivered
            - failed
        start_dt:
          type: string
          description: Inclusive start date to filter records by
          nullable: true
          example: '2024-05-30T12:14:56'
        end_dt:
          type: string
          description: Exclusive end date to filter records by
          nullable: true
          example: '2024-06-04T18:22:41'
        event_type:
          type: array
          items:
            type: string
          description: List of event types to filter by
          nullable: true
          example:
            - connection:update
        query:
          maxLength: 500
          type: string
          description: Filter by query
          nullable: true
          example: pmt_2YKewBonG4tgk12MheY3PiHDy
        page:
          maximum: 2147483647
          minimum: 0
          exclusiveMinimum: true
          type: integer
          description: Page
          format: int32
          nullable: true
          example: 8
        size:
          maximum: 100
          minimum: 0
          exclusiveMinimum: true
          type: integer
          description: Page size
          format: int32
          nullable: true
          example: 20
      additionalProperties: false
    HoldingAccount:
      required:
        - merchant_id
        - processor
        - types
      type: object
      properties:
        id:
          type: string
          description: Holding account ID
          nullable: true
          example: hld_2YKewBonG4tgk12MheY3PiHDy
        account_id:
          type: string
          description: Account ID
          nullable: true
          example: acc_B518niGwGYKzig6vtrRVZGGGV
        environment:
          type: string
          description: Environment - Can be `test` or `production`
          nullable: true
          example: production
        check_commerce_password_set:
          type: boolean
          description: Whether a Check Commerce password is set for this holding account
        merchant_id:
          maxLength: 100
          minLength: 1
          type: string
          description: Merchant Account ID in external system
          example: '12345768'
        processor:
          maxLength: 100
          minLength: 1
          type: string
          description: Name of the processor
        types:
          minItems: 1
          type: array
          items:
            type: string
          description: 'Types of holding account. Can be `ach_debit`, `ach_credit`, `card_credit`, `card_debit`, `seller`.'
          example:
            - ach_debit
            - ach_credit
        check_commerce_username:
          type: string
          description: Check Commerce username for this holding account
          nullable: true
        check_commerce_password:
          type: string
          description: Check Commerce password for this holding account
          nullable: true
      additionalProperties: false
    HoldingAccountPaginatedList:
      type: object
      properties:
        pagination:
          $ref: '#/components/schemas/Pagination'
        data:
          maxItems: 100
          type: array
          items:
            $ref: '#/components/schemas/HoldingAccount'
          nullable: true
      additionalProperties: false
    HoldingAccountsQuery:
      type: object
      properties:
        type:
          maxLength: 50
          type: string
          description: Holding account type
          nullable: true
          example: 8
        processor:
          maxLength: 50
          type: string
          description: Processor name
          nullable: true
        page:
          maximum: 2147483647
          minimum: 0
          exclusiveMinimum: true
          type: integer
          description: Page
          format: int32
          nullable: true
          example: 8
        size:
          maximum: 100
          minimum: 0
          exclusiveMinimum: true
          type: integer
          description: Page size
          format: int32
          nullable: true
          example: 20
      additionalProperties: false
    ManagedAccountPaginatedQuery:
      type: object
      properties:
        start_dt:
          type: string
          description: Inclusive start date to filter records by
          nullable: true
          example: '2024-05-30T12:14:56'
        end_dt:
          type: string
          description: Exclusive end date to filter records by
          nullable: true
          example: '2024-06-04T18:22:41'
        type:
          type: array
          items:
            type: string
          description: Filter by account types
          nullable: true
          example:
            - merchant
        payments_onboarding_status:
          type: array
          items:
            type: string
          description: Filter by account payments onboarding statuses
          nullable: true
          example:
            - verified
        seller_onboarding_status:
          type: array
          items:
            type: string
          description: Filter by account seller onboarding statuses
          nullable: true
          example:
            - verified
        credit_onboarding_status:
          type: array
          items:
            type: string
          description: Filter by account credit onboarding statuses
          nullable: true
          example:
            - verified
        query:
          maxLength: 500
          type: string
          description: Filter by query
          nullable: true
          example: acc_B518niGwGYKzig6vtrRVZGGGV
        page:
          maximum: 2147483647
          minimum: 0
          exclusiveMinimum: true
          type: integer
          description: Page
          format: int32
          nullable: true
          example: 8
        size:
          maximum: 100
          minimum: 0
          exclusiveMinimum: true
          type: integer
          description: Page size
          format: int32
          nullable: true
          example: 20
      additionalProperties: false
    OnboardReview:
      type: object
      properties:
        account_id:
          type: string
          description: Account ID
          nullable: true
          example: acc_B518niGwGYKzig6vtrRVZGGGV
        product:
          type: string
          description: Product
          nullable: true
          example: payments
        onboarding_status:
          type: string
          description: Onboarding status of the account
          nullable: true
          example: verified
        contract_status:
          type: string
          description: Contract status
          nullable: true
          example: completed
        step_requirements:
          type: array
          items:
            $ref: '#/components/schemas/StepRequirement'
          description: Step requirements and their completion status
          nullable: true
        document_requirements:
          type: array
          items:
            $ref: '#/components/schemas/DocumentRequirement'
          description: Document requirements and their completion status
          nullable: true
          readOnly: true
      additionalProperties: false
    OnboardingInvitation:
      required:
        - product
      type: object
      properties:
        id:
          type: string
          description: Onboarding Invitation ID
          nullable: true
          example: invt_9Nq6jXLMKYN1m77JpN9NNra6Q
        account_id:
          type: string
          description: Account ID
          nullable: true
          example: acc_B518niGwGYKzig6vtrRVZGGGV
        invitation_url:
          type: string
          description: Invitation URL of where to forward the user to complete onboarding
          nullable: true
          example: https://portal.publicsquare.com/onboarding/acc_B518niGwGYKzig6vtrRVZGGGV/invitations/invt_9Nq6jXLMKYN1m77JpN9NNra6Q
        expires_at:
          type: string
          description: Date invitation expires
          format: date-time
          nullable: true
          example: '2024-07-03T01:02:29.212Z'
        created_at:
          type: string
          description: Date invitation was created
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        modified_at:
          type: string
          description: Date invitation was modified
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        product:
          type: string
          description: Product
          example: seller
        return_url:
          type: string
          description: 'Return URL to redirect after onboarding is completed. `onboarding_status`, `product_type` and `account_id` will be returned as query string parameters'
          nullable: true
          example: https://example.com/onboarding/result
        terms_of_service:
          type: string
          description: Terms of service to display during onboarding which must be accepted by the end user
          nullable: true
          example: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin sit amet massa nec leo euismod.'
        settings:
          $ref: '#/components/schemas/OnboardingInvitationSettings'
        theme:
          $ref: '#/components/schemas/OnboardingInvitationTheme'
      additionalProperties: false
    OnboardingInvitationPaginatedList:
      type: object
      properties:
        pagination:
          $ref: '#/components/schemas/Pagination'
        data:
          maxItems: 100
          type: array
          items:
            $ref: '#/components/schemas/OnboardingInvitation'
          nullable: true
      additionalProperties: false
    OnboardingInvitationSettings:
      type: object
      properties:
        representative_is_ultimate_beneficial_owner:
          type: boolean
          description: Automatically assign the business representative as the ultimate beneficial owner. This will hide the ultimate beneficial owner step
          example: true
      additionalProperties: false
    OnboardingInvitationTheme:
      type: object
      properties:
        logo:
          $ref: '#/components/schemas/OnboardingInvitationThemeLogo'
      additionalProperties: false
    OnboardingInvitationThemeLogo:
      type: object
      properties:
        content:
          type: string
          description: Base64 data URI of the logo image
          nullable: true
          example: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAC0CAYAAAA9zQYyAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzA'
        width:
          type: integer
          description: Width in pixels of the logo image
          format: int32
          nullable: true
          example: 340
        height:
          type: integer
          description: Height in pixels of the logo image
          format: int32
          nullable: true
          example: 100
      additionalProperties: false
    PaginatedQuery:
      type: object
      properties:
        page:
          maximum: 2147483647
          minimum: 0
          exclusiveMinimum: true
          type: integer
          description: Page
          format: int32
          nullable: true
          example: 8
        size:
          maximum: 100
          minimum: 0
          exclusiveMinimum: true
          type: integer
          description: Page size
          format: int32
          nullable: true
          example: 20
      additionalProperties: false
    Pagination:
      type: object
      properties:
        total_items:
          type: integer
          description: Total number of records
          format: int32
          nullable: true
          example: 1020
        page_number:
          type: integer
          description: Current page number
          format: int32
          nullable: true
          example: 23
        page_size:
          type: integer
          description: Page size
          format: int32
          example: 20
        total_pages:
          type: integer
          description: Total number of pages
          format: int32
          nullable: true
          example: 51
      additionalProperties: false
    Permission:
      type: object
      properties:
        type:
          type: string
          description: Permission type
          nullable: true
          example: business:write
        description:
          type: string
          description: Permission description
          nullable: true
          example: Save business information
      additionalProperties: false
    PharmaceuticalQuestionnaire:
      required:
        - business_operating_states
        - buyer_validation_methods
        - dea_registration_number
        - delivery_methods
        - sales_channels
        - sales_methods
        - shipping_states
        - terms_and_conditions_url
      type: object
      properties:
        id:
          type: string
          description: Pharmaceutical questionnaire ID
          nullable: true
          example: phq_2eaN9wk5jaLJKCXKpBJYQJ6sB
        account_id:
          type: string
          description: Account ID
          nullable: true
          example: acc_B518niGwGYKzig6vtrRVZGGGV
        created_at:
          type: string
          description: Date pharmaceutical questionnaire was created
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        modified_at:
          type: string
          description: Date pharmaceutical questionnaire was modified
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        dea_registration_number:
          maxLength: 50
          minLength: 1
          type: string
          description: DEA registration number (required for pharma MCC). Reply NA if not applicable.
          example: AB1234567
        sales_channels:
          minItems: 1
          type: array
          items:
            minLength: 1
            type: string
          description: 'Sales channels: ''online'', ''in_person'', ''hybrid''. Can specify multiple values.'
          example: '[''online'', ''hybrid'']'
        buyer_validation_methods:
          maxLength: 500
          minLength: 1
          type: string
          description: Methods used to validate buyers
          example: Government ID verification and background checks
        business_operating_states:
          minItems: 1
          type: array
          items:
            maxLength: 10
            minLength: 1
            type: string
          description: 'State codes where business operates (e.g., [''CA'', ''NY'', ''TX''])'
          example: '[''CA'', ''NY'', ''TX'']'
        shipping_states:
          minItems: 1
          type: array
          items:
            type: string
          description: 'State codes  where products are shipped (e.g., [''CA'', ''NY'', ''TX''])'
          example: '[''CA'', ''NY'', ''TX'']'
        terms_and_conditions_url:
          maxLength: 2048
          minLength: 1
          type: string
          description: URL to terms and conditions
          example: https://example.com/terms
        sales_methods:
          minItems: 1
          type: array
          items:
            minLength: 1
            type: string
          description: 'Sales methods: ''b2b'', ''invoicing_with_shipping'', ''local_pickup''. Can specify multiple values.'
          example: '[''b2b'', ''invoicing_with_shipping'']'
        delivery_methods:
          minItems: 1
          type: array
          items:
            minLength: 1
            type: string
          description: 'Delivery methods: ''overnight_shipping'', ''hazardous_materials_ground_only''. Can specify multiple values.'
          example: '[''overnight_shipping'']'
      additionalProperties: false
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: { }
    Product:
      type: object
      properties:
        value:
          type: string
          description: Product
          nullable: true
          example: payments
        name:
          type: string
          description: Product name
          nullable: true
          example: Payments
      additionalProperties: false
    RefundPolicyDaysValues:
      enum:
        - UpToThirty
        - ThirtyOneToNinety
        - OverNinety
        - NoRefunds
      type: string
    RequestAccountSettingAccessRequest:
      required:
        - type
      type: object
      properties:
        type:
          minLength: 1
          type: string
          description: Account setting type
          example: payment-methods:bank-accounts
      additionalProperties: false
    Role:
      type: object
      properties:
        value:
          type: string
          description: Account Role
          nullable: true
          example: owner
        name:
          type: string
          description: Account Role
          nullable: true
          example: Owner
      additionalProperties: false
    SaveAccountMemberRequest:
      required:
        - role
      type: object
      properties:
        role:
          maxLength: 50
          minLength: 1
          type: string
          description: Account role
          example: admin
      additionalProperties: false
    SaveAccountRequest:
      required:
        - name
        - type
      type: object
      properties:
        name:
          maxLength: 200
          minLength: 1
          type: string
          description: Name of the account
          example: 'Test Company, LLC'
        type:
          minLength: 1
          type: string
          description: Type of the account
          example: merchant
      additionalProperties: false
    SaveApiKeyRequest:
      required:
        - name
        - permissions
      type: object
      properties:
        name:
          maxLength: 100
          minLength: 1
          type: string
          description: Name of the API key
          example: Test Application
        permissions:
          minItems: 1
          type: array
          items:
            type: string
          description: List of permissions to assign to the API key
          example:
            - api-key:write
            - business:read
            - business:writer
      additionalProperties: false
    SaveBankAccountVerificationRequest:
      required:
        - bank_account_id
        - request_id
        - verification_code
      type: object
      properties:
        verification_code:
          maxLength: 50
          minLength: 1
          type: string
          description: Bank account verification code
          example: 5e115eac-1209-4f19-641c-08d6d484e2fe
        request_id:
          maxLength: 50
          minLength: 1
          type: string
          description: Request ID for bank account verification session
          example: a5b739e0-9448-484d-b553-77d7fb8567e0
        bank_account_id:
          maxLength: 50
          minLength: 1
          type: string
          description: Account ID for bank account verification session
          example: ec3e418b-51c8-4eec-941e-e07230e3e3d8
      additionalProperties: false
    SaveBusinessACHInformationRequest:
      type: object
      properties:
        max_daily_transaction_count:
          type: integer
          description: Maximum number of ACH transactions per day
          format: int32
          nullable: true
          example: 100
        max_monthly_transaction_count:
          type: integer
          description: Maximum number of ACH transactions per month
          format: int32
          nullable: true
          example: 2000
        max_single_transaction_amount:
          type: number
          description: Maximum single ACH transaction amount
          format: double
          nullable: true
          example: 5000
        max_daily_volume_amount:
          type: number
          description: Maximum total ACH volume per day
          format: double
          nullable: true
          example: 25000
        max_monthly_volume_amount:
          type: number
          description: Maximum total ACH volume per month
          format: double
          nullable: true
          example: 500000
        avg_single_transaction_amount:
          type: number
          description: Average single ACH transaction amount
          format: double
          nullable: true
          example: 150
        avg_monthly_volume_amount:
          type: number
          description: Average total ACH volume per month
          format: double
          nullable: true
          example: 125000
        statement_descriptor:
          maxLength: 10
          type: string
          description: Descriptor appearing on customer bank statements (max 10 characters)
          nullable: true
          example: MYSTORE
        debit_payment_percentage:
          type: number
          description: Expected percentage of debit payments (must total 100% with credit_payment_percentage)
          format: double
          nullable: true
          example: 75
        credit_payment_percentage:
          type: number
          description: Expected percentage of credit payments (must total 100% with debit_payment_percentage)
          format: double
          nullable: true
          example: 25
        email_notification_thresholds:
          type: boolean
          description: Receive email notifications for threshold alerts
          example: true
        email_notification_returns:
          type: boolean
          description: Receive email notifications for ACH returns
          example: true
        email_notification_bo_exceptions:
          type: boolean
          description: Receive email notifications for back office exceptions
          example: false
        special_instructions:
          maxLength: 2000
          type: string
          description: Special instructions for ACH processing (max 2000 characters)
          nullable: true
          example: Process all transactions after 2 PM EST
      additionalProperties: false
    SaveBusinessBankAccountRequest:
      type: object
      properties:
        bank_account_verification_id:
          type: string
          description: Bank account verification ID
          nullable: true
          example: bav_2b3c4d5e6f7g8h9i0j1k2l3m4
        account_holder_name:
          type: string
          description: Bank account holder name
          nullable: true
          example: Test Corporation
        account_holder_type:
          type: string
          description: Bank account holder type
          nullable: true
          example: company
        account_type:
          type: string
          description: Bank account type
          nullable: true
          example: checking
        routing_number:
          type: string
          description: Bank routing number
          nullable: true
          example: '110000000'
        account_number:
          type: string
          description: Bank account number
          nullable: true
          example: '196420674034'
      additionalProperties: false
    SaveBusinessCardInformationRequest:
      type: object
      properties:
        amex_opt_out_communications:
          type: boolean
          description: Opt-out of Amex communications
          example: false
        amex_monthly_volume:
          type: number
          description: Monthly Amex transaction volume
          format: double
          nullable: true
          example: 50000
        amex_average_ticket:
          type: number
          description: Average Amex transaction amount
          format: double
          nullable: true
          example: 250
        high_ticket_amount:
          type: number
          description: Highest single transaction amount expected
          format: double
          nullable: true
          example: 10000
        swipe_percentage:
          type: number
          description: Percentage of swipe/chip transactions (must total 100% with ecomm_percentage and keyed_percentage)
          format: double
          nullable: true
          example: 25
        ecomm_percentage:
          type: number
          description: Percentage of e-commerce transactions (must total 100% with swipe_percentage and keyed_percentage)
          format: double
          nullable: true
          example: 65
        keyed_percentage:
          type: number
          description: Percentage of manually keyed transactions (must total 100% with swipe_percentage and ecomm_percentage)
          format: double
          nullable: true
          example: 10
        card_entry_merchant:
          type: boolean
          description: Card information entered by merchant
          example: true
        card_entry_consumer:
          type: boolean
          description: Card information entered by consumer
          example: false
        card_entry_other:
          type: boolean
          description: Card information entered via other method
          example: false
        card_entry_other_description:
          maxLength: 500
          type: string
          description: Description of other card entry method (max 500 characters)
          nullable: true
          example: Third-party payment gateway
        card_entry_via_internet:
          type: boolean
          description: Card information entered via internet
          example: true
        card_entry_ssl_encrypted:
          type: boolean
          description: Internet entry uses SSL encryption or better
          example: true
      additionalProperties: false
    SaveBusinessCreditInformationRequest:
      required:
        - credit_product_line
      type: object
      properties:
        credit_product_line:
          minLength: 1
          type: string
          description: Business Credit Product Line
          example: firearms
      additionalProperties: false
    SaveBusinessDirectorRequest:
      required:
        - country_of_residence
        - date_of_birth
        - first_name
        - last_name
        - title
      type: object
      properties:
        title:
          maxLength: 100
          minLength: 1
          type: string
          description: Job title
          example: CEO
        first_name:
          maxLength: 100
          minLength: 1
          type: string
          description: First name
          example: John
        last_name:
          maxLength: 100
          minLength: 1
          type: string
          description: Last name
          example: Smith
        date_of_birth:
          type: string
          description: Date of birth
          format: date-time
          example: '1980-11-15'
        country_of_residence:
          maxLength: 2
          minLength: 1
          type: string
          description: 2 character ISO country code
          example: US
      additionalProperties: false
    SaveBusinessFulfillmentInformationRequest:
      type: object
      properties:
        days_until_fulfillment:
          $ref: '#/components/schemas/DaysUntilFulfillmentValues'
        card_charged_timing:
          $ref: '#/components/schemas/CardChargedTimingValues'
        card_charged_timing_other_explanation:
          maxLength: 500
          type: string
          description: Explanation if card_charged_timing is 'other' (max 500 characters)
          nullable: true
          example: Cards charged upon shipment confirmation
        fulfillment_requires_deposit:
          type: boolean
          description: Whether fulfillment requires a deposit
          nullable: true
          example: false
        fulfillment_deposit_percent_of_sale:
          type: number
          description: Deposit as percentage of sale (0-100)
          format: double
          nullable: true
          example: 25
        fulfillment_deposit_flat_fee:
          type: number
          description: Deposit as flat fee amount
          format: double
          nullable: true
          example: 50
        final_payment_due_before_fulfillment:
          type: boolean
          description: Whether final payment is due before fulfillment
          nullable: true
          example: true
        final_payment_due_days_before_final_delivery:
          type: integer
          description: Days before delivery that final payment is due
          format: int32
          nullable: true
          example: 7
        offers_guarantee_or_warranty:
          type: boolean
          description: Whether business offers guarantee or warranty
          nullable: true
          example: true
        guarantee_type_replacement:
          type: boolean
          description: Offers replacement guarantee
          example: true
        guarantee_type_refund:
          type: boolean
          description: Offers full refund guarantee
          example: false
        guarantee_type_partial_refund:
          type: boolean
          description: Offers partial refund guarantee
          example: false
        refund_policy_days:
          $ref: '#/components/schemas/RefundPolicyDaysValues'
        offers_recurring_billing:
          type: boolean
          description: Whether business offers recurring billing
          nullable: true
          example: true
        recurring_billing_weekly:
          type: boolean
          description: Offers weekly recurring billing
          example: false
        recurring_billing_monthly:
          type: boolean
          description: Offers monthly recurring billing
          example: true
        recurring_billing_quarterly:
          type: boolean
          description: Offers quarterly recurring billing
          example: false
        recurring_billing_annually:
          type: boolean
          description: Offers annual recurring billing
          example: false
        recurring_billing_other:
          type: boolean
          description: Offers other recurring billing frequency
          example: false
        recurring_billing_other_explanation:
          maxLength: 500
          type: string
          description: Explanation of other recurring billing frequency (max 500 characters)
          nullable: true
          example: Bi-weekly billing available
        delivery_percentage_immediate:
          type: number
          description: Percentage of deliveries that are immediate (must total 100% across all delivery percentages)
          format: double
          nullable: true
          example: 10
        delivery_percentage_1to7_days:
          type: number
          description: Percentage of deliveries within 1-7 days (must total 100% across all delivery percentages)
          format: double
          nullable: true
          example: 50
        delivery_percentage_8to14_days:
          type: number
          description: Percentage of deliveries within 8-14 days (must total 100% across all delivery percentages)
          format: double
          nullable: true
          example: 30
        delivery_percentage_15to30_days:
          type: number
          description: Percentage of deliveries within 15-30 days (must total 100% across all delivery percentages)
          format: double
          nullable: true
          example: 10
        delivery_percentage_over30_days:
          type: number
          description: Percentage of deliveries over 30 days (must total 100% across all delivery percentages)
          format: double
          nullable: true
          example: 0
      additionalProperties: false
    SaveBusinessRepresentativeRequest:
      required:
        - address
        - date_of_birth
        - email
        - first_name
        - is_politically_exposed_person
        - last_name
        - nationality
        - phone
        - title
      type: object
      properties:
        title:
          maxLength: 100
          minLength: 1
          type: string
          description: Job title
          example: CEO
        first_name:
          maxLength: 100
          minLength: 1
          type: string
          description: First name
          example: John
        last_name:
          maxLength: 100
          minLength: 1
          type: string
          description: Last name
          example: Smith
        nationality:
          maxLength: 2
          minLength: 1
          type: string
          description: 2 character ISO country code
          example: US
        government_identifier:
          type: string
          description: SSN or personal identifier
          nullable: true
          example: 483-97-8024
        email:
          maxLength: 250
          minLength: 1
          type: string
          description: Email address
          format: email
          example: john.smith@email.com
        phone:
          maxLength: 50
          minLength: 4
          type: string
          description: Phone number
          example: '+15554879043'
        date_of_birth:
          type: string
          description: Date of birth
          format: date-time
          example: '1980-11-15'
        is_politically_exposed_person:
          type: boolean
          description: Are they a politically exposed person?
          example: false
        address:
          $ref: '#/components/schemas/Address'
      additionalProperties: false
    SaveBusinessRequest:
      required:
        - business_country
        - business_phone
        - business_type
        - business_website
        - date_of_establishment
        - headquarters_address
        - legal_name
      type: object
      properties:
        legal_name:
          maxLength: 200
          minLength: 1
          type: string
          description: Legal name of the business
          example: 'Test Corporation, LLC'
        doing_business_as:
          maxLength: 200
          type: string
          description: Doing business as (DBA)
          nullable: true
          example: Test DBA
        government_identifier:
          type: string
          description: SSN or EIN of the business
          nullable: true
          example: 48-294876839
        business_country:
          maxLength: 2
          minLength: 1
          type: string
          description: 2 character ISO country code
          example: US
        date_of_establishment:
          type: string
          description: Date of establishment of the business
          format: date-time
          example: '2016-04-07'
        business_website:
          maxLength: 250
          minLength: 1
          type: string
          description: Business website
          example: https://www.testcorporation.com
        business_phone:
          maxLength: 50
          minLength: 4
          type: string
          description: Business phone number
          example: '+15552604982'
        business_email:
          maxLength: 250
          type: string
          description: Business email address
          format: email
          nullable: true
          example: contact@testcorporation.com
        customer_service_phone:
          maxLength: 50
          minLength: 4
          type: string
          description: Customer service phone number
          nullable: true
          example: '+15552601234'
        business_type:
          minLength: 1
          type: string
          description: Business type
          example: company
        business_structure:
          type: string
          description: Business structure
          nullable: true
          example: private_corporation
        business_structure_other:
          maxLength: 100
          type: string
          description: Business structure description if business structure is 'other'
          nullable: true
          example: Custom business structure
        is_firearms_merchant:
          type: boolean
          description: 'Does the business manufacture, distribute, or sell firearms?'
          nullable: true
          example: true
        headquarters_address:
          $ref: '#/components/schemas/Address'
        physical_address:
          $ref: '#/components/schemas/Address'
      additionalProperties: false
    SaveBusinessShareholderRequest:
      required:
        - company
        - establishment_date
      type: object
      properties:
        company:
          maxLength: 200
          minLength: 1
          type: string
          description: Company name
          example: Berkshire Hathaway
        establishment_date:
          type: string
          description: Date of establishment
          format: date-time
          example: '1941-10-03'
      additionalProperties: false
    SaveBusinessTaxInformationRequest:
      required:
        - annual_volume
        - average_transaction_amount
        - business_industry
        - ecommerce_annual_volume
        - instore_annual_volume
        - product_description
      type: object
      properties:
        product_description:
          maxLength: 200
          minLength: 1
          type: string
          description: Description of product or services
          example: Sell clothing and accessories
        business_industry:
          minLength: 1
          type: string
          description: Business industry
          example: computer_repair
        annual_volume:
          type: integer
          description: Annual transaction volume
          format: int32
          example: 1200000
        ecommerce_annual_volume:
          type: integer
          description: Annual ecommerce transaction volume
          format: int32
          example: 800000
        instore_annual_volume:
          type: integer
          description: Annual in-store transaction volume
          format: int32
          example: 400000
        average_transaction_amount:
          type: integer
          description: Average transaction amount
          format: int32
          example: 1500
        has_processed_transactions:
          type: boolean
          description: 'Has your company done any business, or processed any transactions before?'
          nullable: true
          example: false
      additionalProperties: false
    SaveCustomerRequest:
      required:
        - address
      type: object
      properties:
        external_id:
          maxLength: 100
          type: string
          description: Customer ID in merchant's system
          nullable: true
          example: e797ef3c-b586-4333-af90-7168d8427d85
        business_name:
          maxLength: 200
          type: string
          description: Name of the business if business customer type
          nullable: true
          example: 'Awesome Company, LLC'
        first_name:
          maxLength: 100
          type: string
          description: First name of the person if person customer type
          nullable: true
          example: John
        last_name:
          maxLength: 100
          type: string
          description: Last name of the person if person customer type
          nullable: true
          example: Smith
        government_identifier:
          type: string
          description: SSN or EIN of the customer
          nullable: true
          example: 48-294876839
        email:
          maxLength: 250
          type: string
          description: Email address
          format: email
          nullable: true
          example: john.smith@email.com
        phone:
          maxLength: 50
          minLength: 4
          type: string
          description: Phone number
          nullable: true
          example: '+15554829347'
        address:
          $ref: '#/components/schemas/Address'
        shipping_address:
          $ref: '#/components/schemas/Address'
      additionalProperties: false
    SaveFirearmsQuestionnaireRequest:
      required:
        - are_background_checks_performed
        - are_customers_identified
        - has_buyer_complete_atf_form_33104
        - has_buyer_complete_atf_form_4473
        - has_federal_firearms_license
        - has_nfa_registration
        - has_sales_only_to_non_prohibited_person
        - shipping_policies
      type: object
      properties:
        products_sold:
          type: string
          description: 'List of products sold by merchant (i.e. Firearms (in accordance with ATF definition), firearms parts, accessories, ammunition, explosives).'
          nullable: true
          example: Weapons and munitions
          deprecated: true
        states_shipped:
          type: string
          description: List all states that merchant ships to.
          nullable: true
          example: 'TX, IA, and AL'
          deprecated: true
        has_federal_firearms_license:
          minLength: 1
          type: string
          description: 'Merchant has an active and good-standing FFL license: ''yes'', ''no'', or ''not_applicable'''
          example: yes
        federal_firearms_license:
          type: string
          description: Federal firearms license
          nullable: true
          example: 1-22-333-44-5X-66666
        has_federal_firearms_license_adverse_actions:
          type: string
          description: 'Has Merchant or any principal of company had adverse action taken against an FFL license (i.e. revocation, willful violations, etc)? ''yes'' or ''no'''
          nullable: true
          example: no
          deprecated: true
        federal_firearms_license_adverse_actions_reason:
          type: string
          description: Description of adverse actions taken against FFL license
          nullable: true
          example: None
          deprecated: true
        has_export_controls:
          type: string
          description: 'Merchant has controls in place to block/prohibit transactions & shipment outside of the United States: ''yes'' or ''no'''
          nullable: true
          example: yes
          deprecated: true
        routing_controls:
          type: string
          description: 'What controls does merchant have in place to ensure proper MCC coding and routing in accordance with state law? If not applicable, state ‘N/A’.'
          nullable: true
          example: N/A
          deprecated: true
        has_nfa_registration:
          minLength: 1
          type: string
          description: 'Merchant has obtained NFA registration and registered inventory with the Bureau of Alcohol, Tobacco, Firearms and Explosives (ATF): ''yes'', ''no'', or ''not_applicable'''
          example: yes
        are_customers_identified:
          minLength: 1
          type: string
          description: 'Customers are identified via government issued identification: ''yes'', ''no'', or ''not_applicable'''
          example: yes
        customers_identified_not_applicable_reason:
          type: string
          description: Reason why customer identification is not applicable
          nullable: true
          example: Not required by state law
          deprecated: true
        are_background_checks_performed:
          minLength: 1
          type: string
          description: 'Background checks are performed on all customers via NICS or state point of contact: ''yes'', ''no'', or ''not_applicable'''
          example: yes
        background_checks_performed_not_applicable_reason:
          type: string
          description: Reason why customer background checks are not applicable
          nullable: true
          example: Not required by state law
          deprecated: true
        has_sales_only_to_non_prohibited_person:
          minLength: 1
          type: string
          description: 'Gun sales are only completed if the buyer is not a prohibited person: ''yes'', ''no'', or ''not_applicable'''
          example: yes
        has_buyer_complete_atf_form_4473:
          minLength: 1
          type: string
          description: 'The prospective buyer must complete and ATF Form 4473 (Firearms Transaction Record): ''yes'', ''no'', or ''not_applicable'''
          example: yes
        atf_form_4473_retention_period:
          type: string
          description: 'If yes, completed ATF Forms 4473 are retained by the dealer for a period of.'
          nullable: true
          example: 3 years
        has_buyer_complete_atf_form_33104:
          minLength: 1
          type: string
          description: 'The prospective buyer will complete Form 3310.4 (Report of Multiple Sale or Other Disposition of Pistols and Revolvers) if they are an unlicensed person purchasing or acquiring two or more handguns at one time or during five consecutive business days: ''yes'', ''no'', or ''not_applicable'''
          example: yes
        atf_form_33104_retention_period:
          type: string
          description: 'If yes, completed Form 3310.4 are retained by the dealer for a period of'
          nullable: true
          example: 1 year
        shipment_controls:
          type: string
          description: 'What controls are in place to ensure proper shipment of firearms in accordance with Federal law (i.e. shipping only to licensed FFL, completing Form 1508 to ship via UPS, USPS, or Fedex, etc). It not applicable, state ‘N/A’.'
          nullable: true
          example: Form 1508 with USPS
          deprecated: true
        shipping_policies:
          minLength: 1
          type: string
          description: 'What are your policies and procedures for shipping a firearm (who does the shipping, proof of delivery, shipping to dealers)?'
          example: 'Confirm the receiving dealer or gunsmith is licensed. '
        other_shipping_policy:
          type: string
          description: 'If ''Other'' was selected for shipping policies, please describe.'
          nullable: true
          example: Not required by state law
      additionalProperties: false
    SaveManagedAccountBusinessRequest:
      required:
        - bank_account
        - business
        - representative
        - tax_information
      type: object
      properties:
        business:
          $ref: '#/components/schemas/SaveBusinessRequest'
        representative:
          $ref: '#/components/schemas/SaveBusinessRepresentativeRequest'
        bank_account:
          $ref: '#/components/schemas/SaveBusinessBankAccountRequest'
        tax_information:
          $ref: '#/components/schemas/SaveBusinessTaxInformationRequest'
        credit_information:
          $ref: '#/components/schemas/SaveBusinessCreditInformationRequest'
        directors:
          type: array
          items:
            $ref: '#/components/schemas/SaveBusinessDirectorRequest'
          nullable: true
        shareholders:
          type: array
          items:
            $ref: '#/components/schemas/SaveBusinessShareholderRequest'
          nullable: true
        ultimate_beneficial_owners:
          type: array
          items:
            $ref: '#/components/schemas/SaveUltimateBeneficialOwnerRequest'
          nullable: true
        firearms_questionnaire:
          $ref: '#/components/schemas/SaveFirearmsQuestionnaireRequest'
        pharmaceutical_questionnaire:
          $ref: '#/components/schemas/SavePharmaceuticalQuestionnaireRequest'
      additionalProperties: false
    SaveOnboardingInvitationRequest:
      required:
        - product
      type: object
      properties:
        product:
          type: string
          description: Product
          example: seller
        return_url:
          type: string
          description: 'Return URL to redirect after onboarding is completed. `onboarding_status`, `product_type` and `account_id` will be returned as query string parameters'
          nullable: true
          example: https://example.com/onboarding/result
        terms_of_service:
          type: string
          description: Terms of service to display during onboarding which must be accepted by the end user
          nullable: true
          example: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin sit amet massa nec leo euismod.'
        settings:
          $ref: '#/components/schemas/OnboardingInvitationSettings'
        theme:
          $ref: '#/components/schemas/OnboardingInvitationTheme'
      additionalProperties: false
    SavePharmaceuticalQuestionnaireRequest:
      required:
        - business_operating_states
        - buyer_validation_methods
        - dea_registration_number
        - delivery_methods
        - sales_channels
        - sales_methods
        - shipping_states
        - terms_and_conditions_url
      type: object
      properties:
        dea_registration_number:
          maxLength: 50
          minLength: 1
          type: string
          description: DEA registration number (required for pharma MCC). Reply NA if not applicable.
          example: AB1234567
        sales_channels:
          minItems: 1
          type: array
          items:
            minLength: 1
            type: string
          description: 'Sales channels: ''online'', ''in_person'', ''hybrid''. Can specify multiple values.'
          example: '[''online'', ''hybrid'']'
        buyer_validation_methods:
          maxLength: 500
          minLength: 1
          type: string
          description: Methods used to validate buyers
          example: Government ID verification and background checks
        business_operating_states:
          minItems: 1
          type: array
          items:
            maxLength: 10
            minLength: 1
            type: string
          description: 'State codes where business operates (e.g., [''CA'', ''NY'', ''TX''])'
          example: '[''CA'', ''NY'', ''TX'']'
        shipping_states:
          minItems: 1
          type: array
          items:
            type: string
          description: 'State codes  where products are shipped (e.g., [''CA'', ''NY'', ''TX''])'
          example: '[''CA'', ''NY'', ''TX'']'
        terms_and_conditions_url:
          maxLength: 2048
          minLength: 1
          type: string
          description: URL to terms and conditions
          example: https://example.com/terms
        sales_methods:
          minItems: 1
          type: array
          items:
            minLength: 1
            type: string
          description: 'Sales methods: ''b2b'', ''invoicing_with_shipping'', ''local_pickup''. Can specify multiple values.'
          example: '[''b2b'', ''invoicing_with_shipping'']'
        delivery_methods:
          minItems: 1
          type: array
          items:
            minLength: 1
            type: string
          description: 'Delivery methods: ''overnight_shipping'', ''hazardous_materials_ground_only''. Can specify multiple values.'
          example: '[''overnight_shipping'']'
      additionalProperties: false
    SaveProductRequest:
      type: object
      properties:
        product:
          maxLength: 50
          type: string
          description: Product
          nullable: true
          example: payments
      additionalProperties: false
    SaveUltimateBeneficialOwnerRequest:
      required:
        - address
        - date_of_birth
        - email
        - first_name
        - is_politically_exposed_person
        - last_name
        - percent_ownership
        - phone
        - title
      type: object
      properties:
        title:
          maxLength: 100
          minLength: 1
          type: string
          description: Job title
          example: CEO
        first_name:
          maxLength: 100
          minLength: 1
          type: string
          description: First name
          example: John
        last_name:
          maxLength: 100
          minLength: 1
          type: string
          description: Last name
          example: Smith
        percent_ownership:
          type: number
          description: Percentage ownership in business of at least 25% or greater
          format: double
          example: 33
        government_identifier:
          type: string
          description: SSN or personal identifier
          nullable: true
          example: 483-97-8024
        email:
          maxLength: 250
          minLength: 1
          type: string
          description: Email address
          format: email
          example: john.smith@email.com
        phone:
          maxLength: 50
          minLength: 4
          type: string
          description: Phone number
          example: '+15554879043'
        date_of_birth:
          type: string
          description: Date of birth
          format: date-time
          example: '1980-11-15'
        is_politically_exposed_person:
          type: boolean
          description: Are they a politically exposed person?
          example: false
        address:
          $ref: '#/components/schemas/Address'
        drivers_license:
          maxLength: 50
          type: string
          description: Driver's license number
          nullable: true
          example: D12345678
        drivers_license_state:
          maxLength: 2
          type: string
          description: Driver's license issuing state (2 letter abbreviation)
          nullable: true
          example: CA
      additionalProperties: false
    SaveWebhookRequest:
      required:
        - event_types
        - url
      type: object
      properties:
        url:
          maxLength: 250
          minLength: 1
          type: string
          description: URL of where to send notifications for provided event types
          example: https://examplewebsite.com/notification
        event_types:
          minItems: 1
          type: array
          items:
            type: string
          description: A list of event types to send notifications for
          example:
            - connection-invitation:accept
            - connection-invitation:decline
            - seller-onboarding:update
      additionalProperties: false
    StepRequirement:
      type: object
      properties:
        name:
          type: string
          description: Name of the required onboarding step
          nullable: true
          example: business
        status:
          type: string
          description: Status of the contract review
          nullable: true
          example: complete
      additionalProperties: false
    UltimateBeneficialOwner:
      required:
        - address
        - date_of_birth
        - email
        - first_name
        - is_politically_exposed_person
        - last_name
        - percent_ownership
        - phone
        - title
      type: object
      properties:
        id:
          type: string
          description: Ultimate beneficial owner ID
          nullable: true
          example: ubo_5mQSxcSAW3UZ4ijLzEt4RuAib
        account_id:
          type: string
          description: Account ID
          nullable: true
          example: acc_B518niGwGYKzig6vtrRVZGGGV
        government_identifier_last4:
          type: string
          description: Last 4 of SSN or personal identifier
          nullable: true
          example: '8024'
        managed_by_representative:
          type: boolean
          description: Ultimate beneficial owner is managed by business representative
          example: false
        created_at:
          type: string
          description: Date owner was created
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        modified_at:
          type: string
          description: Date owner was modified
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        title:
          maxLength: 100
          minLength: 1
          type: string
          description: Job title
          example: CEO
        first_name:
          maxLength: 100
          minLength: 1
          type: string
          description: First name
          example: John
        last_name:
          maxLength: 100
          minLength: 1
          type: string
          description: Last name
          example: Smith
        percent_ownership:
          type: number
          description: Percentage ownership in business of at least 25% or greater
          format: double
          example: 33
        government_identifier:
          type: string
          description: SSN or personal identifier
          nullable: true
          example: 483-97-8024
        email:
          maxLength: 250
          minLength: 1
          type: string
          description: Email address
          format: email
          example: john.smith@email.com
        phone:
          maxLength: 50
          minLength: 4
          type: string
          description: Phone number
          example: '+15554879043'
        date_of_birth:
          type: string
          description: Date of birth
          format: date-time
          example: '1980-11-15'
        is_politically_exposed_person:
          type: boolean
          description: Are they a politically exposed person?
          example: false
        address:
          $ref: '#/components/schemas/Address'
        drivers_license:
          maxLength: 50
          type: string
          description: Driver's license number
          nullable: true
          example: D12345678
        drivers_license_state:
          maxLength: 2
          type: string
          description: Driver's license issuing state (2 letter abbreviation)
          nullable: true
          example: CA
      additionalProperties: false
    UpdateAccountRequest:
      required:
        - name
      type: object
      properties:
        name:
          maxLength: 200
          minLength: 1
          type: string
          description: Name of the account
          example: 'Test Company, LLC'
      additionalProperties: false
    ValidationProblemDetails:
      type: object
      properties:
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          nullable: true
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: { }
    Webhook:
      required:
        - event_types
        - url
      type: object
      properties:
        id:
          type: string
          description: Webhook ID
          nullable: true
          example: wbhk_BcA4TAFibe9UHgkY6pEjxzrya
        account_id:
          type: string
          description: Account ID
          nullable: true
          example: acc_B518niGwGYKzig6vtrRVZGGGV
        environment:
          type: string
          description: Environment - Can be `test` or `production`
          nullable: true
          example: production
        key:
          type: string
          description: Base64 RSA public key used for webhook signature verification
          nullable: true
          example: TUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUEzK0ViU1hacTBpYXlmN1FOdStwN1I5OUxPQzltN0crZUhrY1VvUTdYNnFja05vaGxhMjViVW0xZXZBZ1RiN2RXZkxiT3kwVHZsczNBdkFKdEI0QVh5VjJtczJ4Y3d2NXhXakprbnl6MzNRUFVNNWRKQmQ1Z29oYmdLL2dwcVUzMWpkR0NCN2UyR0J4NWZhWEp4L0VnVEZrZjZoaDVBU3NlV0hSSEx2RjRIUk5zcmRVd1ovak5jODlnM2hHb0VPTWdSK240ZmVTYjBaSEw4ZmpYc2RIaVJkbG84VVhxRDZKRFdWcnJNbUdGZTZudXdYRUhaUGt5NnJhMTM1VG9yQThZOUlpWXhybEN1NFNncGhTN3N1Y0cwVnJMTGF0TVVOdW9ZRW9PVFBJMFVGRmtLY3EwdlRCRzhINXdUMFNvR2xpNUVpL1FYK0RoWWRPMFN3OGdXZUY4aHdJREFRQUI=
        created_at:
          type: string
          description: Date webhook was created
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        modified_at:
          type: string
          description: Date webhook was modified
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        url:
          maxLength: 250
          minLength: 1
          type: string
          description: URL of where to send notifications for provided event types
          example: https://examplewebsite.com/notification
        event_types:
          minItems: 1
          type: array
          items:
            type: string
          description: A list of event types to send notifications for
          example:
            - connection-invitation:accept
            - connection-invitation:decline
            - seller-onboarding:update
      additionalProperties: false
    WebhookEvent:
      type: object
      properties:
        id:
          type: string
          description: Webhook event ID
          nullable: true
          example: whe_2S8RsJECwUKHGbfL2AAaDM2AW
        event_id:
          type: string
          description: Event ID
          nullable: true
          example: evnt_5jxWRFNLCAWeegrkCAG3a9DGc
        webhook_id:
          type: string
          description: Webhook ID
          nullable: true
          example: wbhk_BcA4TAFibe9UHgkY6pEjxzrya
        account_id:
          type: string
          description: Account ID
          nullable: true
          example: acc_B518niGwGYKzig6vtrRVZGGGV
        environment:
          type: string
          description: Environment - Can be `test` or `production`
          nullable: true
          example: production
        event_type:
          type: string
          description: Event type
          nullable: true
          example: connection:update
        entity_id:
          type: string
          description: Entity ID of the event
          nullable: true
          example: pmt_2YKewBonG4tgk12MheY3PiHDy
        entity_type:
          type: string
          description: Entity type of the event
          nullable: true
          example: payment
        last_delivery_attempt:
          type: string
          description: Date webhook was last attempted for delivery
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
        delivery_attempts:
          type: integer
          description: Number of delivery attempts
          format: int32
          example: 2
        status:
          type: string
          description: Webhook event status
          nullable: true
          example: delivered
        request:
          type: string
          description: Request body
          nullable: true
        response_status_code:
          type: integer
          description: Response HTTP status code
          format: int32
          nullable: true
        response:
          type: string
          description: Response body
          nullable: true
        created_at:
          type: string
          description: Date webhook event was created
          format: date-time
          nullable: true
          example: '2024-06-30T01:02:29.212Z'
      additionalProperties: false
    WebhookEventPaginatedList:
      type: object
      properties:
        pagination:
          $ref: '#/components/schemas/Pagination'
        data:
          maxItems: 100
          type: array
          items:
            $ref: '#/components/schemas/WebhookEvent'
          nullable: true
      additionalProperties: false
    WebhookPaginatedList:
      type: object
      properties:
        pagination:
          $ref: '#/components/schemas/Pagination'
        data:
          maxItems: 100
          type: array
          items:
            $ref: '#/components/schemas/Webhook'
          nullable: true
      additionalProperties: false
  securitySchemes:
    ApiKey:
      type: apiKey
      description: Authorization by API Key inside request's X-API-KEY header
      name: X-API-KEY
      in: header
security:
  - ApiKey: [ ]