openapi: 3.0.3
info:
  title: Mortgage Automator API
  description: |-
    Mortgage Automator API based on OpenAPI 3.0 specification.

    Some useful links:
    - [Documentation](https://app.mortgageautomator.com/app/apidoc.php)
    - [The source API definition](https://app.mortgageautomator.com/app/apidoc.php?schema=yml)
    
    ## Version
    Current Version: `1`
    
    Supported Versions: `1, 2`
    
    To specify a newer version `2` other than the current version `1`: `{ENDPOINT}/v2/loans/get`
    
    When the version is not specified or the specified version is not supported, version is set to the current version.
    
    For example, `{ENDPOINT}/loans/list` uses the current version `1`
    
    ## Filtering, Sorting and Pagination
    
    Use these URL parameters to filter, sort and pagination in List requests. For example, `loans/list`
    
    ### Filter
    - By range using `lte` and/or `gte`

      Filter `loan_id` that is great than or equal to 500 and less than 1000: `/loans/list/?loan_id[lte]=1000&loan_id[gte]=500`

    - Equal or In a List
      
      Filter loan_id that is in a list of 345 and 567: `/loans/list/?loan_id[]=345&loan_id[]=567`
    
    ### Sort by
    - Ascending order (default)
      
      Sort `loan_id` in ascending order: `/loans/list/?sort_by=+loan_id` which is the default and it is equivalent to `/loans/list/?sort_by=loan_id`
    
    - Descending order
      
      Sort `loan_id` in descending order: `/loans/list/?sort_by=-loan_id`
    
    - Sort multiple fields
      
      Sort closing_date in descending order and loan_id in descending order: `/loans/list/?sort_by=-closing_date,-loan_id`    

    ### Pagination with `start`
    
    API will return the first 50 records. In the response, there is a `next` field indicates the next batch should start with
    
    e.g. The response after this request: `/loans/list`
    
    `{ "next": 50, "result": { "loans": [ {...loan#1}, {...loan#2}, ... ] } }`
    
    To get the next 50 loans: `/loans/list/?start=50`
    
    If `next` does not exist in the response, it means there is no next page.

    ## Test Environment
    
    Use our demo environment to test our API so that the tests will not affect your production/live account.
    
    lender_id is `2169`. API key is `3n8JnJXrVWOGwi7S`
    
    [Postman Collection](https://documenter.getpostman.com/view/10653907/2s93sW7amT)
    
    [Login to Mortgage Automator Demo Server](https://b-54784a51.mortgageautomator.com/app/index.php?mask=eyJ0aW1lIjoxODIzNDU2MDU5LCJ1c2VyIjo2MjA2LCJncyI6MTAyMDF9)

  contact:
    email: support@mortgageautomator.com
  version: 1.0.11
externalDocs:
  description: Find out more about Mortgage Automator API
  url: https://app.mortgageautomator.com/app/apidoc.php
servers:
  - url: https://app.mortgageautomator.com/api/
    description: Production server
  - url: https://b-54784a51.mortgageautomator.com/api/
    description: Demo server
tags:
  - name: loans
    description: Everything about Loans
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_loans
  - name: updated_loans
    description: Everything about Updated Loans
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_updated_loans
  - name: created_loans
    description: Everything about Created Loans
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_created_loans
  - name: borrower_loans
    description: Everything about Borrower Loans
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_borrower_loans
  - name: broker_staff_loans
    description: Everything about Broker Staff Loans
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_broker_staff_loans
  - name: file_loans
    description: Everything about File Loans
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_file_loans
  - name: investor_loans
    description: Everything about Investor Loans
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_investor_loans
  - name: properties
    description: Everything about Properties
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_properties
  - name: mortgages
    description: Everything about Mortgages
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_mortgages
  - name: existingmortgages
    description: Everything about Existing Mortgages
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_existingmortgages
  - name: downpayments
    description: Everything about Downpayments
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_downpayments
  - name: multipieces
    description: Everything about Multi Pieces
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_multipieces
  - name: debts
    description: Everything about Debts
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_debts
  - name: borrowers
    description: Everything about Borrowers
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_borrowers
  - name: shareholders
    description: Everything about Shareholders
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_shareholders
  - name: conditions
    description: Everything about Loan Conditions
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_conditions
  - name: documentcategories
    description: Everything about Document Categories
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_documentcategories
  - name: loanfiles
    description: Everything about Loan Files
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_loanfiles
  - name: fees
    description: Everything about Fees
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_fees
  - name: customfees
    description: Everything about Custom Fees
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_customfees
  - name: addresses
    description: Everything about Addresses
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_addresses
  - name: insurances
    description: Everything about Insurances
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_insurances
  - name: insuranceagents
    description: Everything about Insurance Agents
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_insuranceagents
  - name: parentbrokers
    description: Everything about Parent Brokers
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_parentbrokers
  - name: brokers
    description: Everything about Brokers
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_brokers
  - name: brokerstaff
    description: Everything about Broker Staff
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_brokerstaff
  - name: brokerstaffcheques
    description: Everything about Broker Staff Cheques
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_brokerstaffcheques
  - name: lawyers
    description: Everything about Lawyers
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_lawyers
  - name: lawyerstaff
    description: Everything about Lawyer Staff
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_lawyerstaff
  - name: appraisers
    description: Everything about Appraisers
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_appraisers
  - name: appraiserstaff
    description: Everything about Appraiser Staff
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_appraiserstaff
  - name: titlecompanies
    description: Everything about Title Companies
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_titlecompanies
  - name: titlecompanystaff
    description: Everything about Title Company Staff
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_titlecompanystaff
  - name: employments
    description: Everything about Employments
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_employments
  - name: incomes
    description: Everything about Incomes
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_incomes
  - name: otherexpenses
    description: Everything about Other Expenses
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_otherexpenses
  - name: positions
    description: Everything about Positions
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_positions
  - name: assets
    description: Everything about Assets
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_assets
  - name: joints
    description: Everything about Joints
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_joints
  - name: investments
    description: Everything about Investments
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_investments
  - name: accounts
    description: Everything about Accounts
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_accounts
  - name: account_directors
    description: Everything about Account Directors
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_account_directors
  - name: account_trustees
    description: Everything about Account Trustees
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_account_trustees
  - name: default_expenses
    description: Everything about Default Expenses
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_default_expenses
  - name: investors
    description: Everything about Investors
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_investors
  - name: funds
    description: Everything about Funds
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_funds
  - name: fund_active_investors
    description: Everything about Fund Active Investors
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_fund_active_investors
  - name: tags
    description: Everything about Tags
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_tags
  - name: emds
    description: Everything about EMD Profiles
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_emds
  - name: emd_staff
    description: Everything about EMD Staff
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_emd_staff
  - name: roles
    description: Everything about Roles
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_roles
  - name: users
    description: Everything about Users
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_users
  - name: loan_note
    description: Everything about Loan Note
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_loan_note
  - name: loan_note_for_loan_update
    description: Everything about Loan Note for Loan Update
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_loan_note_for_loan_update
  - name: main_property_for_loan_update
    description: Everything about Main Property for Loan Update
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_main_property_for_loan_update
  - name: other_properties
    description: Everything about Other Properties
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_other_properties
  - name: mortgage_for_loan_update
    description: Everything about Mortgage for Loan Update
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_mortgage_for_loan_update
  - name: apikey
    description: Everything about API Key
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_apikey
  - name: loan_amenity
    description: Everything about Loan Amenity
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_loan_amenity
  - name: tax_payment_schedules
    description: Everything about Tax Payment Schedule
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_tax_payment_schedules
  - name: share_class
    description: Everything about Share Class
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_share_class
  - name: drip_payouts
    description: Everything about Drip Payout
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_drip_payouts
  - name: additional_reserves
    description: Everything about Additional Reserve
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_additional_reserves
  - name: propertyowners
    description: Everything about Property Owners
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_propertyowners
  - name: credit_reports
    description: Everything about Credit Reports
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_credit_reports
  - name: background_tasks
    description: Everything about Background Tasks
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_background_tasks
  - name: refresh_generatedfield
    description: Everything about Refresh Generated Field
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_refresh_generatedfield
  - name: report
    description: Everything about Reports
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_report
  - name: ledger
    description: Everything about Ledger
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_ledger
  - name: servicing_transformations
    description: Everything about Servicing Transformations
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_servicing_transformations
  - name: pac
    description: Everything about PAC
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_pac
  - name: action_logs
    description: Everything about Action Logs
    externalDocs:
      description: Find out more
      url: https://app.mortgageautomator.com/app/apidoc.php#entity_action_logs
security:
  - api_key: []
  - account_id: []
paths:
  /loans/get:
    post:
      tags:
        - loans
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                loan_id:
                  type: integer
                response_field_whitelist:
                  type: array
                  nullable: true
                  items: {}
                  description: |-
                    If defined, the loan will be returned with those fields only.
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Loans"
  /loans/create:
    post:
      tags:
        - loans
      description: |-
        ## Borrower Deduplication
          
          A borrower is A borrower is considered a duplicate if any of the following conditions is met:
            - SIN and Date of Birth are the same.
            - Email, First Name and Last Name are the same.
            - External Borrower ID `x_borrower_id` is the same
            - Borrower Corporation Name `corpname` is the same and Borrower is a corporation 'iscorporation' is greater than 0.
          
          If a borrower is a duplicate,
            - The provided borrower will not be created again.
            - The existing borrower will be associated with the newly created loan.
            - The existing borrower will not be updated.
           
          ## Title Company and Title Company Staff Deduplication
          
          A title company staff is considered a duplicate if any of the following conditions is met:
            - External Title Company Staff ID `x_staff_id` is the same.
            - Title Company Name `Title Companies->name`, Title Company Staff's Email `email`, First Name `first_name` and Last Name `last_name` are the same.
          
          If a Title Company Staff is a duplicate,
            - The provided Title Company and Title Company Staff will not be created again.
            - The existing Title Company Staff will be associated with the newly created loan.
            - The existing Title Company and Title Company Staff will not be updated
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                response_field_whitelist:
                  type: array
                  nullable: true
                  items: {}
                  description: |-
                    If defined, the created loan will be returned with those fields only.
                loan_id:
                  type: integer
                loan_seq_id:
                  type: integer
                x_loan_id:
                  type: string
                  nullable: true
                gsid:
                  type: integer
                loan_title:
                  type: string
                loan_title_x:
                  type: string
                  nullable: true
                  description: |-
                    Loan title from the original import source
                status:
                  type: integer
                  enum:
                    - 0
                    - 1
                    - 2
                    - 3
                  description: |-
                    Enums:
                    0 - In Progress
                    1 - Funded
                    2 - Discharged
                    3 - Terminated
                substatus:
                  type: integer
                  nullable: true
                  description: |-
                    Choose a loan substatus in Settings > Loan Substatuses.
                purpose:
                  type: integer
                  enum:
                    - 0
                    - 1
                  description: |-
                    Enums:
                    0 - Refinance/ETO
                    1 - Purchase
                purpose_text:
                  type: string
                creation_date:
                  type: integer
                  description: |-
                    Unix timestamp integer: number of seconds since Jan 01, 1970 in GMT/UTC timezone
                closing_date:
                  type: integer
                  nullable: true
                  description: |-
                    Unix timestamp integer: number of seconds since Jan 01, 1970 in GMT/UTC timezone
                deadline_to_accept_date:
                  type: integer
                  nullable: true
                  description: |-
                    Unix timestamp integer: number of seconds since Jan 01, 1970 in GMT/UTC timezone
                property:
                  $ref: "#/components/schemas/Properties"
                other_properties:
                  type: array
                  items:
                    $ref: "#/components/schemas/Properties"
                mortgage:
                  $ref: "#/components/schemas/Mortgages"
                existing_mortgages:
                  type: array
                  items:
                    $ref: "#/components/schemas/Existingmortgages"
                borrowers:
                  type: array
                  items:
                    $ref: "#/components/schemas/Borrowers"
                investors:
                  type: array
                  items:
                    $ref: "#/components/schemas/Investors"
                roles:
                  type: array
                  items:
                    $ref: "#/components/schemas/Roles"
                down_payments:
                  type: array
                  items:
                    $ref: "#/components/schemas/Downpayments"
                multi_pieces:
                  type: array
                  items:
                    $ref: "#/components/schemas/Multipieces"
                broker_staff:
                  $ref: "#/components/schemas/Brokerstaff"
                importedbrokeroriginalxml:
                  type: string
                broker_staff_cheque:
                  $ref: "#/components/schemas/Brokerstaffcheques"
                eft_name:
                  type: string
                eft_transit:
                  type: string
                  nullable: true
                eft_account:
                  type: string
                  nullable: true
                eft_account_type:
                  type: integer
                  enum:
                    - 0
                    - 1
                    - 2
                  description: |-
                    For US only. Default 0 (Checking).
                    0: Checking
                    1: Savings 
                    Enums:
                    0 - Checking
                    1 - Savings
                    2 - Loan Account
                eft_bank_id:
                  type: integer
                  nullable: true
                  description: |-
                    Not applicable for US
                eft_target:
                  type: integer
                  nullable: true
                  description: |-
                    Payment Method > PAD form to be signed > Deposit To
                property_tax_lender_pays:
                  type: integer
                  nullable: true
                  description: |-
                    1: Lender pays; 0: otherwise
                condo_fees_lender_pays:
                  type: integer
                  nullable: true
                  description: |-
                    1: Lender pays; 0: otherwise
                site_inspection_mode:
                  type: integer
                  description: |-
                    Site inspection mode for main property. Default Company Settings > Valuation Mode.
                    0: n/a
                    1: Inspection
                    2: Appraisal
                    3: Both
                site_inspection_fee:
                  type: number
                  description: |-
                    When Site Inspection Mode is Inspection (1)
                site_inspection_no_charge_to_borrower:
                  type: number
                appraisal_type:
                  type: integer
                  nullable: true
                  enum:
                    - 0
                    - 1
                    - 2
                    - 4
                    - 3
                  description: |-
                    Site Inspection / Appraisal > Primary property > Appraisal > Valuation Type
                    Enums:
                    0 - Appraisal
                    1 - Municipal Assessment
                    2 - Contract of Purchase and Sale
                    4 - Internal
                    3 - Other
                appraisal_fee:
                  type: number
                  description: |-
                    When Site Inspection Mode is Appraisal (2)
                appraisal_no_charge_to_borrower:
                  type: integer
                municipal_assessment_year:
                  type: string
                  nullable: true
                  description: |-
                    When Site Inspection Mode is Appraisal (2), and Appraisal Type is Municipal Assessment (1)
                other_valuation_description:
                  type: string
                  nullable: true
                  description: |-
                    When Site Inspection Mode is Appraisal (2), and Appraisal Type is Other (3)
                valuation_current_date:
                  type: number
                  nullable: true
                  description: |-
                    When Site Inspection Mode is Appraisal (2)
                investor_funding_mode:
                  type: integer
                  description: |-
                    When Loan Type is Construction (1) or Fix & Flip (3), Investors > Funding Mode can be specified
                    0: investors contribute to each advance/draw
                    1: investors contribute to total facility upfront
                projected_value:
                  type: number
                  nullable: true
                  description: |-
                    When Loan Type is Construction (1)
                repair_cost:
                  type: number
                  nullable: true
                  description: |-
                    When Loan Type is Fix & Flip (3)
                land_value:
                  type: number
                  nullable: true
                  description: |-
                    When Loan Type is Construction (1)
                closing_costs:
                  type: number
                closing_direct:
                  type: integer
                deposit_fee:
                  type: number
                  nullable: true
                deposit_collect_date:
                  type: integer
                  nullable: true
                  description: |-
                    When alphamodule Payment out of Closing is not enabled
                seller_name:
                  type: string
                  nullable: true
                title_company_number:
                  type: string
                  nullable: true
                title_company:
                  $ref: "#/components/schemas/Titlecompanies"
                title_company_staff:
                  $ref: "#/components/schemas/Titlecompanystaff"
                pay_directly_to_investor:
                  type: integer
                  description: |-
                    Default 0.
                    0: Not paid directly to investor
                    1: Paid directly to investor
                lawyer_fee_lender:
                  type: number
                propertyjurisdiction:
                  type: string
                  nullable: true
                subdivision_subsection:
                  type: string
                  nullable: true
                lawyer_staff_lender:
                  $ref: "#/components/schemas/Lawyerstaff"
                appraiser_staff:
                  $ref: "#/components/schemas/Appraiserstaff"
                conditions:
                  type: array
                  items:
                    $ref: "#/components/schemas/Conditions"
                accompanying_documents:
                  type: array
                  items:
                    $ref: "#/components/schemas/Documentcategories"
                document_categories:
                  type: array
                  items:
                    $ref: "#/components/schemas/Documentcategories"
                notes:
                  type: array
                  items:
                    $ref: "#/components/schemas/Loan_note"
                custom_fields:
                  type: array
                  items: {}
                propertylronum:
                  type: number
                  nullable: true
                propertypin:
                  type: string
                  nullable: true
                propertypintail:
                  type: string
                  nullable: true
                stdchargetermsfilenumber:
                  type: string
                  nullable: true
                propertyestate:
                  type: number
                  nullable: true
                xpropertyid:
                  type: string
                  nullable: true
                loaninterestadjustmentdate:
                  type: number
                  nullable: true
                loanlastpaymentdate:
                  type: number
                  nullable: true
                loanpaymentamountpercycle:
                  type: number
                  nullable: true
                dry_run:
                  type: integer
                  nullable: true
                  description: |-
                    Field used for debugging purposes internally.
                debug:
                  type: string
                  description: |-
                    internal purpose
                propertytaxid:
                  type: string
                  nullable: true
                document_upload_url:
                  type: string
                  nullable: true
                  description: |-
                    A pre-generated link redirecting the user to the secure document upload portal.
                propertyisnewhomewarranty:
                  type: number
                  nullable: true
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: object
                    properties:
                      loan:
                        $ref: "#/components/schemas/Loans"
  /loans/list:
    post:
      tags:
        - loans
      description: |-
        Changes
          
          - Version 2
            - Return Loan ID's only.
            - e.g. `{ "count": 2, "result": { "loans": [{"loan_id": 111}, {"loan_id": 222}] } }`
            - Use `/loans/get` to get full information of a loan.
          - Version 1
            - Return loans with full sub entities e.g. Borrowers in full detail
      parameters:
        - $ref: "#/components/parameters/startParam"
        - name: sort_by
          in: query
          description: |-
            - Ascending order (default)
              
              Sort `loan_id` in ascending order: `/loans/list/?sort_by=+loan_id` which is the default and it is equivalent to `/loans/list/?sort_by=loan_id`
            
            - Descending order
              
              Sort `loan_id` in descending order: `/loans/list/?sort_by=-loan_id`
            
            - Sort multiple fields
              
              Sort closing_date in descending order and loan_id in descending order: `/loans/list/?sort_by=-closing_date,-loan_id`
          required: false
          style: form
          schema:
            type: array
            minItems: 0
            uniqueItems: true
            items:
              type: string
              pattern: '^[\-\+]?(loan_id|loan_seq_id|x_loan_id|gsid|loan_title|loan_title_x|status|substatus|purpose|purpose_text|creation_date|closing_date|deadline_to_accept_date|eft_name|eft_transit|eft_account|eft_account_type|eft_bank_id|eft_target|property_tax_lender_pays|condo_fees_lender_pays|site_inspection_mode|site_inspection_fee|appraisal_type|appraisal_fee|appraisal_no_charge_to_borrower|municipal_assessment_year|other_valuation_description|valuation_current_date|investor_funding_mode|projected_value|repair_cost|land_value|closing_costs|closing_direct|deposit_fee|deposit_collect_date|seller_name|title_company_number|pay_directly_to_investor|lawyer_fee_lender|propertyjurisdiction|subdivision_subsection|propertylronum|propertypin|propertypintail|stdchargetermsfilenumber|propertyestate|xpropertyid|loaninterestadjustmentdate|loanlastpaymentdate|loanpaymentamountpercycle|dry_run|propertytaxid|document_upload_url|propertyisnewhomewarranty)$'
        - name: loan_id
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: loan_seq_id
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: x_loan_id
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: gsid
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: loan_title
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: loan_title_x
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: status
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: substatus
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: purpose
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: purpose_text
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: creation_date
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: closing_date
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: deadline_to_accept_date
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: eft_name
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: eft_transit
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: eft_account
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: eft_account_type
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: eft_bank_id
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: eft_target
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: property_tax_lender_pays
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: condo_fees_lender_pays
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: site_inspection_mode
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: site_inspection_fee
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterNumber"
        - name: appraisal_type
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: appraisal_fee
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterNumber"
        - name: appraisal_no_charge_to_borrower
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: municipal_assessment_year
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: other_valuation_description
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: valuation_current_date
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterNumber"
        - name: investor_funding_mode
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: projected_value
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterNumber"
        - name: repair_cost
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterNumber"
        - name: land_value
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterNumber"
        - name: closing_costs
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterNumber"
        - name: closing_direct
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: deposit_fee
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterNumber"
        - name: deposit_collect_date
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: seller_name
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: title_company_number
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: pay_directly_to_investor
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: lawyer_fee_lender
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterNumber"
        - name: propertyjurisdiction
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: subdivision_subsection
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: propertylronum
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterNumber"
        - name: propertypin
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: propertypintail
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: stdchargetermsfilenumber
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: propertyestate
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterNumber"
        - name: xpropertyid
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: loaninterestadjustmentdate
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterNumber"
        - name: loanlastpaymentdate
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterNumber"
        - name: loanpaymentamountpercycle
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterNumber"
        - name: dry_run
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: propertytaxid
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: document_upload_url
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: propertyisnewhomewarranty
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterNumber"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                acknowledge:
                  type: string
                  description: |-
                    If provided, the changes of previously returned loans (using filter=updated|created) are acknowledged. No loan will be returned
                response_field_whitelist:
                  type: array
                  nullable: true
                  items: {}
                  description: |-
                    If defined, the loan will be returned with those fields only.
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: integer
                  result:
                    type: object
                    properties:
                      loans:
                        type: array
                        items:
                          $ref: "#/components/schemas/Loans"
  /updated_loans/get:
    post:
      tags:
        - updated_loans
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                updated_field:
                  type: string
                  nullable: true
                  description: |-
                    The Recently Updated Loan(s) filtered out by the loan changes for the field specified on this request field.For eg - substatus gives all recent loans whose substatus has be update/changed.
                updated_to:
                  type: string
                  nullable: true
                  description: |-
                    The Recently Updated Loan(s) filtered out by the loan changes for the field value specified on this request field.(Note - to be used along with the updated_field request parameter)
                _zap_static_hook_code:
                  type: string
                  nullable: true
                  description: |-
                    This is a field for recording static hook code from Zapier triggers.
                substatus_changed_to:
                  type: string
                  nullable: true
                  description: |-
                    The Recently Updated Loan(s) whose substatus has been changed to the provided value.
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Updated_loans"
  /updated_loans/list:
    post:
      tags:
        - updated_loans
      description: |-
        An acknowledge token will be given in the response. e.g.
          
          `{ "count": 2, "acknowledge": "token", "result": { "loans": [{"loan_id": 111}, {"loan_id": 222}] } }`
          
          You have to follow this by an acknowledge request to tell MA that the updated loans are recognized by you. e.g.
          
          `URL: /updated_loans/ack` with the JSON POST request body:
          
          `{"acknowledge": "token"}`
          
          The response looks like:
          
          `{ "count": 0, "acknowledged": 41, "result": { "loans": [] } }`
          
          Updated / Created entity items that are not acknowledged by the lender beyond 48 hours will be purged.
          
          This List and Acknowledge mechanism provides a way for lenders to synchronize changes from MA to other platforms.
      parameters:
        - $ref: "#/components/parameters/startParam"
        - name: sort_by
          in: query
          description: |-
            - Ascending order (default)
              
              Sort `loan_id` in ascending order: `/loans/list/?sort_by=+loan_id` which is the default and it is equivalent to `/loans/list/?sort_by=loan_id`
            
            - Descending order
              
              Sort `loan_id` in descending order: `/loans/list/?sort_by=-loan_id`
            
            - Sort multiple fields
              
              Sort closing_date in descending order and loan_id in descending order: `/loans/list/?sort_by=-closing_date,-loan_id`
          required: false
          style: form
          schema:
            type: array
            minItems: 0
            uniqueItems: true
            items:
              type: string
              pattern: '^[\-\+]?(loan_id)$'
        - name: loan_id
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterNumber"
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: integer
                  acknowledge:
                    type: string
                  result:
                    type: object
                    properties:
                      loans:
                        type: array
                        items:
                          $ref: "#/components/schemas/Updated_loans"
  /updated_loans/ack:
    post:
      tags:
        - updated_loans
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                acknowledge:
                  type: string
                  description: |-
                    Recently updated loans specified in the token will be acknowledged. No loan will be returned
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: object
                    properties:
                      loans:
                        type: array
                        items:
                          $ref: "#/components/schemas/Updated_loans"
  /created_loans/get:
    post:
      tags:
        - created_loans
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Created_loans"
  /created_loans/list:
    post:
      tags:
        - created_loans
      description: |-
        An acknowledge token will be given in the response. e.g.
          
          `{ "count": 2, "acknowledge": "token", "result": { "loans": [{"loan_id": 111}, {"loan_id": 222}] } }`
          
          You have to follow this by an acknowledge request to tell MA that the updated loans are recognized by you. e.g.
          
          `URL: /created_loans/ack` with the JSON POST request body:
          
          `{"acknowledge": "token"}`
          
          The response looks like:
          
          `{ "count": 0, "acknowledged": 41, "result": { "loans": [] } }`
          
          Updated / Created entity items that are not acknowledged by the lender beyond 48 hours will be purged.
          
          This List and Acknowledge mechanism provides a way for lenders to synchronize changes from MA to other platforms.
      parameters:
        - $ref: "#/components/parameters/startParam"
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: integer
                  acknowledge:
                    type: string
                  result:
                    type: object
                    properties:
                      loans:
                        type: array
                        items:
                          $ref: "#/components/schemas/Created_loans"
  /created_loans/ack:
    post:
      tags:
        - created_loans
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                acknowledge:
                  type: string
                  description: |-
                    Recently created loans specified in the token will be acknowledged. No loan will be returned
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: object
                    properties:
                      loans:
                        type: array
                        items:
                          $ref: "#/components/schemas/Created_loans"
  /properties/get:
    post:
      tags:
        - properties
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                loan_id:
                  type: number
                  description: |-
                    If provided, response is the loan's main property
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Properties"
  /mortgages/get:
    post:
      tags:
        - mortgages
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                loan_id:
                  type: number
                  description: |-
                    If provided, response is the loan's mortgage
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Mortgages"
  /existingmortgages/get:
    post:
      tags:
        - existingmortgages
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: number
                response_field_whitelist:
                  type: array
                  nullable: true
                  items: {}
                  description: |-
                    If defined, the existing mortgage will be returned with those fields only.
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Existingmortgages"
  /existingmortgages/create:
    post:
      tags:
        - existingmortgages
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                loan_id:
                  type: integer
                type:
                  type: integer
                  nullable: true
                  enum:
                    - 1
                    - 2
                    - 3
                    - 4
                    - 5
                    - 6
                    - 7
                  description: |-
                    Enums:
                    1 - First
                    2 - Second
                    3 - Third
                    4 - Fourth
                    5 - Fifth
                    6 - Sixth
                    7 - Seventh
                holder:
                  type: string
                  nullable: true
                face_value:
                  type: number
                  nullable: true
                balance:
                  type: number
                  nullable: true
                payment:
                  type: number
                frequency:
                  type: integer
                  nullable: true
                  enum:
                    - 1
                    - 2
                    - 0
                  description: |-
                    Enums:
                    1 - Weekly
                    2 - Biweekly
                    0 - Monthly
                maturity_date:
                  type: integer
                  nullable: true
                rate_type:
                  type: integer
                  nullable: true
                  enum:
                    - 0
                    - 1
                    - 2
                    - 3
                    - 4
                    - 5
                  description: |-
                    Enums:
                    0 - 
                    1 - Fixed
                    2 - Variable
                    3 - Adjustable
                    4 - Capped Variable
                    5 - Buydown
                term_type:
                  type: integer
                  nullable: true
                  enum:
                    - 0
                    - 1
                    - 2
                    - 3
                    - 4
                  description: |-
                    Enums:
                    0 - Fully Closed
                    1 - Closed Variable
                    2 - Closed, Then Open
                    3 - Fully Open
                    4 - Minimum, Then Open
                interest_rate:
                  type: number
                  nullable: true
                prepayment_penalty:
                  type: number
                  nullable: true
                custom_fields:
                  type: array
                  items: {}
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: object
                    properties:
                      existing_mortgage:
                        $ref: "#/components/schemas/Existingmortgages"
  /borrowers/get:
    post:
      tags:
        - borrowers
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                borrower_id:
                  type: integer
                  description: |-
                    If provided, response is the borrower details.
                response_field_whitelist:
                  type: array
                  nullable: true
                  items: {}
                  description: |-
                    If defined, the borrower will be returned with those fields only.
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Borrowers"
  /borrowers/create:
    post:
      tags:
        - borrowers
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                duplication_mode:
                  type: integer
                  enum:
                    - 0
                    - 1
                  description: |-
                    Given that Company Settings > Duplication are setup for the entity, and the provided record has duplicate(s):
                    If not specified, 0 will be the default.
                    If Duplication Action is Rejection, 0 is always used.
                    Enums:
                    0 - No record will be created and the returned record is the first found duplicate. When Duplication Action is Rejection, this mode is always used.
                    1 - The record will be created even though the new record will create a duplicate. When Duplication Action is Rejection, this mode is ignored.
                x_borrower_id:
                  type: string
                  nullable: true
                first_name:
                  type: string
                middle_name:
                  type: string
                  nullable: true
                last_name:
                  type: string
                name_prefix:
                  type: integer
                  nullable: true
                  enum:
                    - 0
                    - 1
                    - 2
                    - 3
                    - 4
                    - 5
                    - 6
                    - 7
                    - 8
                    - 9
                  description: |-
                    Enums:
                    0 - 
                    1 - Mr
                    2 - Miss
                    3 - Mrs
                    4 - Ms
                    5 - Dr
                    6 - Rev
                    7 - Judge
                    8 - Madam
                    9 - Sir
                name_suffix:
                  type: integer
                  nullable: true
                  enum:
                    - 0
                    - 1
                    - 2
                    - 3
                    - 4
                    - 5
                  description: |-
                    Enums:
                    0 - 
                    1 - Jr
                    2 - Sr
                    3 - II
                    4 - III
                    5 - IV
                vesting_name:
                  type: string
                dob:
                  type: integer
                  nullable: true
                ssn:
                  type: string
                  nullable: true
                marital:
                  type: string
                credit_score:
                  type: integer
                  nullable: true
                email:
                  type: string
                homephone:
                  type: string
                mobile:
                  type: string
                  nullable: true
                workphone:
                  type: string
                  nullable: true
                address:
                  $ref: "#/components/schemas/Addresses"
                residential_status:
                  type: integer
                  nullable: true
                  enum:
                    - 0
                    - 1
                    - 2
                    - 3
                  description: |-
                    Enums:
                    0 - 
                    1 - Own
                    2 - Rent
                    3 - Live with Parents
                residence_start_date:
                  type: integer
                  nullable: true
                employments:
                  type: array
                  items:
                    $ref: "#/components/schemas/Employments"
                incomes:
                  type: array
                  items:
                    $ref: "#/components/schemas/Incomes"
                debts:
                  type: array
                  items:
                    $ref: "#/components/schemas/Debts"
                all_debts:
                  type: array
                  items:
                    $ref: "#/components/schemas/Debts"
                assets:
                  type: array
                  items:
                    $ref: "#/components/schemas/Assets"
                shareholders:
                  type: array
                  items:
                    $ref: "#/components/schemas/Shareholders"
                custom_fields:
                  type: array
                  items: {}
                clientnote:
                  type: string
                  nullable: true
                eftname:
                  type: string
                eftbankid:
                  type: integer
                  nullable: true
                efttransit:
                  type: string
                  nullable: true
                eftaccount:
                  type: string
                  nullable: true
                eftaccounttype:
                  type: integer
                  enum:
                    - 0
                    - 1
                    - 2
                  description: |-
                    Enums:
                    0 - Checking
                    1 - Savings
                    2 - Loan Account
                businessnumber:
                  type: string
                  nullable: true
                iscorporation:
                  type: integer
                  nullable: true
                  description: |-
                    Default 0. 0: Individual. 1: Corporation
                corptype:
                  type: integer
                  nullable: true
                  enum:
                    - 0
                    - 1
                    - 2
                    - 3
                    - 4
                    - 5
                    - 7
                    - 9
                    - 12
                  description: |-
                    Enums:
                    0 - Individual
                    1 - Corporation
                    2 - General Partnership
                    3 - LLC - Member Managed
                    4 - LLC - Manager Managed
                    5 - Limited Partnership
                    7 - PLLC
                    9 - Trust
                    12 - Inc
                corpname:
                  type: string
                  nullable: true
                l_is_guarantor:
                  type: integer
                  description: |-
                    0: Borrower, 1: Guarantor
                l_is_main_client:
                  type: integer
                  description: |-
                    0: Not Main, 1: Main
                consentingspousefname:
                  type: string
                  description: |-
                    Consenting Spouse First Name
                consentingspousemname:
                  type: string
                  description: |-
                    Consenting Spouse Middle Name
                consentingspouselname:
                  type: string
                  description: |-
                    Consenting Spouse Last Name
                dry_run:
                  type: integer
                  nullable: true
                  description: |-
                    Field used for debugging purposes internally.
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: object
                    properties:
                      borrower:
                        $ref: "#/components/schemas/Borrowers"
  /borrowers/list:
    post:
      tags:
        - borrowers
      description: |-
        - Return Borrower ID's only. e.g. 
          ```json
          {
              "count": 2,
              "result": {
                  "borrowers": [
                      {"borrower_id": 111},
                      {"borrower_id": 222}
                  ]
              }
          }
          ```
      parameters:
        - $ref: "#/components/parameters/startParam"
        - name: sort_by
          in: query
          description: |-
            - Ascending order (default)
              
              Sort `loan_id` in ascending order: `/loans/list/?sort_by=+loan_id` which is the default and it is equivalent to `/loans/list/?sort_by=loan_id`
            
            - Descending order
              
              Sort `loan_id` in descending order: `/loans/list/?sort_by=-loan_id`
            
            - Sort multiple fields
              
              Sort closing_date in descending order and loan_id in descending order: `/loans/list/?sort_by=-closing_date,-loan_id`
          required: false
          style: form
          schema:
            type: array
            minItems: 0
            uniqueItems: true
            items:
              type: string
              pattern: '^[\-\+]?(borrower_id|x_borrower_id|borrower_loan_id|first_name|middle_name|last_name|name_prefix|name_suffix|vesting_name|dob|marital|credit_score|email|homephone|mobile|workphone|residential_status|residence_start_date|clientnote|eftname|eftbankid|efttransit|eftaccount|eftaccounttype|businessnumber|iscorporation|corptype|corpname|l_is_guarantor|l_is_main_client|consentingspousefname|consentingspousemname|consentingspouselname|dry_run)$'
        - name: borrower_id
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: x_borrower_id
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: borrower_loan_id
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: first_name
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: middle_name
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: last_name
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: name_prefix
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: name_suffix
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: vesting_name
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: dob
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: marital
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: credit_score
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: email
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: homephone
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: mobile
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: workphone
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: residential_status
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: residence_start_date
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: clientnote
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: eftname
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: eftbankid
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: efttransit
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: eftaccount
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: eftaccounttype
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: businessnumber
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: iscorporation
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: corptype
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: corpname
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: l_is_guarantor
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: l_is_main_client
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: consentingspousefname
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: consentingspousemname
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: consentingspouselname
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: dry_run
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: integer
                  result:
                    type: object
                    properties:
                      borrowers:
                        type: array
                        items:
                          $ref: "#/components/schemas/Borrowers"
  /conditions/get:
    post:
      tags:
        - conditions
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                condition_id:
                  type: integer
                  description: |-
                    If provided, response is a condition
                condition_property_id:
                  type: integer
                  description: |-
                    If provided along with Condition ID, response is a loan condition for the property
                condition_type:
                  type: integer
                  enum:
                    - 0
                    - 1
                  description: |-
                    Enums:
                    0 - Single Condition
                    1 - Condition Per Property
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Conditions"
  /conditions/list:
    post:
      tags:
        - conditions
      parameters:
        - $ref: "#/components/parameters/startParam"
        - name: sort_by
          in: query
          description: |-
            - Ascending order (default)
              
              Sort `loan_id` in ascending order: `/loans/list/?sort_by=+loan_id` which is the default and it is equivalent to `/loans/list/?sort_by=loan_id`
            
            - Descending order
              
              Sort `loan_id` in descending order: `/loans/list/?sort_by=-loan_id`
            
            - Sort multiple fields
              
              Sort closing_date in descending order and loan_id in descending order: `/loans/list/?sort_by=-closing_date,-loan_id`
          required: false
          style: form
          schema:
            type: array
            minItems: 0
            uniqueItems: true
            items:
              type: string
              pattern: '^[\-\+]?(condition_id|condition_property_id|condition_type|condition_name|condition_text|borrowerlinktext|additional_description|status|condition_status|fulfiller)$'
        - name: condition_id
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: condition_property_id
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: condition_type
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: condition_name
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: condition_text
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: borrowerlinktext
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: additional_description
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: status
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: condition_status
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: fulfiller
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                loan_id:
                  type: number
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: integer
                  result:
                    type: object
                    properties:
                      conditions:
                        type: array
                        items:
                          $ref: "#/components/schemas/Conditions"
  /documentcategories/list:
    post:
      tags:
        - documentcategories
      parameters:
        - $ref: "#/components/parameters/startParam"
        - name: sort_by
          in: query
          description: |-
            - Ascending order (default)
              
              Sort `loan_id` in ascending order: `/loans/list/?sort_by=+loan_id` which is the default and it is equivalent to `/loans/list/?sort_by=loan_id`
            
            - Descending order
              
              Sort `loan_id` in descending order: `/loans/list/?sort_by=-loan_id`
            
            - Sort multiple fields
              
              Sort closing_date in descending order and loan_id in descending order: `/loans/list/?sort_by=-closing_date,-loan_id`
          required: false
          style: form
          schema:
            type: array
            minItems: 0
            uniqueItems: true
            items:
              type: string
              pattern: '^[\-\+]?(category_id|category_name)$'
        - name: category_id
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: category_name
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                loan_id:
                  type: number
                mode:
                  type: integer
                  enum:
                    - 0
                    - 1
                  description: |-
                    Default 0.
                    Enums:
                    0 - Default. List files under a document category
                    1 - No files are listed under a document category
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: integer
                  result:
                    type: object
                    properties:
                      documentcategories:
                        type: array
                        items:
                          $ref: "#/components/schemas/Documentcategories"
  /loanfiles/get:
    post:
      tags:
        - loanfiles
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                file_id:
                  type: integer
                  description: |-
                    If provided, response is a file
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Loanfiles"
  /fees/get:
    post:
      tags:
        - fees
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                loan_id:
                  type: integer
                  description: |-
                    If provided, response are the fees of the loan's mortgage
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Fees"
  /parentbrokers/get:
    post:
      tags:
        - parentbrokers
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Parentbrokers"
  /parentbrokers/create:
    post:
      tags:
        - parentbrokers
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                gsid:
                  type: integer
                name:
                  type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: object
                    properties:
                      parent_broker:
                        $ref: "#/components/schemas/Parentbrokers"
  /brokers/get:
    post:
      tags:
        - brokers
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                broker_id:
                  type: integer
                loan_id:
                  type: integer
                  description: |-
                    If provided, return the loan's broker staff's broker.
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Brokers"
  /brokers/create:
    post:
      tags:
        - brokers
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                duplication_mode:
                  type: integer
                  enum:
                    - 0
                    - 1
                  description: |-
                    Given that Company Settings > Duplication are setup for the entity, and the provided record has duplicate(s):
                    If not specified, 0 will be the default.
                    If Duplication Action is Rejection, 0 is always used.
                    Enums:
                    0 - No record will be created and the returned record is the first found duplicate. When Duplication Action is Rejection, this mode is always used.
                    1 - The record will be created even though the new record will create a duplicate. When Duplication Action is Rejection, this mode is ignored.
                x_broker_id:
                  type: string
                  nullable: true
                parent_broker:
                  $ref: "#/components/schemas/Parentbrokers"
                name:
                  type: string
                  nullable: true
                address:
                  type: string
                city:
                  type: string
                suburb:
                  type: string
                county:
                  type: string
                province:
                  type: string
                zip:
                  type: string
                phone:
                  type: string
                fax:
                  type: string
                cheque:
                  type: string
                cheque_use_eft:
                  type: integer
                  nullable: true
                cheque_eft_name:
                  type: string
                cheque_eft_bank_id:
                  type: integer
                  nullable: true
                  enum:
                    - 0
                    - 1
                    - 2
                    - 3
                    - 4
                    - 6
                    - 10
                    - 16
                    - 30
                    - 39
                    - 117
                    - 177
                    - 219
                    - 241
                    - 260
                    - 275
                    - 307
                    - 308
                    - 309
                    - 318
                    - 320
                    - 321
                    - 326
                    - 340
                    - 352
                    - 370
                    - 374
                    - 383
                    - 509
                    - 532
                    - 540
                    - 568
                    - 608
                    - 614
                    - 621
                    - 623
                    - 703
                    - 809
                    - 815
                    - 819
                    - 828
                    - 829
                    - 837
                    - 839
                    - 842
                    - 849
                    - 853
                    - 865
                    - 879
                    - 889
                    - 890
                    - 899
                  description: |-
                    Only for Canada.
                    Enums:
                    0 - N/A
                    1 - BMO
                    2 - Scotia
                    3 - RBC
                    4 - TD
                    6 - National
                    10 - CIBC
                    16 - HSBC
                    30 - Canadian Western Bank / Western Union
                    39 - Laurentian
                    117 - Government
                    177 - Bank of Canada
                    219 - ATB
                    241 - Bank of America
                    260 - Citi
                    275 - KEB Hana
                    307 - Industrial and Commercial Bank of China (Canada)
                    308 - Bank of China
                    309 - Citizens
                    318 - U.S. Bank National Association
                    320 - PC Financial
                    321 - Habib Canadian Bank
                    326 - Simplii Financial
                    340 - ICICI Bank of Canada
                    352 - Digital Commerce Bank
                    370 - Wealth One Bank of Canada
                    374 - Motus Bank
                    383 - Peoples Bank of Canada
                    509 - The Canadian Trust Company
                    532 - Effort Trust Company
                    540 - Manulife Bank
                    568 - Peace Hills Trust Company
                    608 - Banque Alterna
                    614 - ING / Tangerine
                    621 - Peoples Trust Company
                    623 - Equitable Bank
                    703 - Wealthsimple Investments Inc.
                    809 - Central 1 Credit Union BC
                    815 - Desjardins
                    819 - La Fédération des caisses populaires du Manitoba Inc.
                    828 - Central 1 Credit Union Ontario
                    829 - La Fédération des caisses populaires de l'Ontario Inc.
                    837 - Meridian Credit Union
                    839 - Central 1 Credit Union Atlantic
                    842 - Alterna Savings
                    849 - Bayview Credit Union
                    853 - Concentra Financial Services
                    865 - UNI Financial Coop
                    879 - Co-op Credit Society of Manitoba
                    889 - Credit Union Central of Saskatchewan
                    890 - Alliance des caisses populaires de l'Ontario Limitée
                    899 - Credit Union Alberta
                cheque_eft_transit:
                  type: string
                cheque_eft_account:
                  type: string
                cheque_eft_account_type:
                  type: integer
                  enum:
                    - 0
                    - 1
                    - 2
                  description: |-
                    Only for US.
                    Enums:
                    0 - Checking
                    1 - Savings
                    2 - Loan Account
                licence:
                  type: string
                  nullable: true
                note:
                  type: string
                  nullable: true
                broker_staff_list:
                  type: array
                  items:
                    $ref: "#/components/schemas/Brokerstaff"
                custom_fields:
                  type: array
                  items: {}
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: object
                    properties:
                      broker:
                        $ref: "#/components/schemas/Brokers"
  /brokerstaff/get:
    post:
      tags:
        - brokerstaff
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                broker_staff_id:
                  type: integer
                loan_id:
                  type: integer
                  description: |-
                    If provided, return the loan's broker staff.
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Brokerstaff"
  /brokerstaff/create:
    post:
      tags:
        - brokerstaff
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                duplication_mode:
                  type: integer
                  enum:
                    - 0
                    - 1
                  description: |-
                    Given that Company Settings > Duplication are setup for the entity, and the provided record has duplicate(s):
                    If not specified, 0 will be the default.
                    If Duplication Action is Rejection, 0 is always used.
                    Enums:
                    0 - No record will be created and the returned record is the first found duplicate. When Duplication Action is Rejection, this mode is always used.
                    1 - The record will be created even though the new record will create a duplicate. When Duplication Action is Rejection, this mode is ignored.
                broker_staff_id:
                  type: integer
                broker_id:
                  type: integer
                x_broker_staff_id:
                  type: string
                  nullable: true
                inactive:
                  type: integer
                  description: |-
                    Default 0. 0: false, 1: true.
                type:
                  type: integer
                  enum:
                    - 0
                    - 1
                    - 2
                  description: |-
                    Enums:
                    0 - Partner
                    1 - Broker
                    2 - Assistant
                first_name:
                  type: string
                last_name:
                  type: string
                phone:
                  type: string
                email:
                  type: string
                licence:
                  type: string
                  nullable: true
                licence_type:
                  type: string
                  nullable: true
                licence_expiry:
                  type: integer
                  nullable: true
                cheques:
                  type: array
                  items:
                    $ref: "#/components/schemas/Brokerstaffcheques"
                custom_fields:
                  type: array
                  items: {}
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: object
                    properties:
                      broker_staff:
                        $ref: "#/components/schemas/Brokerstaff"
  /brokerstaffcheques/get:
    post:
      tags:
        - brokerstaffcheques
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                broker_staff_cheque_id:
                  type: integer
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Brokerstaffcheques"
  /brokerstaffcheques/create:
    post:
      tags:
        - brokerstaffcheques
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                broker_staff_cheque_id:
                  type: integer
                broker_staff_id:
                  type: integer
                cheque_name:
                  type: string
                cheque_use_eft:
                  type: integer
                cheque_eft_name:
                  type: string
                cheque_eft_bank_id:
                  type: integer
                  nullable: true
                  enum:
                    - 0
                    - 1
                    - 2
                    - 3
                    - 4
                    - 6
                    - 10
                    - 16
                    - 30
                    - 39
                    - 117
                    - 177
                    - 219
                    - 241
                    - 260
                    - 275
                    - 307
                    - 308
                    - 309
                    - 318
                    - 320
                    - 321
                    - 326
                    - 340
                    - 352
                    - 370
                    - 374
                    - 383
                    - 509
                    - 532
                    - 540
                    - 568
                    - 608
                    - 614
                    - 621
                    - 623
                    - 703
                    - 809
                    - 815
                    - 819
                    - 828
                    - 829
                    - 837
                    - 839
                    - 842
                    - 849
                    - 853
                    - 865
                    - 879
                    - 889
                    - 890
                    - 899
                  description: |-
                    Only for Canada.
                    Enums:
                    0 - N/A
                    1 - BMO
                    2 - Scotia
                    3 - RBC
                    4 - TD
                    6 - National
                    10 - CIBC
                    16 - HSBC
                    30 - Canadian Western Bank / Western Union
                    39 - Laurentian
                    117 - Government
                    177 - Bank of Canada
                    219 - ATB
                    241 - Bank of America
                    260 - Citi
                    275 - KEB Hana
                    307 - Industrial and Commercial Bank of China (Canada)
                    308 - Bank of China
                    309 - Citizens
                    318 - U.S. Bank National Association
                    320 - PC Financial
                    321 - Habib Canadian Bank
                    326 - Simplii Financial
                    340 - ICICI Bank of Canada
                    352 - Digital Commerce Bank
                    370 - Wealth One Bank of Canada
                    374 - Motus Bank
                    383 - Peoples Bank of Canada
                    509 - The Canadian Trust Company
                    532 - Effort Trust Company
                    540 - Manulife Bank
                    568 - Peace Hills Trust Company
                    608 - Banque Alterna
                    614 - ING / Tangerine
                    621 - Peoples Trust Company
                    623 - Equitable Bank
                    703 - Wealthsimple Investments Inc.
                    809 - Central 1 Credit Union BC
                    815 - Desjardins
                    819 - La Fédération des caisses populaires du Manitoba Inc.
                    828 - Central 1 Credit Union Ontario
                    829 - La Fédération des caisses populaires de l'Ontario Inc.
                    837 - Meridian Credit Union
                    839 - Central 1 Credit Union Atlantic
                    842 - Alterna Savings
                    849 - Bayview Credit Union
                    853 - Concentra Financial Services
                    865 - UNI Financial Coop
                    879 - Co-op Credit Society of Manitoba
                    889 - Credit Union Central of Saskatchewan
                    890 - Alliance des caisses populaires de l'Ontario Limitée
                    899 - Credit Union Alberta
                cheque_eft_transit:
                  type: string
                cheque_eft_account:
                  type: string
                cheque_eft_account_type:
                  type: integer
                  enum:
                    - 0
                    - 1
                    - 2
                  description: |-
                    US only
                    Enums:
                    0 - Checking
                    1 - Savings
                    2 - Loan Account
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: object
                    properties:
                      cheque:
                        $ref: "#/components/schemas/Brokerstaffcheques"
  /appraisers/get:
    post:
      tags:
        - appraisers
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                appraiser_id:
                  type: integer
                loan_id:
                  type: integer
                  description: |-
                    If provided, return the loan's appraiser.
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Appraisers"
  /appraiserstaff/get:
    post:
      tags:
        - appraiserstaff
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                appraiser_staff_id:
                  type: integer
                loan_id:
                  type: integer
                  description: |-
                    If provided, return the loan's appraiser staff.
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Appraiserstaff"
  /titlecompanystaff/get:
    post:
      tags:
        - titlecompanystaff
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                staff_id:
                  type: integer
                loan_id:
                  type: integer
                  description: |-
                    If provided, return the loan's title company's staff.
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Titlecompanystaff"
  /employments/get:
    post:
      tags:
        - employments
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                employment_id:
                  type: integer
                  description: |-
                    If provided, return the employment.
                response_field_whitelist:
                  type: array
                  nullable: true
                  items: {}
                  description: |-
                    If defined, the employment list will include those fields (only basic fields allowed).
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Employments"
  /employments/list:
    post:
      tags:
        - employments
      parameters:
        - $ref: "#/components/parameters/startParam"
        - name: sort_by
          in: query
          description: |-
            - Ascending order (default)
              
              Sort `loan_id` in ascending order: `/loans/list/?sort_by=+loan_id` which is the default and it is equivalent to `/loans/list/?sort_by=loan_id`
            
            - Descending order
              
              Sort `loan_id` in descending order: `/loans/list/?sort_by=-loan_id`
            
            - Sort multiple fields
              
              Sort closing_date in descending order and loan_id in descending order: `/loans/list/?sort_by=-closing_date,-loan_id`
          required: false
          style: form
          schema:
            type: array
            minItems: 0
            uniqueItems: true
            items:
              type: string
              pattern: '^[\-\+]?(employment_id|name|phone|phone_ext|industry|type|previous_employer|history_status|address|length|salary|occupation|job_title|frequency_of_payment|start_date|end_date|current_employment|self_employed)$'
        - name: employment_id
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: name
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: phone
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: phone_ext
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: industry
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: type
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: previous_employer
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: history_status
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: address
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: length
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: salary
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: occupation
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: job_title
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: frequency_of_payment
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: start_date
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: end_date
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: current_employment
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: self_employed
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                borrower_id:
                  type: number
                  description: |-
                    If provided, response is the Borrowers's employments
                response_field_whitelist:
                  type: array
                  nullable: true
                  items: {}
                  description: |-
                    If defined, the employment list will include those fields (only basic fields allowed).
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: integer
                  result:
                    type: object
                    properties:
                      employments:
                        type: array
                        items:
                          $ref: "#/components/schemas/Employments"
  /joints/get:
    post:
      tags:
        - joints
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Joints"
  /investments/get:
    post:
      tags:
        - investments
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                loan_id:
                  type: integer
                  description: |-
                    If provided, return the loan's investors' investments
                id:
                  type: integer
                  description: |-
                    If provided, return the investment.
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Investments"
  /accounts/get:
    post:
      tags:
        - accounts
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                loan_id:
                  type: integer
                  description: |-
                    If provided, return the loan's investors' accounts
                account_id:
                  type: integer
                  description: |-
                    If provided, return the investor accounts
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Accounts"
  /accounts/create:
    post:
      tags:
        - accounts
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                account_id:
                  type: integer
                x_accountid:
                  type: string
                  nullable: true
                investor_id:
                  type: integer
                  description: |-
                    If provided, response is the investor's accounts
                internal_account_number:
                  type: string
                  nullable: true
                legal_name:
                  type: string
                vesting_name:
                  type: string
                  nullable: true
                  description: |-
                    Only for Account Types Individual and Joint in US. Options are: 
                    (blank): for Account Type: individual
                    a widow: for Account Type: individual
                    a widower: for Account Type: individual
                    a single woman: for Account Type: individual
                    a single man: for Account Type: individual
                    an unmarried woman: for Account Type: individual
                    an unmarried man: for Account Type: individual
                    a married man as his sole and separate property: for Account Type: individual
                    a married woman as her sole and separate property: for Account Type: individual
                    (blank): for Account Type: joint
                    husband and wife as joint tenants: for Account Type: joint
                    wife and husband as joint tenants: for Account Type: joint
                    husband and wife as community property with right of surivorship: for Account Type: joint
                    wife and husband as community property with right of surivorship: for Account Type: joint
                    husband and husband as joint tenants: for Account Type: joint
                    wife and wife as joint tenants: for Account Type: joint
                    Or any vesting name of your choice.
                check_type:
                  type: integer
                  nullable: true
                  enum:
                    - 0
                    - 1
                    - 2
                    - 3
                    - 4
                    - 5
                  description: |-
                    Enums:
                    0 - Individual
                    1 - Joint
                    2 - Company
                    3 - Trust
                    4 - Personal Trust
                    5 - In-Trust
                trust_type:
                  type: integer
                  nullable: true
                  enum:
                    - 0
                    - 1
                    - 2
                    - 3
                    - 4
                    - 5
                    - 6
                    - 17
                    - 18
                    - 19
                    - 20
                    - 21
                    - 22
                    - 30
                    - 31
                    - 7
                    - 8
                    - 9
                    - 10
                    - 11
                    - 12
                    - 13
                    - 14
                    - 15
                    - 16
                    - 23
                    - 24
                    - 25
                    - 26
                    - 27
                    - 28
                    - 29
                    - 32
                    - 33
                    - 34
                    - 35
                    - 36
                  description: |-
                    Enums:
                    0 - Standard for CA
                    1 - Olympia Trust Company for CA
                    2 - ComputerShare Trust Company of Canada for CA
                    3 - Canadian Western Trust Company for CA
                    4 - Blueshore Financial for CA
                    5 - Westminster Savings Credit Union for CA
                    6 - Community Trust for CA
                    17 - BMO Nesbitt Burns for CA
                    18 - Investor Company for CA
                    19 - National Bank Financial Inc. for CA
                    20 - Odlum Brown for CA
                    21 - Scotia Capital Inc. for CA
                    22 - Central 1 Credit Union for CA
                    30 - Raymond James Ltd. for CA
                    31 - Odyssey Trust Company for CA
                    7 - Pacific Premier Trust for US
                    8 - Provident Trust Group for US
                    9 - Forge Trust Co. for US
                    10 - Millennium Trust Company for US
                    11 - Equity Trust Company for US
                    12 - The Entrust Group, Inc. for US
                    13 - IRAR Trust Co. for US
                    14 - MidAtlantic IRA for US
                    15 - Vantage Retirement Plans for US
                    16 - Other Retirement Plans for US
                    23 - New Direction Trust Company for US
                    24 - RBC Capital Markets for US
                    25 - IRA Financial Trust Company for US
                    26 - American Estate & Trust for US
                    27 - National Financial Services for US
                    28 - Charles Schwab & Co for US
                    29 - Madison Trust Company for US
                    32 - Direct Trust Company for US
                    33 - Advanta IRA for US
                    34 - Inspira Financial Trust for US
                    35 - iPlan Group for US
                    36 - uDirect IRA Services for US
                plan_type:
                  type: integer
                  nullable: true
                  enum:
                    - 0
                    - 1
                    - 2
                    - 3
                    - 4
                    - 5
                    - 6
                    - 7
                    - 8
                    - 9
                    - 10
                    - 11
                    - 12
                    - 13
                    - 14
                    - 15
                    - 16
                    - 33
                    - 17
                    - 18
                    - 19
                    - 20
                    - 21
                    - 22
                    - 23
                    - 24
                    - 25
                    - 26
                    - 27
                    - 28
                    - 29
                    - 30
                    - 31
                    - 32
                  description: |-
                    Only for Account Type Trust
                    Enums:
                    0 -  for CA
                    1 - TFSA for CA
                    2 - RRSP for CA
                    3 - RESP for CA
                    4 - SDRSP for CA
                    5 - RRIF for CA
                    6 - LIRA for CA
                    7 - RSP for CA
                    8 - LRSP for CA
                    9 - RSP (Spousal) for CA
                    10 - RIF for CA
                    11 - RIF (Spousal) for CA
                    12 - RIF (Prescribed) for CA
                    13 - LIF for CA
                    14 - LRIF for CA
                    15 - RLIF for CA
                    16 - RLSP for CA
                    33 - FHSA for CA
                    17 -  for US
                    18 - IRA (Traditional) for US
                    19 - Roth IRA for US
                    20 - SEP IRA for US
                    21 - SIMPLE IRA for US
                    22 - 401(k) Plan for US
                    23 - 403(b) Plan for US
                    24 - 457 Plan for US
                    25 - Customdial IRA for US
                    26 - 529 Plan for US
                    27 - Coverdell Education Savings Accounts for US
                    28 - HSA for US
                    29 - PC Profit Sharing Plan & Trust for US
                    30 - Profit Sharing Plan for US
                    31 - Defined Benefit Plan for US
                    32 - Inherited IRA for US
                account_number:
                  type: string
                  nullable: true
                enable_withhold_tax:
                  type: integer
                  nullable: true
                withhold_tax:
                  type: number
                  nullable: true
                enable_eft:
                  type: integer
                eft_name:
                  type: string
                eft_bankid:
                  type: integer
                  enum:
                    - 0
                    - 1
                    - 2
                    - 3
                    - 4
                    - 6
                    - 10
                    - 16
                    - 30
                    - 39
                    - 117
                    - 177
                    - 219
                    - 241
                    - 260
                    - 275
                    - 307
                    - 308
                    - 309
                    - 318
                    - 320
                    - 321
                    - 326
                    - 340
                    - 352
                    - 370
                    - 374
                    - 383
                    - 509
                    - 532
                    - 540
                    - 568
                    - 608
                    - 614
                    - 621
                    - 623
                    - 703
                    - 809
                    - 815
                    - 819
                    - 828
                    - 829
                    - 837
                    - 839
                    - 842
                    - 849
                    - 853
                    - 865
                    - 879
                    - 889
                    - 890
                    - 899
                  description: |-
                    Only for Canada.
                    Enums:
                    0 - N/A
                    1 - BMO
                    2 - Scotia
                    3 - RBC
                    4 - TD
                    6 - National
                    10 - CIBC
                    16 - HSBC
                    30 - Canadian Western Bank / Western Union
                    39 - Laurentian
                    117 - Government
                    177 - Bank of Canada
                    219 - ATB
                    241 - Bank of America
                    260 - Citi
                    275 - KEB Hana
                    307 - Industrial and Commercial Bank of China (Canada)
                    308 - Bank of China
                    309 - Citizens
                    318 - U.S. Bank National Association
                    320 - PC Financial
                    321 - Habib Canadian Bank
                    326 - Simplii Financial
                    340 - ICICI Bank of Canada
                    352 - Digital Commerce Bank
                    370 - Wealth One Bank of Canada
                    374 - Motus Bank
                    383 - Peoples Bank of Canada
                    509 - The Canadian Trust Company
                    532 - Effort Trust Company
                    540 - Manulife Bank
                    568 - Peace Hills Trust Company
                    608 - Banque Alterna
                    614 - ING / Tangerine
                    621 - Peoples Trust Company
                    623 - Equitable Bank
                    703 - Wealthsimple Investments Inc.
                    809 - Central 1 Credit Union BC
                    815 - Desjardins
                    819 - La Fédération des caisses populaires du Manitoba Inc.
                    828 - Central 1 Credit Union Ontario
                    829 - La Fédération des caisses populaires de l'Ontario Inc.
                    837 - Meridian Credit Union
                    839 - Central 1 Credit Union Atlantic
                    842 - Alterna Savings
                    849 - Bayview Credit Union
                    853 - Concentra Financial Services
                    865 - UNI Financial Coop
                    879 - Co-op Credit Society of Manitoba
                    889 - Credit Union Central of Saskatchewan
                    890 - Alliance des caisses populaires de l'Ontario Limitée
                    899 - Credit Union Alberta
                eft_transit:
                  type: string
                eft_account:
                  type: string
                eft_account_type:
                  type: integer
                  enum:
                    - 0
                    - 1
                    - 2
                  description: |-
                    Only for US.
                    Enums:
                    0 - Checking
                    1 - Savings
                    2 - Loan Account
                enable_eft_direct_deposit:
                  type: integer
                  nullable: true
                  description: |-
                    Default 0. 0: Disable. 1: Enable
                eft_direct_deposit_data_centre:
                  type: integer
                  enum:
                    - 0
                    - 120
                    - 220
                    - 278
                    - 300
                    - 310
                    - 320
                    - 330
                    - 370
                    - 390
                    - 420
                    - 610
                    - 1000
                    - 1010
                    - 1020
                    - 1030
                    - 1070
                    - 1090
                    - 1600
                    - 86990
                    - 21990
                    - 10
                    - 86920
                    - 81510
                    - 86500
                    - 86900
                    - 11
                  description: |-
                    Data Centre ID. Only for Canada.
                    Enums:
                    0 - N/A N/A
                    120 - BMO All Regions
                    220 - Scotia All Regions
                    278 - RBC Regina
                    300 - RBC Vancouver
                    310 - RBC Montreal
                    320 - RBC Toronto
                    330 - RBC Halifax
                    370 - RBC Winnipeg
                    390 - RBC Calgary
                    420 - TD All Regions
                    610 - National All Regions
                    1000 - CIBC Vancouver
                    1010 - CIBC Montreal
                    1020 - CIBC Toronto
                    1030 - CIBC Halifax
                    1070 - CIBC Winnipeg
                    1090 - CIBC Calgary
                    1600 - HSBC All Regions
                    86990 - Canadian Western Bank / Western Union All Regions
                    21990 - ATB All Regions
                    10 - Central 1 Credit Union BC All Regions
                    86920 - Central 1 Credit Union Ontario Ontario
                    81510 - La Fédération des caisses populaires de l'Ontario Inc. All Regions
                    86500 - Central 1 Credit Union Atlantic Atlantic Central
                    86900 - Central 1 Credit Union Atlantic BC and Atlantic
                    11 - Credit Union Alberta All Regions
                eft_direct_deposit_originator_id:
                  type: string
                eft_direct_deposit_company_id:
                  type: string
                  nullable: true
                  description: |-
                    Only for US.
                eft_direct_deposit_handling_bank:
                  type: string
                  description: |-
                    Only for US.
                ontitle:
                  type: integer
                  nullable: true
                default_interest:
                  type: number
                  nullable: true
                total_funds_to_invest:
                  type: number
                  nullable: true
                enable_different_tax_address:
                  type: integer
                  nullable: true
                tax_address:
                  $ref: "#/components/schemas/Addresses"
                is_servicer:
                  type: integer
                tax_id_or_ssn:
                  type: string
                  nullable: true
                  description: |-
                    SIN for Individual Account
                tax_id_type:
                  type: integer
                  nullable: true
                  enum:
                    - 1
                    - 2
                    - 3
                    - 4
                    - 5
                    - 6
                    - 7
                    - 8
                    - 9
                  description: |-
                    CA: Recipient ID Type (T5 Box 23). US: Federal ID Type.
                    Enums:
                    1 - 1 (Individual)
                    2 - 2 (Joint account)
                    3 - 3 (Corporation)
                    4 - 4 (Association, trust, club, or partnership)
                    5 - 5 (Government)
                    6 - 1 (EIN)
                    7 - 2 (SSN)
                    8 - 3 (ITIN)
                    9 - 4 (ATIN)
                directors:
                  type: array
                  items:
                    $ref: "#/components/schemas/Account_directors"
                trustees:
                  type: array
                  items:
                    $ref: "#/components/schemas/Account_trustees"
                joints:
                  type: array
                  items:
                    $ref: "#/components/schemas/Joints"
                custom_fields:
                  type: array
                  items: {}
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: object
                    properties:
                      account:
                        $ref: "#/components/schemas/Accounts"
  /account_directors/get:
    post:
      tags:
        - account_directors
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Account_directors"
  /account_trustees/get:
    post:
      tags:
        - account_trustees
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Account_trustees"
  /default_expenses/get:
    post:
      tags:
        - default_expenses
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Default_expenses"
  /investors/get:
    post:
      tags:
        - investors
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                loan_id:
                  type: integer
                  description: |-
                    If provided, return the loan's investor's accounts
                investor_id:
                  type: integer
                response_field_whitelist:
                  type: array
                  nullable: true
                  items: {}
                  description: |-
                    If defined, the investor list will include those fields (only basic fields allowed).
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Investors"
  /investors/create:
    post:
      tags:
        - investors
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                x_investorid:
                  type: string
                  nullable: true
                type:
                  type: integer
                  nullable: true
                  enum:
                    - 0
                    - 1
                    - 3
                    - 2
                    - 4
                  description: |-
                    Organization -> (1) is deprecated. Organization -> (1) and Fund -> (2) cannot be used in Investor->create.
                    Enums:
                    0 - Individual
                    1 - Organization
                    3 - Corporation
                    2 - Fund
                    4 - Servicer
                first_name:
                  type: string
                last_name:
                  type: string
                dob:
                  type: integer
                  nullable: true
                homephone:
                  type: string
                  nullable: true
                mobile:
                  type: string
                  nullable: true
                email:
                  type: string
                  nullable: true
                notes:
                  type: string
                  nullable: true
                company:
                  type: string
                  nullable: true
                max_ltv:
                  type: integer
                  nullable: true
                address:
                  $ref: "#/components/schemas/Addresses"
                receive_statements_monthly:
                  type: number
                accounts:
                  type: array
                  items:
                    $ref: "#/components/schemas/Accounts"
                tags:
                  type: array
                  items:
                    $ref: "#/components/schemas/Tags"
                roles:
                  type: array
                  items:
                    $ref: "#/components/schemas/Roles"
                custom_fields:
                  type: array
                  items: {}
                dry_run:
                  type: integer
                  nullable: true
                  description: |-
                    Field used for debugging purposes internally.
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: object
                    properties:
                      investor:
                        $ref: "#/components/schemas/Investors"
  /investors/list:
    post:
      tags:
        - investors
      parameters:
        - $ref: "#/components/parameters/startParam"
        - name: sort_by
          in: query
          description: |-
            - Ascending order (default)
              
              Sort `loan_id` in ascending order: `/loans/list/?sort_by=+loan_id` which is the default and it is equivalent to `/loans/list/?sort_by=loan_id`
            
            - Descending order
              
              Sort `loan_id` in descending order: `/loans/list/?sort_by=-loan_id`
            
            - Sort multiple fields
              
              Sort closing_date in descending order and loan_id in descending order: `/loans/list/?sort_by=-closing_date,-loan_id`
          required: false
          style: form
          schema:
            type: array
            minItems: 0
            uniqueItems: true
            items:
              type: string
              pattern: '^[\-\+]?(investor_id|x_investorid|type|mic_name|mic_leadership_type|mic_president|mic_secretary|mic_director|mic_share_label|mic_payout|mic_year_end|mic_quarterly_statement_date|mic_cert_issue|mic_distribution_method|mic_allow_payouts_exceed_earnings|mic_only_allow_monthly_drip|mic_compound_interest_until_payout|mic_regular_payout_display|mic_onetime_distribution_display|mic_deposit_date_mode|mic_redemption_date_mode|first_name|last_name|dob|homephone|mobile|email|notes|company|max_ltv|receive_statements_monthly|dry_run)$'
        - name: investor_id
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: x_investorid
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: type
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: mic_name
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: mic_leadership_type
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: mic_president
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: mic_secretary
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: mic_director
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: mic_share_label
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: mic_payout
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: mic_year_end
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: mic_quarterly_statement_date
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: mic_cert_issue
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: mic_distribution_method
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: mic_allow_payouts_exceed_earnings
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: mic_only_allow_monthly_drip
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: mic_compound_interest_until_payout
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: mic_regular_payout_display
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: mic_onetime_distribution_display
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: mic_deposit_date_mode
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: mic_redemption_date_mode
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: first_name
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: last_name
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: dob
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: homephone
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: mobile
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: email
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: notes
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: company
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: max_ltv
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: receive_statements_monthly
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterNumber"
        - name: dry_run
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                loan_id:
                  type: number
                  description: |-
                    If provided, response is the loan's investor's accounts
                response_field_whitelist:
                  type: array
                  nullable: true
                  items: {}
                  description: |-
                    If defined, the investor list will include those fields (only basic fields allowed).
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: integer
                  result:
                    type: object
                    properties:
                      investors:
                        type: array
                        items:
                          $ref: "#/components/schemas/Investors"
  /funds/get:
    post:
      tags:
        - funds
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: number
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Funds"
  /fund_active_investors/list:
    post:
      tags:
        - fund_active_investors
      parameters:
        - $ref: "#/components/parameters/startParam"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                fund_id:
                  type: number
                  description: |-
                    ID of the fund for which the active investors has to be listed.
                day:
                  type: number
                  description: |-
                    Day (numeric, eg - 12) value of the date for which the active investor detail values should be calculated as of.
                month:
                  type: number
                  description: |-
                    Month (numeric, eg - 9) value of the date for which the active investor detail values should be calculated as of.
                year:
                  type: number
                  description: |-
                    Year (numeric, eg - 2022) value of the date for which the active investor detail values should be calculated as of.
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: integer
                  result:
                    type: object
                    properties:
                      fund_active_investors:
                        type: array
                        items:
                          $ref: "#/components/schemas/Fund_active_investors"
  /tags/get:
    post:
      tags:
        - tags
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Tags"
  /emds/get:
    post:
      tags:
        - emds
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Emds"
  /emd_staff/get:
    post:
      tags:
        - emd_staff
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Emd_staff"
  /roles/get:
    post:
      tags:
        - roles
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Roles"
  /roles/list:
    post:
      tags:
        - roles
      parameters:
        - $ref: "#/components/parameters/startParam"
        - name: sort_by
          in: query
          description: |-
            - Ascending order (default)
              
              Sort `loan_id` in ascending order: `/loans/list/?sort_by=+loan_id` which is the default and it is equivalent to `/loans/list/?sort_by=loan_id`
            
            - Descending order
              
              Sort `loan_id` in descending order: `/loans/list/?sort_by=-loan_id`
            
            - Sort multiple fields
              
              Sort closing_date in descending order and loan_id in descending order: `/loans/list/?sort_by=-closing_date,-loan_id`
          required: false
          style: form
          schema:
            type: array
            minItems: 0
            uniqueItems: true
            items:
              type: string
              pattern: '^[\-\+]?(id|name|entity_type_id|is_system_role)$'
        - name: id
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: name
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: entity_type_id
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: is_system_role
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                entity_type_id:
                  type: integer
                  enum:
                    - 0
                    - 1
                    - 2
                    - 3
                    - 4
                    - 5
                    - 6
                    - 7
                    - 8
                    - 101
                  description: |-
                    If provided, response is a list of roles in which that entity type e.g. investor is involved
                    Enums:
                    0 - N/A
                    1 - loan
                    2 - client
                    3 - investor
                    4 - broker
                    5 - lawyer
                    6 - titlecompany
                    7 - appraiser
                    8 - emd
                    101 - substatus
                entity_id:
                  type: number
                  description: |-
                    If provided along with entity_type_id, response is a list of roles in which that entity e.g. a specific investor is involved
                user_id:
                  type: number
                  nullable: true
                  description: |-
                    If provided , response is a list of roles that the user is added to.
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: integer
                  result:
                    type: object
                    properties:
                      roles:
                        type: array
                        items:
                          $ref: "#/components/schemas/Roles"
  /users/get:
    post:
      tags:
        - users
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                user_id:
                  type: integer
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Users"
  /users/list:
    post:
      tags:
        - users
      parameters:
        - $ref: "#/components/parameters/startParam"
        - name: sort_by
          in: query
          description: |-
            - Ascending order (default)
              
              Sort `loan_id` in ascending order: `/loans/list/?sort_by=+loan_id` which is the default and it is equivalent to `/loans/list/?sort_by=loan_id`
            
            - Descending order
              
              Sort `loan_id` in descending order: `/loans/list/?sort_by=-loan_id`
            
            - Sort multiple fields
              
              Sort closing_date in descending order and loan_id in descending order: `/loans/list/?sort_by=-closing_date,-loan_id`
          required: false
          style: form
          schema:
            type: array
            minItems: 0
            uniqueItems: true
            items:
              type: string
              pattern: '^[\-\+]?(user_id|name|email|phone)$'
        - name: user_id
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: name
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: email
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: phone
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                role_id:
                  type: number
                  description: |-
                    If provided, response is a list of users added to that role
                entity_type_id:
                  type: integer
                  enum:
                    - 0
                    - 1
                    - 2
                    - 3
                    - 4
                    - 5
                    - 6
                    - 7
                    - 8
                    - 101
                  description: |-
                    If provided along with role_id, response is a list of users added to that role and assigned to that entity type e.g. investor
                    Enums:
                    0 - N/A
                    1 - loan
                    2 - client
                    3 - investor
                    4 - broker
                    5 - lawyer
                    6 - titlecompany
                    7 - appraiser
                    8 - emd
                    101 - substatus
                entity_id:
                  type: number
                  description: |-
                    If provided along with role_id and entity_type_id, response is a list of users added to that role and assigned to that entity e.g. a specific investor
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: integer
                  result:
                    type: object
                    properties:
                      users:
                        type: array
                        items:
                          $ref: "#/components/schemas/Users"
  /other_properties/get:
    post:
      tags:
        - other_properties
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                property_id:
                  type: number
                loan_id:
                  type: number
                  nullable: true
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Other_properties"
  /other_properties/create:
    post:
      tags:
        - other_properties
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                property_id:
                  type: number
                loan_id:
                  type: integer
                address:
                  $ref: "#/components/schemas/Addresses"
                value:
                  type: number
                  nullable: true
                property_tax:
                  type: number
                  nullable: true
                property_tax_id:
                  type: string
                  nullable: true
                condo_fees:
                  type: number
                  nullable: true
                heating_fees:
                  type: number
                lot_size:
                  type: string
                living_space:
                  type: string
                  nullable: true
                rental_income:
                  type: number
                  nullable: true
                legal:
                  type: string
                  nullable: true
                property_entry_details:
                  type: string
                  nullable: true
                municipal_assessment_year:
                  type: string
                  nullable: true
                is_blanket:
                  type: number
                  nullable: true
                  description: |-
                    1 for blanket property, 0 for tagged property
                custom_fields:
                  type: array
                  items: {}
                insurances:
                  type: array
                  items:
                    $ref: "#/components/schemas/Insurances"
                otherexpenses:
                  type: array
                  items:
                    $ref: "#/components/schemas/Otherexpenses"
                positions:
                  type: array
                  items:
                    $ref: "#/components/schemas/Positions"
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: object
                    properties:
                      other_property:
                        $ref: "#/components/schemas/Other_properties"
  /apikey/get:
    post:
      tags:
        - apikey
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Apikey"
  /additional_reserves/get:
    post:
      tags:
        - additional_reserves
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Additional_reserves"
  /additional_reserves/list:
    post:
      tags:
        - additional_reserves
      parameters:
        - $ref: "#/components/parameters/startParam"
        - name: sort_by
          in: query
          description: |-
            - Ascending order (default)
              
              Sort `loan_id` in ascending order: `/loans/list/?sort_by=+loan_id` which is the default and it is equivalent to `/loans/list/?sort_by=loan_id`
            
            - Descending order
              
              Sort `loan_id` in descending order: `/loans/list/?sort_by=-loan_id`
            
            - Sort multiple fields
              
              Sort closing_date in descending order and loan_id in descending order: `/loans/list/?sort_by=-closing_date,-loan_id`
          required: false
          style: form
          schema:
            type: array
            minItems: 0
            uniqueItems: true
            items:
              type: string
              pattern: '^[\-\+]?(id|loan_id|additional_reserve_name|balance_asoftoday|balance_atfunding|addr_id|description)$'
        - name: id
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterNumber"
        - name: loan_id
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: additional_reserve_name
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: balance_asoftoday
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterNumber"
        - name: balance_atfunding
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterNumber"
        - name: addr_id
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterNumber"
        - name: description
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                loan_id:
                  type: number
                  description: |-
                    If provided, response is the Borrower's Other Incomes
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: integer
                  result:
                    type: object
                    properties:
                      additional_reserves:
                        type: array
                        items:
                          $ref: "#/components/schemas/Additional_reserves"
  /credit_reports/get:
    post:
      tags:
        - credit_reports
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                report_id:
                  type: integer
                  description: |-
                    If provided, response is a file
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Credit_reports"
  /credit_reports/list:
    post:
      tags:
        - credit_reports
      parameters:
        - $ref: "#/components/parameters/startParam"
        - name: sort_by
          in: query
          description: |-
            - Ascending order (default)
              
              Sort `loan_id` in ascending order: `/loans/list/?sort_by=+loan_id` which is the default and it is equivalent to `/loans/list/?sort_by=loan_id`
            
            - Descending order
              
              Sort `loan_id` in descending order: `/loans/list/?sort_by=-loan_id`
            
            - Sort multiple fields
              
              Sort closing_date in descending order and loan_id in descending order: `/loans/list/?sort_by=-closing_date,-loan_id`
          required: false
          style: form
          schema:
            type: array
            minItems: 0
            uniqueItems: true
            items:
              type: string
              pattern: '^[\-\+]?(report_id|borrower_id|loan_id|credit_bureau_name|source|score|pull_date|report|fixed_format|pio|pdf|xml)$'
        - name: report_id
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: borrower_id
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: loan_id
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: credit_bureau_name
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: source
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: score
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterNumber"
        - name: pull_date
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: report
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: fixed_format
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: pio
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: pdf
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: xml
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                borrower_id:
                  type: number
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: integer
                  result:
                    type: object
                    properties:
                      credit_reports:
                        type: array
                        items:
                          $ref: "#/components/schemas/Credit_reports"
  /background_tasks/get:
    post:
      tags:
        - background_tasks
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: |-
                    The Task ID to get
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Background_tasks"
  /background_tasks/list:
    post:
      tags:
        - background_tasks
      parameters:
        - $ref: "#/components/parameters/startParam"
        - name: sort_by
          in: query
          description: |-
            - Ascending order (default)
              
              Sort `loan_id` in ascending order: `/loans/list/?sort_by=+loan_id` which is the default and it is equivalent to `/loans/list/?sort_by=loan_id`
            
            - Descending order
              
              Sort `loan_id` in descending order: `/loans/list/?sort_by=-loan_id`
            
            - Sort multiple fields
              
              Sort closing_date in descending order and loan_id in descending order: `/loans/list/?sort_by=-closing_date,-loan_id`
          required: false
          style: form
          schema:
            type: array
            minItems: 0
            uniqueItems: true
            items:
              type: string
              pattern: '^[\-\+]?(id|title)$'
        - name: id
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: title
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                start_date:
                  type: integer
                  nullable: true
                  description: |-
                    The unix timestamp for the beginning of the query period
                end_date:
                  type: integer
                  nullable: true
                  description: |-
                    The unix timestamp for the end of the query period
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: integer
                  result:
                    type: object
                    properties:
                      tasks:
                        type: array
                        items:
                          $ref: "#/components/schemas/Background_tasks"
  /refresh_generatedfield/get:
    post:
      tags:
        - refresh_generatedfield
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                ids:
                  type: array
                  items: {}
                  description: |-
                    The Loan IDs for which to refresh the custom fields
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Refresh_generatedfield"
  /report/get:
    post:
      tags:
        - report
      description: |-
        Steps to generate reports
          1. Under report/list endpoint, get the rbpresetid (required) and rbsavedfilterid (optional)
          2. Using report/exec, generate the report with rbpresetid and other required parameters
          3. Passing the successfully generated task_id to report/get
          4. Under background_tasks/exec, assign the same task_id to id to get the file
          5. In Postman, you can save response to file; in browser, the file will be auto downloaded
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                task_id:
                  type: number
                  description: |-
                    The Task ID for which to get the generated report
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Report"
  /report/list:
    post:
      tags:
        - report
      parameters:
        - $ref: "#/components/parameters/startParam"
        - name: sort_by
          in: query
          description: |-
            - Ascending order (default)
              
              Sort `loan_id` in ascending order: `/loans/list/?sort_by=+loan_id` which is the default and it is equivalent to `/loans/list/?sort_by=loan_id`
            
            - Descending order
              
              Sort `loan_id` in descending order: `/loans/list/?sort_by=-loan_id`
            
            - Sort multiple fields
              
              Sort closing_date in descending order and loan_id in descending order: `/loans/list/?sort_by=-closing_date,-loan_id`
          required: false
          style: form
          schema:
            type: array
            minItems: 0
            uniqueItems: true
            items:
              type: string
              pattern: '^[\-\+]?(rbpresetid)$'
        - name: rbpresetid
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                section:
                  type: string
                  description: |-
                    The Report Section to filter on
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: integer
                  result:
                    type: object
                    properties:
                      count:
                        type: integer
                        description: |-
                          Total count of reports
                      reports:
                        type: array
                        items:
                          $ref: "#/components/schemas/Report"
  /servicing_transformations/get:
    post:
      tags:
        - servicing_transformations
      description: |-
        Detailed parameters under servicing_transformations/get results array
          | Field | Description         | Type      | Required | Nullable |
          |-------|---------------------|-----------|----------|----------|
          | ttype | Transformation Type | Int       | No       | No       |
          | tname | Transformation Name | String    | No       | No       |
          | tdate | Transformation Date | Timestamp | No       | No       |
          | tdata | Transformation Data | Array     | No       | No       |
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                loan_ids:
                  type: array
                  items: {}
                  description: |-
                    The Loan IDs for which to get servicing transformations
                transformation_types:
                  type: array
                  items: {}
                  description: |-
                    Types for servicing transformations
                                        1 -> Additional Loan/Advance
                                        4 -> Renewal
                                        5 -> Mid-Loan Adjustment
                                        6 -> Investor Switch
                                        7 -> Partial Paydown
                                        11 -> Payment Frequency Change
                                        12 -> Payment Amount Change
                                        22 -> Discharge
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Servicing_transformations"
  /pac/get:
    post:
      tags:
        - pac
      description: |-
        Detailed parameters under pac/get results array
          | Field         | Description                       | Type      | Required | Nullable |
          |---------------|-----------------------------------|-----------|----------|----------|
          | loan_id       | each Loan ID under results        | Int       | No       | No       |
          | count         | PAC Records Count                 | Int       | No       | No       |
          | records       | PAC Payment Records               | Int       | No       | No       |
          | details       | PAC Record Details                | Array     | No       | No       |
          | date          | PAC Payment & Detail Date         | Timestamp | No       | No       |
          | name          | PAC Payment & Detail Name         | String    | No       | No       |
          | amount        | PAC Payment & Detail Amount       | Float     | No       | No       |
          | balance       | PAC Payment & Detail Balance      | Float     | No       | No       |
          | paymenttype   | PAC Payment & Detail Payment Type | Int       | No       | No       |
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                loan_ids:
                  type: array
                  items: {}
                  description: |-
                    The Loan IDs for which to get PAC
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: "#/components/schemas/Pac"
  /action_logs/list:
    post:
      tags:
        - action_logs
      parameters:
        - $ref: "#/components/parameters/startParam"
        - name: sort_by
          in: query
          description: |-
            - Ascending order (default)
              
              Sort `loan_id` in ascending order: `/loans/list/?sort_by=+loan_id` which is the default and it is equivalent to `/loans/list/?sort_by=loan_id`
            
            - Descending order
              
              Sort `loan_id` in descending order: `/loans/list/?sort_by=-loan_id`
            
            - Sort multiple fields
              
              Sort closing_date in descending order and loan_id in descending order: `/loans/list/?sort_by=-closing_date,-loan_id`
          required: false
          style: form
          schema:
            type: array
            minItems: 0
            uniqueItems: true
            items:
              type: string
              pattern: '^[\-\+]?(id|user|action|extra|module|submodule|time)$'
        - name: id
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
        - name: user
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: action
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: extra
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: module
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: submodule
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterString"
        - name: time
          in: query
          required: false
          style: deepObject
          schema:
            $ref: "#/components/schemas/filterInteger"
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: integer
                  result:
                    type: object
                    properties:
                      action_logs:
                        type: array
                        items:
                          $ref: "#/components/schemas/Action_logs"
components:
  securitySchemes:
    api_key:
      type: apiKey
      name: API-AUTH
      description: |-
        Each Lender API account has a `lender_id` and an `api_key`.
        
        Please login to Mortgage Automator and go to [API Documentation](https://app.mortgageautomator.com/app/apidoc.php) to see the credential.
        
        2 HTTP request headers are required to be sent through for all API requests:
        - `ACCOUNT-ID`: which is the `lender_id`
        - `API-AUTH`: SHA1 digest of the `ACCOUNT-ID`, `api_key`, `entity/action` combo and an hourly timestamp.
        
        The `api_key` is a shared secret between the Mortgage Automator server and the requesting client. It is never directly transmitted. Instead, the key is used to compute a validation token that further authenticates each web request.
  
        Each request contains an entity and an action. For example, `loans/get`, `loans/list` etc.
  
        A timestamp uses the `YYYY-MM-DD-HH` format, where `HH` is the 24-hour representation of the hour. The time components are not zero-padded.
  
        For example, March 5, 2019 at 7:20pm is written as `2019-03-05-19`. The logical timezone is UTC.
  
        Each part of the token calculation is separated by a hyphen (`-`).
  
        For example, a `lender_id` `123` with API key `abc` for `loans/get` computes the token on March 5, 2019 at 7:20am:
  
        `API-AUTH = SHA1 (123-abc-loans/get-2019-03-05-07) = c1c45b10769a04e6fb97d519dd1d78cd3beb222b`
      in: header
    account_id:
      type: apiKey
      name: ACCOUNT-ID
      description: |-
        Your Lender ID 
      in: header
  parameters:
    startParam:
      in: query
      description: |-
        ## Pagination
        
        API will return the first 50 records. A List Request has a response field `next` which indicates the next batch should start with
        
        e.g. The response after this request: `/loans/list`
        
        `{ "next": 50, "result": { "loans": [ {...loan#1}, {...loan#2}, ... ] } }`
        
        To get the next 50 loans: `/loans/list/?start=50`
        
        If next does not exist in the response, it means there is no next page.
      name: start
      required: false
      schema:
        type: integer
        minimum: 0
        default: 0
  schemas:
    Loans:
      type: object
      properties:
        loan_id:
          type: integer
        loan_seq_id:
          type: integer
        x_loan_id:
          type: string
          nullable: true
        gsid:
          type: integer
        loan_title:
          type: string
        loan_title_x:
          type: string
          nullable: true
          description: |-
            Loan title from the original import source
        status:
          type: integer
          enum:
            - 0
            - 1
            - 2
            - 3
          description: |-
            Enums:
            0 - In Progress
            1 - Funded
            2 - Discharged
            3 - Terminated
        substatus:
          type: integer
          nullable: true
          description: |-
            Choose a loan substatus in Settings > Loan Substatuses.
        purpose:
          type: integer
          enum:
            - 0
            - 1
          description: |-
            Enums:
            0 - Refinance/ETO
            1 - Purchase
        purpose_text:
          type: string
        creation_date:
          type: integer
          description: |-
            Unix timestamp integer: number of seconds since Jan 01, 1970 in GMT/UTC timezone
        closing_date:
          type: integer
          nullable: true
          description: |-
            Unix timestamp integer: number of seconds since Jan 01, 1970 in GMT/UTC timezone
        deadline_to_accept_date:
          type: integer
          nullable: true
          description: |-
            Unix timestamp integer: number of seconds since Jan 01, 1970 in GMT/UTC timezone
        property:
          $ref: "#/components/schemas/Properties"
        other_properties:
          type: array
          items:
            $ref: "#/components/schemas/Properties"
        mortgage:
          $ref: "#/components/schemas/Mortgages"
        existing_mortgages:
          type: array
          items:
            $ref: "#/components/schemas/Existingmortgages"
        borrowers:
          type: array
          items:
            $ref: "#/components/schemas/Borrowers"
        investors:
          type: array
          items:
            $ref: "#/components/schemas/Investors"
        roles:
          type: array
          items:
            $ref: "#/components/schemas/Roles"
        servicer:
          $ref: "#/components/schemas/Investors"
        down_payments:
          type: array
          items:
            $ref: "#/components/schemas/Downpayments"
        multi_pieces:
          type: array
          items:
            $ref: "#/components/schemas/Multipieces"
        broker_staff:
          $ref: "#/components/schemas/Brokerstaff"
        importedbrokeroriginalxml:
          type: string
        broker_staff_cheque:
          $ref: "#/components/schemas/Brokerstaffcheques"
        eft_name:
          type: string
        eft_transit:
          type: string
          nullable: true
        eft_account:
          type: string
          nullable: true
        eft_account_type:
          type: integer
          enum:
            - 0
            - 1
            - 2
          description: |-
            For US only. Default 0 (Checking).
            0: Checking
            1: Savings 
            Enums:
            0 - Checking
            1 - Savings
            2 - Loan Account
        eft_bank_id:
          type: integer
          nullable: true
          description: |-
            Not applicable for US
        eft_target:
          type: integer
          nullable: true
          description: |-
            Payment Method > PAD form to be signed > Deposit To
        property_tax_lender_pays:
          type: integer
          nullable: true
          description: |-
            1: Lender pays; 0: otherwise
        condo_fees_lender_pays:
          type: integer
          nullable: true
          description: |-
            1: Lender pays; 0: otherwise
        site_inspection_mode:
          type: integer
          description: |-
            Site inspection mode for main property. Default Company Settings > Valuation Mode.
            0: n/a
            1: Inspection
            2: Appraisal
            3: Both
        site_inspection_fee:
          type: number
          description: |-
            When Site Inspection Mode is Inspection (1)
        site_inspection_no_charge_to_borrower:
          type: number
        appraisal_type:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
            - 4
            - 3
          description: |-
            Site Inspection / Appraisal > Primary property > Appraisal > Valuation Type
            Enums:
            0 - Appraisal
            1 - Municipal Assessment
            2 - Contract of Purchase and Sale
            4 - Internal
            3 - Other
        appraisal_fee:
          type: number
          description: |-
            When Site Inspection Mode is Appraisal (2)
        appraisal_no_charge_to_borrower:
          type: integer
        municipal_assessment_year:
          type: string
          nullable: true
          description: |-
            When Site Inspection Mode is Appraisal (2), and Appraisal Type is Municipal Assessment (1)
        other_valuation_description:
          type: string
          nullable: true
          description: |-
            When Site Inspection Mode is Appraisal (2), and Appraisal Type is Other (3)
        valuation_current_date:
          type: number
          nullable: true
          description: |-
            When Site Inspection Mode is Appraisal (2)
        investor_funding_mode:
          type: integer
          description: |-
            When Loan Type is Construction (1) or Fix & Flip (3), Investors > Funding Mode can be specified
            0: investors contribute to each advance/draw
            1: investors contribute to total facility upfront
        projected_value:
          type: number
          nullable: true
          description: |-
            When Loan Type is Construction (1)
        repair_cost:
          type: number
          nullable: true
          description: |-
            When Loan Type is Fix & Flip (3)
        land_value:
          type: number
          nullable: true
          description: |-
            When Loan Type is Construction (1)
        closing_costs:
          type: number
        closing_direct:
          type: integer
        deposit_fee:
          type: number
          nullable: true
        deposit_collect_date:
          type: integer
          nullable: true
          description: |-
            When alphamodule Payment out of Closing is not enabled
        seller_name:
          type: string
          nullable: true
        title_company_number:
          type: string
          nullable: true
        title_company:
          $ref: "#/components/schemas/Titlecompanies"
        title_company_staff:
          $ref: "#/components/schemas/Titlecompanystaff"
        pay_directly_to_investor:
          type: integer
          description: |-
            Default 0.
            0: Not paid directly to investor
            1: Paid directly to investor
        lawyer_fee_lender:
          type: number
        propertyjurisdiction:
          type: string
          nullable: true
        subdivision_subsection:
          type: string
          nullable: true
        lawyer_staff_lender:
          $ref: "#/components/schemas/Lawyerstaff"
        lawyer_staff_borrower:
          $ref: "#/components/schemas/Lawyerstaff"
        appraiser_staff:
          $ref: "#/components/schemas/Appraiserstaff"
        conditions:
          type: array
          items:
            $ref: "#/components/schemas/Conditions"
        accompanying_documents:
          type: array
          items:
            $ref: "#/components/schemas/Documentcategories"
        document_categories:
          type: array
          items:
            $ref: "#/components/schemas/Documentcategories"
        notes:
          type: array
          items:
            $ref: "#/components/schemas/Loan_note"
        custom_fields:
          type: array
          items: {}
        propertylronum:
          type: number
          nullable: true
        propertypin:
          type: string
          nullable: true
        propertypintail:
          type: string
          nullable: true
        stdchargetermsfilenumber:
          type: string
          nullable: true
        propertyestate:
          type: number
          nullable: true
        xpropertyid:
          type: string
          nullable: true
        loaninterestadjustmentdate:
          type: number
          nullable: true
        loanlastpaymentdate:
          type: number
          nullable: true
        loanpaymentamountpercycle:
          type: number
          nullable: true
        report_fields:
          type: array
          items: {}
        dry_run:
          type: integer
          nullable: true
          description: |-
            Field used for debugging purposes internally.
        debug:
          type: string
          description: |-
            internal purpose
        propertytaxid:
          type: string
          nullable: true
        document_upload_url:
          type: string
          nullable: true
          description: |-
            A pre-generated link redirecting the user to the secure document upload portal.
        propertyisnewhomewarranty:
          type: number
          nullable: true
    Updated_loans:
      type: object
      properties:
        loan_id:
          type: number
          description: |-
            Recently Updated Loan
        timestamp:
          type: number
    Created_loans:
      type: object
      properties:
        loan_id:
          type: number
    Borrower_loans:
      type: object
      properties:
        borrower_id:
          type: integer
        loan_id:
          type: integer
        is_guarantor:
          type: integer
          description: |-
            0: Borrower, 1: Guarantor
        is_main_client:
          type: integer
          description: |-
            0: Not Main, 1: Main
    Broker_staff_loans:
      type: object
      properties:
        broker_staff_id:
          type: integer
        cheque_id:
          type: integer
          description: |-
            Broker Staff cheque ID of Brokerstaff
    File_loans:
      type: object
      properties:
        url:
          type: string
          description: |-
            Publicly accessible URL of the loan file to be uploaded
        document_category_id:
          type: number
          description: |-
            Document Category ID associated to Loan File
    Investor_loans:
      type: object
      properties:
        account_id:
          type: integer
          description: |-
            Payment account ID of the Investor
        amount:
          type: number
        rate_type:
          type: number
          description: |-
            
            					0 - Full variable rate
            					1 - Partial variable rate
            					2 - Fixed rate
        interest:
          type: number
        rate_delta:
          type: number
        min_rate:
          type: number
        standby_amount:
          type: number
        rest_rate:
          type: number
        enable_escalating_rate:
          type: integer
          description: |-
            If escalating rate is enabled or not
        escalating_cycles:
          type: integer
          description: |-
            Number of months after which escalating rate applies.
        escalating_rate:
          type: number
        on_title:
          type: integer
        enable_withhold_tax:
          type: integer
        withhold_tax:
          type: integer
        iad_style:
          type: integer
          nullable: true
        interest_method:
          type: integer
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 6
            - 7
            - 5
          description: |-
            Enums:
            0 - equal amount
            1 - per-diem based
            2 - 31/360
            3 - 360/365
            4 - actual/360
            6 - 30/360 Special
            7 - 30/360 US
            5 - decide on a loan by loan basis
        is_residual:
          type: integer
    Properties:
      type: object
      properties:
        property_id:
          type: number
          description: |-
            Property ID (Only available for other properties)
        address:
          $ref: "#/components/schemas/Addresses"
        otherexpenses:
          type: array
          items:
            $ref: "#/components/schemas/Otherexpenses"
        positions:
          type: array
          items:
            $ref: "#/components/schemas/Positions"
        value:
          type: number
          nullable: true
        insurances:
          type: array
          items:
            $ref: "#/components/schemas/Insurances"
        property_tax:
          type: number
          nullable: true
        property_tax_monthly:
          type: number
          nullable: true
        property_tax_holdback:
          type: number
        property_tax_monthly_holdback:
          type: number
          nullable: true
        property_tax_url:
          type: string
          nullable: true
        property_tax_id:
          type: string
          nullable: true
        condo_fees:
          type: number
          nullable: true
        heating_fees:
          type: number
        property_built_date:
          type: integer
          nullable: true
          description: |-
            Unix timestamp integer: number of seconds since Jan 01, 1970 in GMT/UTC timezone
        lot_size:
          type: string
        lot_size_unit:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
          description: |-
            Enums:
            0 - Sq Feet
            1 - Ac
            2 - Sq Meters
        living_space:
          type: string
          nullable: true
        living_space_unit:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
          description: |-
            Enums:
            0 - Sq Feet
            1 - Ac
            2 - Sq Meters
        rental_income:
          type: number
          nullable: true
        legal:
          type: string
          nullable: true
        occupancy:
          type: integer
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
          description: |-
            Enums:
            0 - 
            1 - Owner-Occupied
            2 - Rental
            3 - Owner-Occupied/Tenanted
            4 - Second Home
            5 - Vacant
        tenure:
          type: integer
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
          description: |-
            Enums:
            0 - 
            1 - Freehold
            2 - Leasehold
            3 - Condo
            4 - Co-Op
        property_type:
          type: integer
          nullable: true
          enum:
            - 1
            - 2
            - 3
            - 9
            - 7
            - 8
            - 4
            - 6
            - 11
            - 0
          description: |-
            Enums:
            1 - Detached
            2 - Semi-Detached
            3 - Row/Town House
            9 - Apartment
            7 - Mobile
            8 - Stacked
            4 - Commercial
            6 - Land
            11 - Condo
            0 - Other
        property_type_other_description:
          type: string
        property_entry_details:
          type: string
          nullable: true
        municipal_assessment_year:
          type: string
          nullable: true
        propertyjurisdiction:
          type: string
          nullable: true
        subdivision_subsection:
          type: string
          nullable: true
        propertylronum:
          type: number
          nullable: true
        propertypin:
          type: string
          nullable: true
        propertypintail:
          type: string
          nullable: true
        propertyestate:
          type: number
          nullable: true
        xpropertyid:
          type: number
          nullable: true
        purchase_price:
          type: number
          nullable: true
        repair_cost:
          type: number
          nullable: true
        appraised_date:
          type: number
          nullable: true
          description: |-
            Unix timestamp integer: number of seconds since Jan 01, 1970 in GMT/UTC timezone
        layout:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 6
            - 2
            - 3
            - 4
            - 5
            - 11
            - 12
            - 13
            - 14
            - 15
            - 16
            - 17
            - 18
            - 19
            - 20
            - 21
            - 22
            - 23
          description: |-
            Enums:
            0 - Empty. For loan types: Standard (0), Construction (1), Commercial (2), Fix & Flip (3), Personal (4)
            1 - Single Family. For loan types: Standard (0), Construction (1), Fix & Flip (3), Personal (4)
            6 - Multi Family
            2 - Duplex. For loan types: Standard (0), Construction (1), Fix & Flip (3), Personal (4)
            3 - Tri Plex. For loan types: Standard (0), Construction (1), Fix & Flip (3), Personal (4)
            4 - Four Plex. For loan types: Standard (0), Construction (1), Fix & Flip (3), Personal (4)
            5 - Modular. For loan types: Standard (0), Construction (1), Fix & Flip (3), Personal (4)
            11 - Retail. For loan types: Commercial (2)
            12 - Hospitality. For loan types: Commercial (2)
            13 - Multi Family. For loan types: Standard (0), Construction (1), Fix & Flip (3)
            14 - Mixed use. For loan types: Commercial (2)
            15 - Office. For loan types: Commercial (2)
            16 - Assisted living. For loan types: Commercial (2)
            17 - Medical. For loan types: Commercial (2)
            18 - Light Industrial. For loan types: Commercial (2)
            19 - Storage. For loan types: Commercial (2)
            20 - Special purpose. For loan types: Commercial (2)
            21 - Restaurant. For loan types: Commercial (2)
            22 - Land. For loan types: Commercial (2)
            23 - Other (fill in Property Description). For loan types: Commercial (2)
        is_blanket:
          type: integer
          nullable: true
        amenities:
          type: array
          items:
            $ref: "#/components/schemas/Loan_amenity"
        tax_payment_schedules:
          type: array
          items:
            $ref: "#/components/schemas/Tax_payment_schedules"
        propertyowners:
          type: array
          items:
            $ref: "#/components/schemas/Propertyowners"
        custom_fields:
          type: array
          items: {}
        propertyisnewhomewarranty:
          type: number
          nullable: true
    Mortgages:
      type: object
      properties:
        id:
          type: integer
        type:
          type: integer
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
          description: |-
            Enums:
            0 - Standard
            1 - Construction
            2 - Commercial
            3 - Fix & Flip
            4 - Personal
        application_type:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
          description: |-
            Enums:
            0 - Mortgage
            1 - LOC
            2 - Bridge
            3 - Deed of Trust
            4 - Promissory Note
        total:
          type: number
          nullable: true
        amount:
          type: number
          nullable: true
          description: |-
            Loan Amount for Standard Loan Type. Initial Advance for Construction Loan Type or Standard Loan Type with Mortgage Application Type. Advance at Closing for Fix & Flip Loan Type.
        construction_lien_holdback:
          type: number
          nullable: true
        construction_lien_holdback_days:
          type: integer
        standby_interest:
          type: number
          nullable: true
          description: |-
            Number in percentage e.g. 10.99 stands for 10.99%. Standby Interest for Construction Loan Type. Standby Interest for Fix & Flip Loan Type is set to Interest Rate if 'Construction, Fix & Flip Loans: Charge Interest on Total Facility/Total Loan' is enabled under Company Settings > Optional Loan Fields > Commitment Fields
        enable_variable_rate:
          type: integer
          nullable: true
          description: |-
            1 to enable, 0 to disable.
        enable_escalating_rate:
          type: integer
          description: |-
            1 to enable, 0 to disable.
        escalating_rate_starts_in:
          type: integer
        escalating_rate:
          type: number
          nullable: true
          description: |-
            Number in percentage e.g. 10.99 stands for 10.99%.
        interest:
          type: number
          nullable: true
          description: |-
            Number in percentage e.g. 10.99 stands for 10.99%. If variable rate is enabled, the interest rate = Primate Rate + {prime_delta} >= {minimum_rate}.
        rate_index:
          type: integer
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
            - 8
            - 9
            - 10
            - 14
            - 15
            - 16
            - 18
            - 19
            - 21
            - 22
            - 24
            - 25
            - 26
            - 28
            - 29
            - 31
            - 32
            - 36
            - 38
            - 40
            - 42
            - 47
            - 51
            - 52
            - 57
            - 58
            - 65
            - 66
            - 67
            - 68
            - 70
            - 71
            - 72
            - 73
            - 76
            - 80
            - 82
            - 88
            - 89
            - 90
            - 92
            - 94
            - 95
            - 97
            - 98
            - 103
            - 104
            - 105
            - 107
            - 108
            - 109
            - 123
            - 130
            - 134
            - 135
            - 137
            - 139
            - 143
            - 145
            - 149
            - 150
            - 155
            - 157
            - 160
            - 161
            - 162
            - 163
            - 164
            - 165
            - 167
            - 168
            - 217
          description: |-
            Enums:
            0 - N/A
            1 - MCAP
            2 - TD
            3 - CIBC
            4 - RBC
            5 - WSJ Prime
            8 - Custom CA 2 Enabled
            9 - TEST
            10 - GG
            14 - TEST
            15 - TEST2
            16 - TEST
            18 - SRL TD
            19 - Test
            21 - Prime Rate
            22 - My NEw Index
            24 - Capstone Custom
            25 - Test Custom Index
            26 - RBC
            28 - gio's rate
            29 - gio's second rate
            31 - Custom Index
            32 - SOFR
            36 - Lan Look Back
            38 - BMO
            40 - Houze
            42 - TEST2
            47 - National Bank
            51 - WY Test
            52 - WSJ
            57 - GCMIC Prime
            58 - SOFR TEST
            65 - Test
            66 - DMIC TD Index
            67 - Custom
            68 - new
            70 - yup
            71 - no
            72 - Adam Custom
            73 - EQB
            76 - MDV-52646
            80 - Custom Index
            82 - Custom Decrease
            88 - TC
            89 - SOFR
            90 - Custom Index 2
            92 - WSJ Prime
            94 - SOFR
            95 - Custom Index 2022
            97 - Shirkhan's Rate
            98 - SOFR
            103 - Daria Test
            104 - SOFR
            105 - Custom
            107 - bmo
            108 - DONT DELETE !!! Variable rate test class
            109 - DONT DELETE !!! Variable rate test class 2
            123 - TD (1st of Month)
            130 - MyIndex
            134 - Camila_test_index
            135 - RTIndex
            137 - 2 nd cycle
            139 - 2 nd cycle and discharge
            143 - val_testing
            145 - val_testing_2
            149 - MDV-22108 Index
            150 - Eli's rate
            155 - Index 2
            157 - Robert Cheung
            160 - Gio's index
            161 - Gagan
            162 - SOFR
            163 - Gio's Index
            164 - CCC
            165 - Hell yeah
            167 - BMO
            168 - New Index
            217 - ABCP- BMO
        minimum_rate:
          type: number
          nullable: true
          description: |-
            Number in percentage e.g. 10.99 stands for 10.99%.
        prime_delta:
          type: number
          nullable: true
          description: |-
            Number in percentage e.g. 10.99 stands for 10.99%. Default 0 for non-variable-rate interest. Default the same as {interest} rate for variable-rate interest.
        term_mode:
          type: integer
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
          description: |-
            Not available for Personal Loan Type
            Enums:
            0 - Fully Closed
            1 - Closed Variable
            2 - Closed, Then Open
            3 - Fully Open
            4 - Minimum, Then Open
        defaulted_rate:
          type: number
          nullable: true
          description: |-
            Number in percentage e.g. 10.99 stands for 10.99%.
        interest_method:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 6
            - 7
            - 5
          description: |-
            Enums:
            0 - equal amount
            1 - per-diem based
            2 - 31/360
            3 - 360/365
            4 - actual/360
            6 - 30/360 Special
            7 - 30/360 US
            5 - decide on a loan by loan basis
        down_payment:
          type: number
          nullable: true
          description: |-
            For Loan Purpose = Purchase (1)
        position:
          type: integer
          enum:
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
            - 7
          description: |-
            Enums:
            1 - First
            2 - Second
            3 - Third
            4 - Fourth
            5 - Fifth
            6 - Sixth
            7 - Seventh
        term:
          type: integer
        holdback_amount:
          type: number
          nullable: true
          description: |-
            Default 0.
        holdback_app_mode:
          type: integer
          enum:
            - 0
            - 1
            - 2
          description: |-
            Enums:
            0 - Apply upfront (deferred payments)
            1 - Spread evenly
            2 - Apply at the end
        holdback_app_cycle:
          type: number
          nullable: true
          description: |-
            Months count to spread holdback evenly over.
            					Cannot be empty if holdback_app_mode = 1 (spread evenly)
            					Cannot be > 0 if holdback_app_mode != 1 (any other than “spread evenly”)
        holdback_start_at:
          type: number
          nullable: true
          description: |-
            Starting from month number from which holdback over. (Applies only (and only allowed) when holdback_app_mode is 0).
            							Cannot be empty if holdback_app_mode = 0 (Apply Upfront).
            							Cannot be > 0 if holdback_app_mode != 0 (any other than “Apply Upfront”).
        repay_mode:
          type: integer
          enum:
            - 0
            - 1
            - 2
          description: |-
            Default 0.
            Enums:
            0 - Interest Only / Interest Only Deferred
            1 - Principal + Interest
            2 - Capitalizing Interest
        defer_int_pay:
          type: integer
          description: |-
            Default 0. 1 to defer interest payment.
        main_defer_int_pay:
          type: integer
          description: |-
            Default 0.
            
            					0: When {holdback_amount} is specified, “Interest Schedule > charge interest at monthly payment” is enabled. Otherwise, “Interest Schedule > holdback / PPI” is enabled.
            
            					1: “Interest Schedule > defer interest payments until the next advance” is enabled.
        amort_in_years:
          type: number
          nullable: true
          description: |-
            Default 25 in years. If {repay_mode} is Principal Interest (1) and {amort_in_years} is not provided, {amort_yearmonth_years} and {amort_yearmonth_months} combined in years will be the default.
        amort_yearmonth_years:
          type: integer
          nullable: true
          description: |-
            To combine with {amort_yearmonth_months}.
        amort_yearmonth_months:
          type: number
          nullable: true
          description: |-
            To combine with {amort_yearmonth_years}.
        amort_compounding:
          type: integer
          enum:
            - 52
            - 26
            - 24
            - 12
            - 4
            - 2
            - 1
          description: |-
            Enums:
            52 - Weekly
            26 - Bi-Weekly
            24 - Semi-Monthly
            12 - Monthly
            4 - Quarterly
            2 - Semi-Annually
            1 - Annually
        frequency:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
            - 3
            - 7
          description: |-
            Default is 0 (Monthly)
            Enums:
            0 - Monthly
            1 - Semi-Monthly
            2 - Weekly
            3 - Bi-Weekly
            7 - Quarterly
        accelerate_payment:
          type: integer
          description: |-
            Default 0. 1 is to enable accelerate payment for {frequency} is Weekly (2) or Bi-Weekly (3)
        funding_date:
          type: integer
          nullable: true
        first_payment_date:
          type: integer
          nullable: true
        closing_date:
          type: integer
          nullable: true
          description: |-
            The field is shown if this is enabled: Company Settings > Optional Loan Fields > Investor Section > Different Closing vs. Payout Dates. It's greater than or equal to {funding_date}.
        doc_date:
          type: integer
          nullable: true
          description: |-
            The field is shown if this is enabled: Company Settings > Optional Loan Fields > Investor Section > Custom Maturity Date.
        maturity_date:
          type: integer
          nullable: true
          description: |-
            This field is shown for loans which have been funded and is impacted by any form of extension/renewal  
        pay_day:
          type: integer
          description: |-
            1 is Day 1. Default is 1.
        pay_day_type:
          type: integer
          nullable: true
          description: |-
            0 (default) or 1. 0 means start of each month or from quarterly start. 1 means before month end or from quarter end.
            
            0: Day {pay_day} from quarter start for {frequency} is Quarterly (7)
            0: Day {pay_day} of each month for {frequency} is not Quarterly (7)
            
            1: Day {pay_day} from quarter end for {frequency} is Quarterly (7)
            1: Day {pay_day} before month end for {frequency} is not Quarterly (7)
        investor_payout_day:
          type: integer
          nullable: true
          description: |-
            Default Company Settings > Default Investor Payout Day, {payday} if > 0, or 1
        investor_payout_day_2:
          type: integer
          nullable: true
          description: |-
            Default {investor_payout_day}. It's shown when {investor_payout_type} is start of quarter/month (0) and {frequency} is Semi-Monthly (1)
        investor_payout_type:
          type: integer
          nullable: true
          description: |-
            Default 0. Investors get paid on 0: Day from start of quarter/month, 1: Day from end of quarter/month, 2: Day from borrower payment date.
            
            0: Day {investor_payout_day} and {investor_payout_day_2} of month following end of quarter for {frequency} is Quarterly (7)
            0: Day {investor_payout_day} and {investor_payout_day_2} of each month for {frequency} is not Quarterly (7)
            
            1: Day {investor_payout_day} and {investor_payout_day_2} before month end of month following end of the quarter for {frequency} is Quarterly (7)
            1: Day {investor_payout_day} and {investor_payout_day_2} before month end for {frequency} is not Quarterly (7)
            
            2: Day {investor_payout_day} and {investor_payout_day_2} from borrower payment date
        pay_method:
          type: integer
          enum:
            - 0
            - 1
            - 3
            - 5
            - 9
            - 4
            - 2
          description: |-
            Default 0.
            Enums:
            0 - PAD
            1 - Cheque
            3 - Debit
            5 - Wire Transfer
            9 - Cash
            4 - Email Money Transfer
            2 - Credit Card
        early_term_penalty_in_months:
          type: number
          nullable: true
          description: |-
            Default is Company Settings > Default Settings & Rates > Early Termination Penalty in months. Shown when {term_mode} is Fully Closed (0) and {type} is not Personal (4)
        early_term_penalty_first_months:
          type: number
          nullable: true
          description: |-
            Default 0. Early Term. Type: {term_mode}. For the first {early_term_penalty_first_months} month(s), the penalty will be {early_term_penalty_first_months_amount} month(s)
        early_term_penalty_first_months_amount:
          type: number
          nullable: true
          description: |-
            Default 0. Early Term. Type: {term_mode}. For the first {early_term_penalty_first_months} month(s), the penalty will be {early_term_penalty_first_months_amount} month(s)
        early_term_penalty_min_months_then_open:
          type: number
          nullable: true
          description: |-
            for Early Term. Type {term_mode} is 'Minimum, Then Open' (4)
        early_term_penalty_min_amount_then_open:
          type: number
          nullable: true
          description: |-
            for Early Term. Type {term_mode} is 'Minimum, Then Open' (4)
        early_term_penalty_closed_variable_after_months:
          type: number
          nullable: true
          description: |-
            for Early Term. Type {term_mode} is 'Closed Variable' (1)
        fees:
          $ref: "#/components/schemas/Fees"
        custom_fees:
          type: array
          items:
            $ref: "#/components/schemas/Customfees"
        iad:
          type: number
          nullable: true
          description: |-
            IAD
        previewcyclepaymentamount:
          type: number
          nullable: true
          description: |-
            Preview Cycle Payment Amount
        defer_link:
          type: string
          nullable: true
          description: |-
            Public URL to fetch deferred fields (see Defer Params)
        defer_params:
          type: array
          items: {}
          description: |-
            Refer to Defer Params
    Existingmortgages:
      type: object
      properties:
        id:
          type: integer
        loan_id:
          type: integer
        type:
          type: integer
          nullable: true
          enum:
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
            - 7
          description: |-
            Enums:
            1 - First
            2 - Second
            3 - Third
            4 - Fourth
            5 - Fifth
            6 - Sixth
            7 - Seventh
        holder:
          type: string
          nullable: true
        face_value:
          type: number
          nullable: true
        balance:
          type: number
          nullable: true
        payment:
          type: number
        frequency:
          type: integer
          nullable: true
          enum:
            - 1
            - 2
            - 0
          description: |-
            Enums:
            1 - Weekly
            2 - Biweekly
            0 - Monthly
        maturity_date:
          type: integer
          nullable: true
        rate_type:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
          description: |-
            Enums:
            0 - 
            1 - Fixed
            2 - Variable
            3 - Adjustable
            4 - Capped Variable
            5 - Buydown
        term_type:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
          description: |-
            Enums:
            0 - Fully Closed
            1 - Closed Variable
            2 - Closed, Then Open
            3 - Fully Open
            4 - Minimum, Then Open
        interest_rate:
          type: number
          nullable: true
        prepayment_penalty:
          type: number
          nullable: true
        custom_fields:
          type: array
          items: {}
    Downpayments:
      type: object
      properties:
        down_payment_id:
          type: integer
        loan_id:
          type: integer
        amount:
          type: number
          nullable: true
        source:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
    Multipieces:
      type: object
      properties:
        multi_piece_id:
          type: integer
        loan_id:
          type: integer
          nullable: true
        piece:
          type: integer
          nullable: true
        amount:
          type: number
          nullable: true
        rate:
          type: number
          nullable: true
        minimum_rate:
          type: number
          nullable: true
        rate_delta:
          type: number
          nullable: true
    Debts:
      type: object
      properties:
        id:
          type: integer
        borrower_id:
          type: integer
        loan_id:
          type: integer
        creditor:
          type: string
        amount:
          type: number
          nullable: true
        limit:
          type: number
          nullable: true
        payment:
          type: number
          nullable: true
        credit_report:
          type: integer
          nullable: true
          description: |-
            Default 0. 0: False, 1: True.
        date:
          type: integer
          nullable: true
        from_loan_id:
          type: integer
          description: |-
            It will be one if the debt is created from a loan otherwise 0.
        rt:
          type: string
          nullable: true
        payout:
          type: integer
          description: |-
            Default 0. 0: False, 1: True.
        close:
          type: integer
          description: |-
            Default 0. 0: False, 1: True.
        prior:
          type: integer
          description: |-
            Default 0. 0: False, 1: True.
        loan_bridge:
          type: number
          nullable: true
          description: |-
            Default 0. 0: False, 1: True.
    Borrowers:
      type: object
      properties:
        borrower_id:
          type: integer
        x_borrower_id:
          type: string
          nullable: true
        borrower_loan_id:
          type: integer
        first_name:
          type: string
        middle_name:
          type: string
          nullable: true
        last_name:
          type: string
        name_prefix:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
            - 7
            - 8
            - 9
          description: |-
            Enums:
            0 - 
            1 - Mr
            2 - Miss
            3 - Mrs
            4 - Ms
            5 - Dr
            6 - Rev
            7 - Judge
            8 - Madam
            9 - Sir
        name_suffix:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
          description: |-
            Enums:
            0 - 
            1 - Jr
            2 - Sr
            3 - II
            4 - III
            5 - IV
        vesting_name:
          type: string
        dob:
          type: integer
          nullable: true
        ssn:
          type: string
          nullable: true
        marital:
          type: string
        credit_score:
          type: integer
          nullable: true
        email:
          type: string
        homephone:
          type: string
        mobile:
          type: string
          nullable: true
        workphone:
          type: string
          nullable: true
        address:
          $ref: "#/components/schemas/Addresses"
        residential_status:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
            - 3
          description: |-
            Enums:
            0 - 
            1 - Own
            2 - Rent
            3 - Live with Parents
        residence_start_date:
          type: integer
          nullable: true
        employments:
          type: array
          items:
            $ref: "#/components/schemas/Employments"
        incomes:
          type: array
          items:
            $ref: "#/components/schemas/Incomes"
        debts:
          type: array
          items:
            $ref: "#/components/schemas/Debts"
        all_debts:
          type: array
          items:
            $ref: "#/components/schemas/Debts"
        assets:
          type: array
          items:
            $ref: "#/components/schemas/Assets"
        shareholders:
          type: array
          items:
            $ref: "#/components/schemas/Shareholders"
        borrower_loans:
          type: array
          items:
            $ref: "#/components/schemas/Borrower_loans"
        companies:
          type: array
          items:
            $ref: "#/components/schemas/Borrowers"
        custom_fields:
          type: array
          items: {}
        clientnote:
          type: string
          nullable: true
        eftname:
          type: string
        eftbankid:
          type: integer
          nullable: true
        efttransit:
          type: string
          nullable: true
        eftaccount:
          type: string
          nullable: true
        eftaccounttype:
          type: integer
          enum:
            - 0
            - 1
            - 2
          description: |-
            Enums:
            0 - Checking
            1 - Savings
            2 - Loan Account
        businessnumber:
          type: string
          nullable: true
        iscorporation:
          type: integer
          nullable: true
          description: |-
            Default 0. 0: Individual. 1: Corporation
        corptype:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
            - 7
            - 9
            - 12
          description: |-
            Enums:
            0 - Individual
            1 - Corporation
            2 - General Partnership
            3 - LLC - Member Managed
            4 - LLC - Manager Managed
            5 - Limited Partnership
            7 - PLLC
            9 - Trust
            12 - Inc
        corpname:
          type: string
          nullable: true
        l_is_guarantor:
          type: integer
          description: |-
            0: Borrower, 1: Guarantor
        l_is_main_client:
          type: integer
          description: |-
            0: Not Main, 1: Main
        consentingspousefname:
          type: string
          description: |-
            Consenting Spouse First Name
        consentingspousemname:
          type: string
          description: |-
            Consenting Spouse Middle Name
        consentingspouselname:
          type: string
          description: |-
            Consenting Spouse Last Name
        dry_run:
          type: integer
          nullable: true
          description: |-
            Field used for debugging purposes internally.
    Shareholders:
      type: object
      properties:
        borrowerid:
          type: integer
        type:
          type: integer
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
            - 7
            - 16
            - 8
            - 9
            - 10
            - 11
            - 12
            - 13
            - 14
            - 15
            - 17
            - 18
            - 19
          description: |-
            Enums:
            0 - 
            1 - Director
            2 - Co-director
            3 - Shareholder
            4 - Guarantor
            5 - Signing Officer
            6 - Manager
            7 - Member
            16 - Member/Manager
            8 - Authorized Manager
            9 - Authorized Member
            10 - President
            11 - Vice President
            12 - President and CEO
            13 - Trustee
            14 - Secretary
            15 - Treasurer
            17 - Partner
            18 - GeneralPartner
            19 - LimitedPartner
        percentage:
          type: number
        iscustomsigner:
          type: integer
          nullable: true
        borrower:
          $ref: "#/components/schemas/Borrowers"
    Conditions:
      type: object
      properties:
        condition_id:
          type: integer
        condition_property_id:
          type: integer
          description: |-
            Property ID for which the loan condition relates to if any else 0
        condition_type:
          type: integer
          enum:
            - 0
            - 1
          description: |-
            Enums:
            0 - Single Condition
            1 - Condition Per Property
        condition_name:
          type: string
          nullable: true
        condition_text:
          type: string
          nullable: true
        borrowerlinktext:
          type: string
          nullable: true
        additional_description:
          type: string
          nullable: true
          description: |-
            Property address for which the loan condition relates to if any
        status:
          type: integer
          enum:
            - 1
            - 0
          description: |-
            Enums:
            1 - Satisfied
            0 - Unsatisfied
        condition_status:
          type: integer
          description: |-
            0 - Active , 1 - Inactive
        fulfiller:
          type: integer
        document_category:
          $ref: "#/components/schemas/Documentcategories"
    Documentcategories:
      type: object
      properties:
        category_id:
          type: integer
        category_name:
          type: string
          nullable: true
        files:
          type: array
          items:
            $ref: "#/components/schemas/Loanfiles"
    Loanfiles:
      type: object
      properties:
        file_id:
          type: integer
        dispfile_name:
          type: string
          nullable: true
        file_name:
          type: string
          nullable: true
        file_date:
          type: integer
          nullable: true
        file_status:
          type: integer
          nullable: true
          enum:
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
            - 99
          description: |-
            Enums:
            1 - Existing File
            2 - Waiting for Review
            3 - Reviewing
            4 - Changes Required
            5 - Rejected
            6 - Accepted
            99 - Processing
        rejected_reason:
          type: string
          nullable: true
        additional_description:
          type: string
          nullable: true
        sys_file_ref:
          type: string
          nullable: true
        url:
          type: string
          nullable: true
    Fees:
      type: object
      properties:
        broker_fee:
          type: number
          description: |-
            Default 0
        new_account_fee:
          type: number
          nullable: true
          description: |-
            Default is Company Settings > Account Setup Fee or 0
        lender_fee:
          type: number
          nullable: true
          description: |-
            Default 0.
        lender_fee_pay_mode:
          type: integer
          description: |-
            Default 0. 0: Pay at funding, 1: Pay over {lender_fee_n_months}
        lender_fee_n_months:
          type: integer
          description: |-
            Default 1. Used when {lender_fee_pay_mode} is Pay over (1)
        admin_fee:
          type: number
          nullable: true
          description: |-
            Default 0.
        admin_fee_pay_mode:
          type: integer
          description: |-
            Default 0. 0: Pay at funding, 1: Pay over {admin_fee_n_months}
        admin_fee_n_months:
          type: integer
          description: |-
            Default 1. Used when {admin_fee_pay_mode} is Pay over (1)
        placement_fee:
          type: number
          description: |-
            Default 0.
        placement_fee_pay_mode:
          type: integer
          description: |-
            Default 0. 0: Pay at funding, 1: Pay over {admin_fee_n_months}
        placement_fee_n_months:
          type: integer
          description: |-
            Default 1. Used when {placement_fee_pay_mode} is Pay over (1)
        est_title_fee:
          type: number
          description: |-
            Default 0.Company Settings > Optional Loan Fields > Commitment Fields > Enable Est. Title Fee for Fix & Flips.
        est_title_fee_pay_mode:
          type: integer
          description: |-
            Default 0. Company Settings > Optional Loan Fields > Commitment Fields > Enable Est. Title Fee for Fix & Flips. 
            0: Pay at funding
            1: Pay over {est_title_fee_n_months}.
        est_title_fee_n_months:
          type: integer
          description: |-
            Default 1. Used when {est_title_fee_pay_mode} is Pay over (1). Company Settings > Optional Loan Fields > Commitment Fields > Enable Est. Title Fee for Fix & Flips.
        est_title_fee_direct:
          type: integer
          description: |-
            Default 0. 0: Borrower doesn't pay directly, 1: Borrower pays directly. Company Settings > Optional Loan Fields > Commitment Fields > Enable Est. Title Fee for Fix & Flips.
        discharge_fee:
          type: number
          description: |-
            Default Company Settings > Discharge Fee or 0
        renewal_fee:
          type: number
          nullable: true
          description: |-
            Default Company Settings > Renewal Fee or 0
        title_company_fee:
          type: number
          nullable: true
          description: |-
            Default 0.
        statement_prep_fee:
          type: number
          description: |-
            Default 0.
    Customfees:
      type: object
      properties:
        id:
          type: integer
        title:
          type: string
        amount:
          type: number
          description: |-
            Default 0.
        amount_total:
          type: number
          description: |-
            Default 0.
        estimate:
          type: integer
          description: |-
            Default 0. 0: false, 1: true.
        per_property:
          type: integer
          description: |-
            Default 0. 0: false, 1: true.
    Addresses:
      type: object
      properties:
        street:
          type: string
          nullable: true
          description: |-
            e.g. 123 Main St.
        city:
          type: string
          nullable: true
        prov:
          type: string
          nullable: true
        zip:
          type: string
          nullable: true
          description: |-
            e.g. A1A 2A3 or 6 digits US Zip code
        county:
          type: string
          nullable: true
          description: |-
            Only applies to US address
        suburb:
          type: string
          nullable: true
          description: |-
            Only applies to New Zealand address
        country:
          type: string
          nullable: true
    Insurances:
      type: object
      properties:
        insurance_id:
          type: integer
        insured_name:
          type: string
          nullable: true
        policy_type:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
            - 7
            - 8
            - 9
            - 10
            - 11
            - 12
            - 13
            - 14
            - 15
          description: |-
            Enums:
            0 - None
            1 - Vacancy
            2 - Builders Risk
            3 - Flood
            4 - Windstorm
            5 - Tenant Dwelling
            6 - Homeowner
            7 - Strata
            8 - Commercial
            9 - General liability/Umbrella liability
            10 - Sewer Back-Up
            11 - Water
            12 - Earthquake
            13 - Equipment breakdown
            14 - Property
            15 - Fire
        policy_num:
          type: string
          nullable: true
        company:
          type: string
          nullable: true
        coverage_amount:
          type: number
          nullable: true
        annual_cost:
          type: number
          nullable: true
        holdback:
          type: number
          nullable: true
        monthly_payment:
          type: number
          nullable: true
        pay_for_borrower:
          type: integer
          nullable: true
          description: |-
            0 or 1. 1 is to pay on behalf of borrower
        expiry_date:
          type: integer
          nullable: true
          description: |-
            Unix timestamp integer: number of seconds since Jan 01, 1970 in GMT/UTC timezone
        policy_issue_date:
          type: integer
          nullable: true
          description: |-
            Unix timestamp integer: number of seconds since Jan 01, 1970 in GMT/UTC timezone
        effective_date:
          type: integer
          nullable: true
          description: |-
            Unix timestamp integer: number of seconds since Jan 01, 1970 in GMT/UTC timezone
        deductible:
          type: number
          nullable: true
        insurance_limit:
          type: number
          nullable: true
        insurancepolicyguaranteedreplacementcoverage:
          type: integer
          nullable: true
          description: |-
            0 or 1. 1 guarantees replacement coverage
        stated_amount:
          type: number
          nullable: true
        payment_date:
          type: integer
          nullable: true
          description: |-
            Unix timestamp integer: number of seconds since Jan 01, 1970 in GMT/UTC timezone
        agent:
          $ref: "#/components/schemas/Insuranceagents"
    Insuranceagents:
      type: object
      properties:
        name:
          type: string
          nullable: true
        phone:
          type: string
          nullable: true
        email:
          type: string
          nullable: true
        fax:
          type: string
          nullable: true
        company:
          type: string
          nullable: true
        company_address:
          type: string
          nullable: true
        agent_number:
          type: string
          nullable: true
        clamllcinsuranceagentcompanystreetnumber:
          type: string
          nullable: true
        clamllcinsuranceagentcompanyaddress:
          type: string
          nullable: true
        clamllcinsuranceagentcompanycity:
          type: string
          nullable: true
        clamllcinsuranceagentcompanyprovince:
          type: string
          nullable: true
        clamllcinsuranceagentcompanyzip:
          type: string
          nullable: true
    Parentbrokers:
      type: object
      properties:
        id:
          type: integer
        gsid:
          type: integer
        name:
          type: string
    Brokers:
      type: object
      properties:
        broker_id:
          type: integer
        gsid:
          type: integer
        x_broker_id:
          type: string
          nullable: true
        parent_broker:
          $ref: "#/components/schemas/Parentbrokers"
        importsource:
          type: integer
          nullable: true
        name:
          type: string
          nullable: true
        address:
          type: string
        city:
          type: string
        suburb:
          type: string
        county:
          type: string
        province:
          type: string
        zip:
          type: string
        phone:
          type: string
        fax:
          type: string
        cheque:
          type: string
        cheque_use_eft:
          type: integer
          nullable: true
        cheque_eft_name:
          type: string
        cheque_eft_bank_id:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 6
            - 10
            - 16
            - 30
            - 39
            - 117
            - 177
            - 219
            - 241
            - 260
            - 275
            - 307
            - 308
            - 309
            - 318
            - 320
            - 321
            - 326
            - 340
            - 352
            - 370
            - 374
            - 383
            - 509
            - 532
            - 540
            - 568
            - 608
            - 614
            - 621
            - 623
            - 703
            - 809
            - 815
            - 819
            - 828
            - 829
            - 837
            - 839
            - 842
            - 849
            - 853
            - 865
            - 879
            - 889
            - 890
            - 899
          description: |-
            Only for Canada.
            Enums:
            0 - N/A
            1 - BMO
            2 - Scotia
            3 - RBC
            4 - TD
            6 - National
            10 - CIBC
            16 - HSBC
            30 - Canadian Western Bank / Western Union
            39 - Laurentian
            117 - Government
            177 - Bank of Canada
            219 - ATB
            241 - Bank of America
            260 - Citi
            275 - KEB Hana
            307 - Industrial and Commercial Bank of China (Canada)
            308 - Bank of China
            309 - Citizens
            318 - U.S. Bank National Association
            320 - PC Financial
            321 - Habib Canadian Bank
            326 - Simplii Financial
            340 - ICICI Bank of Canada
            352 - Digital Commerce Bank
            370 - Wealth One Bank of Canada
            374 - Motus Bank
            383 - Peoples Bank of Canada
            509 - The Canadian Trust Company
            532 - Effort Trust Company
            540 - Manulife Bank
            568 - Peace Hills Trust Company
            608 - Banque Alterna
            614 - ING / Tangerine
            621 - Peoples Trust Company
            623 - Equitable Bank
            703 - Wealthsimple Investments Inc.
            809 - Central 1 Credit Union BC
            815 - Desjardins
            819 - La Fédération des caisses populaires du Manitoba Inc.
            828 - Central 1 Credit Union Ontario
            829 - La Fédération des caisses populaires de l'Ontario Inc.
            837 - Meridian Credit Union
            839 - Central 1 Credit Union Atlantic
            842 - Alterna Savings
            849 - Bayview Credit Union
            853 - Concentra Financial Services
            865 - UNI Financial Coop
            879 - Co-op Credit Society of Manitoba
            889 - Credit Union Central of Saskatchewan
            890 - Alliance des caisses populaires de l'Ontario Limitée
            899 - Credit Union Alberta
        cheque_eft_transit:
          type: string
        cheque_eft_account:
          type: string
        cheque_eft_account_type:
          type: integer
          enum:
            - 0
            - 1
            - 2
          description: |-
            Only for US.
            Enums:
            0 - Checking
            1 - Savings
            2 - Loan Account
        licence:
          type: string
          nullable: true
        note:
          type: string
          nullable: true
        broker_staff_list:
          type: array
          items:
            $ref: "#/components/schemas/Brokerstaff"
        custom_fields:
          type: array
          items: {}
    Brokerstaff:
      type: object
      properties:
        broker_staff_id:
          type: integer
        broker_id:
          type: integer
        x_broker_staff_id:
          type: string
          nullable: true
        import_source:
          type: integer
          nullable: true
        inactive:
          type: integer
          description: |-
            Default 0. 0: false, 1: true.
        type:
          type: integer
          enum:
            - 0
            - 1
            - 2
          description: |-
            Enums:
            0 - Partner
            1 - Broker
            2 - Assistant
        first_name:
          type: string
        last_name:
          type: string
        phone:
          type: string
        email:
          type: string
        licence:
          type: string
          nullable: true
        licence_type:
          type: string
          nullable: true
        licence_expiry:
          type: integer
          nullable: true
        broker:
          $ref: "#/components/schemas/Brokers"
        cheques:
          type: array
          items:
            $ref: "#/components/schemas/Brokerstaffcheques"
        custom_fields:
          type: array
          items: {}
    Brokerstaffcheques:
      type: object
      properties:
        broker_staff_cheque_id:
          type: integer
        broker_staff_id:
          type: integer
        parent_cheque_id:
          type: integer
          nullable: true
        cheque_name:
          type: string
        cheque_use_eft:
          type: integer
        cheque_eft_name:
          type: string
        cheque_eft_bank_id:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 6
            - 10
            - 16
            - 30
            - 39
            - 117
            - 177
            - 219
            - 241
            - 260
            - 275
            - 307
            - 308
            - 309
            - 318
            - 320
            - 321
            - 326
            - 340
            - 352
            - 370
            - 374
            - 383
            - 509
            - 532
            - 540
            - 568
            - 608
            - 614
            - 621
            - 623
            - 703
            - 809
            - 815
            - 819
            - 828
            - 829
            - 837
            - 839
            - 842
            - 849
            - 853
            - 865
            - 879
            - 889
            - 890
            - 899
          description: |-
            Only for Canada.
            Enums:
            0 - N/A
            1 - BMO
            2 - Scotia
            3 - RBC
            4 - TD
            6 - National
            10 - CIBC
            16 - HSBC
            30 - Canadian Western Bank / Western Union
            39 - Laurentian
            117 - Government
            177 - Bank of Canada
            219 - ATB
            241 - Bank of America
            260 - Citi
            275 - KEB Hana
            307 - Industrial and Commercial Bank of China (Canada)
            308 - Bank of China
            309 - Citizens
            318 - U.S. Bank National Association
            320 - PC Financial
            321 - Habib Canadian Bank
            326 - Simplii Financial
            340 - ICICI Bank of Canada
            352 - Digital Commerce Bank
            370 - Wealth One Bank of Canada
            374 - Motus Bank
            383 - Peoples Bank of Canada
            509 - The Canadian Trust Company
            532 - Effort Trust Company
            540 - Manulife Bank
            568 - Peace Hills Trust Company
            608 - Banque Alterna
            614 - ING / Tangerine
            621 - Peoples Trust Company
            623 - Equitable Bank
            703 - Wealthsimple Investments Inc.
            809 - Central 1 Credit Union BC
            815 - Desjardins
            819 - La Fédération des caisses populaires du Manitoba Inc.
            828 - Central 1 Credit Union Ontario
            829 - La Fédération des caisses populaires de l'Ontario Inc.
            837 - Meridian Credit Union
            839 - Central 1 Credit Union Atlantic
            842 - Alterna Savings
            849 - Bayview Credit Union
            853 - Concentra Financial Services
            865 - UNI Financial Coop
            879 - Co-op Credit Society of Manitoba
            889 - Credit Union Central of Saskatchewan
            890 - Alliance des caisses populaires de l'Ontario Limitée
            899 - Credit Union Alberta
        cheque_eft_transit:
          type: string
        cheque_eft_account:
          type: string
        cheque_eft_account_type:
          type: integer
          enum:
            - 0
            - 1
            - 2
          description: |-
            US only
            Enums:
            0 - Checking
            1 - Savings
            2 - Loan Account
    Lawyers:
      type: object
      properties:
        lawyer_id:
          type: integer
        gsid:
          type: integer
        x_lawyer_id:
          type: string
          nullable: true
        x_lawyer_staff_id:
          type: string
          nullable: true
        name:
          type: string
        address:
          type: string
        city:
          type: string
        province:
          type: string
        sub_urb:
          type: string
          nullable: true
        county:
          type: string
          nullable: true
        zip:
          type: string
        phone:
          type: string
        fax:
          type: string
        toll_free:
          type: string
        website:
          type: string
    Lawyerstaff:
      type: object
      properties:
        lawyer_staff_id:
          type: integer
        x_lawyer_staff_id:
          type: string
          nullable: true
        lawyer_id:
          type: integer
        lawyer:
          $ref: "#/components/schemas/Lawyers"
        type:
          type: integer
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
          description: |-
            Enums:
            0 - Partner
            1 - Lawyer
            2 - Clerk
            3 - Paralegal
            4 - Closer
            5 - Pre-Closer
            6 - Post-Closer
        first_name:
          type: string
          nullable: true
        last_name:
          type: string
        phone:
          type: string
          nullable: true
        email:
          type: string
    Appraisers:
      type: object
      properties:
        appraiser_id:
          type: integer
        gsid:
          type: integer
        x_appraiser_id:
          type: string
          nullable: true
        name:
          type: string
          nullable: true
        title:
          type: string
        address:
          type: string
          nullable: true
        city:
          type: string
          nullable: true
        province:
          type: string
          nullable: true
        sub_urb:
          type: string
          nullable: true
        county:
          type: string
          nullable: true
        zip:
          type: string
          nullable: true
        email:
          type: string
          nullable: true
        phone:
          type: string
          nullable: true
        fax:
          type: string
          nullable: true
        contact:
          type: string
          nullable: true
        website:
          type: string
          nullable: true
        notes:
          type: string
          nullable: true
    Appraiserstaff:
      type: object
      properties:
        appraiser_staff_id:
          type: integer
        appraiser_id:
          type: integer
        appraiser:
          $ref: "#/components/schemas/Appraisers"
        first_name:
          type: string
          nullable: true
        last_name:
          type: string
          nullable: true
        phone:
          type: string
          nullable: true
        email:
          type: string
          nullable: true
    Titlecompanies:
      type: object
      properties:
        title_company_id:
          type: integer
        gsid:
          type: integer
        x_title_company_id:
          type: string
          nullable: true
        name:
          type: string
        bank_name:
          type: string
          nullable: true
        bank_address:
          type: string
          nullable: true
        aba:
          type: string
          nullable: true
        account_name:
          type: string
          nullable: true
        account_number:
          type: string
          nullable: true
        city:
          type: string
        province:
          type: string
        sub_urb:
          type: string
          nullable: true
        county:
          type: string
          nullable: true
        zip:
          type: string
        phone:
          type: string
        toll_free:
          type: string
          nullable: true
        policy_amount:
          type: number
          nullable: true
        fax:
          type: string
          nullable: true
    Titlecompanystaff:
      type: object
      properties:
        staff_id:
          type: integer
        title_company_id:
          type: integer
        x_staff_id:
          type: string
          nullable: true
        title_company:
          $ref: "#/components/schemas/Titlecompanies"
        first_name:
          type: string
        last_name:
          type: string
        phone:
          type: string
          nullable: true
        email:
          type: string
          nullable: true
    Employments:
      type: object
      properties:
        employment_id:
          type: integer
        name:
          type: string
          nullable: true
          description: |-
            e.g. Mortgage Automator
        phone:
          type: string
          nullable: true
          description: |-
            e.g. 1234567890
        phone_ext:
          type: string
          nullable: true
          description: |-
            e.g. 1234
        industry:
          type: string
          nullable: true
          description: |-
            e.g. Information Technology
        type:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
          description: |-
            e.g. 1 - Full Time , 2 - Parttime ...
            Enums:
            0 - 
            1 - Full Time
            2 - Part Time
            3 - Seasonal
            4 - Self Employed
        previous_employer:
          type: string
          nullable: true
        history_status:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
          description: |-
            Enums:
            0 - current employment
            1 - 2nd current employment
            2 - past employment
        address_full:
          $ref: "#/components/schemas/Addresses"
        address:
          type: string
          nullable: true
          description: |-
            e.g. Eglinton ave east
        length:
          type: string
          nullable: true
          description: |-
            e.g. 1 years 2 months
        salary:
          type: string
          nullable: true
          description: |-
            e.g. 50000
        occupation:
          type: string
          nullable: true
          description: |-
            Currently mapped to industry field
        job_title:
          type: string
          nullable: true
          description: |-
            e.g. Software Developer
        frequency:
          type: string
          description: |-
            e.g. 1 month
        frequency_of_payment:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
            - 7
          description: |-
            e.g. Monthly
            Enums:
            0 - 
            1 - Annual
            2 - Semi-Annual
            3 - Quarterly
            4 - Monthly
            5 - Semi-Monthly
            6 - Bi-Weekly
            7 - Weekly
        start_date:
          type: integer
          nullable: true
        end_date:
          type: integer
          nullable: true
        current_employment:
          type: integer
          nullable: true
          description: |-
            e.g 0 - Past Employment 1 - Current Employment
        self_employed:
          type: integer
          nullable: true
          description: |-
            e.g 0 - Not Self Employed 1 - Self Employed
    Incomes:
      type: object
      properties:
        id:
          type: integer
        borrower_id:
          type: integer
        type:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
            - 7
            - 8
            - 9
            - 10
            - 11
            - 12
          description: |-
            e.g. Salary , Hourly , Commissions,  etc
            Enums:
            0 - 
            1 - Salary
            2 - Hourly
            3 - Hourly + Commisions
            4 - Commisions
            5 - Interest Income
            6 - Child Support
            7 - Self-Employed
            8 - Pension
            9 - Alimony
            10 - Rental Income
            11 - Other
            12 - Other Employment Income
        description:
          type: string
          nullable: true
          description: |-
            e.g. Mortgage Automator
        period:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
            - 7
          description: |-
            Annual , Semi-Annual , Quaterly , Monthly , ..
            Enums:
            0 - 
            1 - Annual
            2 - Semi-Annual
            3 - Quarterly
            4 - Monthly
            5 - Semi-Monthly
            6 - Bi-Weekly
            7 - Weekly
        amount:
          type: number
          nullable: true
          description: |-
            Other Income amount
    Otherexpenses:
      type: object
      properties:
        expense_id:
          type: number
          description: |-
            If provided, response is the loan's Other Properties Expenses
        name:
          type: string
        amount:
          type: number
    Positions:
      type: object
      properties:
        position_id:
          type: number
          description: |-
            If provided, response is the loan's Other Properties Mortgage Position
        balance:
          type: number
          description: |-
            e.g. 500
        holder:
          type: string
          description: |-
            e.g. Mortgage Automator
        face_value:
          type: number
          nullable: true
          description: |-
            e.g. 500000
        mortgageposition:
          type: integer
          description: |-
            First , Second , Third , Fourth , ..
        payment:
          type: number
          nullable: true
          description: |-
            e.g. 500
        frequency:
          type: integer
          nullable: true
          enum:
            - 1
            - 2
            - 0
          description: |-
            Weekly , bi-weekly, monthly
            Enums:
            1 - Weekly
            2 - Biweekly
            0 - Monthly
        maturity:
          type: string
          nullable: true
          description: |-
            e.g. 540104400
        ratetype:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
          description: |-
            e.g. Fixed, Variable, Adjustable ..
            Enums:
            0 - 
            1 - Fixed
            2 - Variable
            3 - Adjustable
            4 - Capped Variable
            5 - Buydown
        termtype:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
          description: |-
            e.g. Fully Closed, Closed Variable ..
            Enums:
            0 - Fully Closed
            1 - Closed Variable
            2 - Closed, Then Open
            3 - Fully Open
            4 - Minimum, Then Open
        rate:
          type: number
          nullable: true
          description: |-
            e.g. 4
        penalty:
          type: number
          nullable: true
          description: |-
            e.g. 4
        inarrears:
          type: integer
          nullable: true
          description: |-
            0 0r 1
        discharged:
          type: integer
          nullable: true
          description: |-
            0 0r 1
    Assets:
      type: object
      properties:
        id:
          type: number
        borrower_id:
          type: number
        type:
          type: integer
          nullable: true
          description: |-
            e.g. Savings , RRSP , Gift,  etc
        description:
          type: string
          nullable: true
        value:
          type: number
          nullable: true
    Joints:
      type: object
      properties:
        id:
          type: integer
        account_id:
          type: integer
        legal_name:
          type: string
          nullable: true
        stake_percent:
          type: number
        ssn:
          type: string
          nullable: true
    Investments:
      type: object
      properties:
        id:
          type: integer
        mortgage_id:
          type: integer
          nullable: true
        account_id:
          type: integer
          nullable: true
          description: |-
            See Account->get()->account_id
        interest:
          type: number
          nullable: true
        rate_delta:
          type: number
          nullable: true
        rate_type:
          type: integer
          enum:
            - 0
            - 1
            - 2
            - 4
            - 5
            - 6
            - 7
          description: |-
            Enums:
            0 - Full variable rate
            1 - Partial variable rate
            2 - Fixed rate
            4 - Investor at first loss position automatic rate
            5 - A-piece variable rate
            6 - Escalating variable A-piece rate (deprecated / old core loans only)
            7 - Full variable escalating rate (deprecated / old core loans only)
        piece_number:
          type: integer
        enable_escalating_rate:
          type: integer
          description: |-
            Default 0.
        escalating_rate:
          type: number
        escalating_cycles:
          type: integer
        rest_rate:
          type: number
          nullable: true
        standby_amount:
          type: number
          nullable: true
        amount:
          type: number
          nullable: true
        min_rate:
          type: number
          nullable: true
        on_title:
          type: integer
        is_residual:
          type: integer
          description: |-
            If 1 , this investor takes/covers the difference between the borrower and other investor payments.
        iad_style:
          type: integer
          nullable: true
        interest_method:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 6
            - 7
            - 5
          description: |-
            Enums:
            0 - equal amount
            1 - per-diem based
            2 - 31/360
            3 - 360/365
            4 - actual/360
            6 - 30/360 Special
            7 - 30/360 US
            5 - decide on a loan by loan basis
        enable_withhold_tax:
          type: integer
        withhold_tax:
          type: number
          nullable: true
        calculation_properties:
          type: array
          items: {}
    Accounts:
      type: object
      properties:
        account_id:
          type: integer
        x_accountid:
          type: string
          nullable: true
        investor_id:
          type: integer
          description: |-
            If provided, response is the investor's accounts
        internal_account_number:
          type: string
          nullable: true
        legal_name:
          type: string
        vesting_name:
          type: string
          nullable: true
          description: |-
            Only for Account Types Individual and Joint in US. Options are: 
            (blank): for Account Type: individual
            a widow: for Account Type: individual
            a widower: for Account Type: individual
            a single woman: for Account Type: individual
            a single man: for Account Type: individual
            an unmarried woman: for Account Type: individual
            an unmarried man: for Account Type: individual
            a married man as his sole and separate property: for Account Type: individual
            a married woman as her sole and separate property: for Account Type: individual
            (blank): for Account Type: joint
            husband and wife as joint tenants: for Account Type: joint
            wife and husband as joint tenants: for Account Type: joint
            husband and wife as community property with right of surivorship: for Account Type: joint
            wife and husband as community property with right of surivorship: for Account Type: joint
            husband and husband as joint tenants: for Account Type: joint
            wife and wife as joint tenants: for Account Type: joint
            Or any vesting name of your choice.
        check_type:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
          description: |-
            Enums:
            0 - Individual
            1 - Joint
            2 - Company
            3 - Trust
            4 - Personal Trust
            5 - In-Trust
        trust_type:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
            - 17
            - 18
            - 19
            - 20
            - 21
            - 22
            - 30
            - 31
            - 7
            - 8
            - 9
            - 10
            - 11
            - 12
            - 13
            - 14
            - 15
            - 16
            - 23
            - 24
            - 25
            - 26
            - 27
            - 28
            - 29
            - 32
            - 33
            - 34
            - 35
            - 36
          description: |-
            Enums:
            0 - Standard for CA
            1 - Olympia Trust Company for CA
            2 - ComputerShare Trust Company of Canada for CA
            3 - Canadian Western Trust Company for CA
            4 - Blueshore Financial for CA
            5 - Westminster Savings Credit Union for CA
            6 - Community Trust for CA
            17 - BMO Nesbitt Burns for CA
            18 - Investor Company for CA
            19 - National Bank Financial Inc. for CA
            20 - Odlum Brown for CA
            21 - Scotia Capital Inc. for CA
            22 - Central 1 Credit Union for CA
            30 - Raymond James Ltd. for CA
            31 - Odyssey Trust Company for CA
            7 - Pacific Premier Trust for US
            8 - Provident Trust Group for US
            9 - Forge Trust Co. for US
            10 - Millennium Trust Company for US
            11 - Equity Trust Company for US
            12 - The Entrust Group, Inc. for US
            13 - IRAR Trust Co. for US
            14 - MidAtlantic IRA for US
            15 - Vantage Retirement Plans for US
            16 - Other Retirement Plans for US
            23 - New Direction Trust Company for US
            24 - RBC Capital Markets for US
            25 - IRA Financial Trust Company for US
            26 - American Estate & Trust for US
            27 - National Financial Services for US
            28 - Charles Schwab & Co for US
            29 - Madison Trust Company for US
            32 - Direct Trust Company for US
            33 - Advanta IRA for US
            34 - Inspira Financial Trust for US
            35 - iPlan Group for US
            36 - uDirect IRA Services for US
        plan_type:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
            - 7
            - 8
            - 9
            - 10
            - 11
            - 12
            - 13
            - 14
            - 15
            - 16
            - 33
            - 17
            - 18
            - 19
            - 20
            - 21
            - 22
            - 23
            - 24
            - 25
            - 26
            - 27
            - 28
            - 29
            - 30
            - 31
            - 32
          description: |-
            Only for Account Type Trust
            Enums:
            0 -  for CA
            1 - TFSA for CA
            2 - RRSP for CA
            3 - RESP for CA
            4 - SDRSP for CA
            5 - RRIF for CA
            6 - LIRA for CA
            7 - RSP for CA
            8 - LRSP for CA
            9 - RSP (Spousal) for CA
            10 - RIF for CA
            11 - RIF (Spousal) for CA
            12 - RIF (Prescribed) for CA
            13 - LIF for CA
            14 - LRIF for CA
            15 - RLIF for CA
            16 - RLSP for CA
            33 - FHSA for CA
            17 -  for US
            18 - IRA (Traditional) for US
            19 - Roth IRA for US
            20 - SEP IRA for US
            21 - SIMPLE IRA for US
            22 - 401(k) Plan for US
            23 - 403(b) Plan for US
            24 - 457 Plan for US
            25 - Customdial IRA for US
            26 - 529 Plan for US
            27 - Coverdell Education Savings Accounts for US
            28 - HSA for US
            29 - PC Profit Sharing Plan & Trust for US
            30 - Profit Sharing Plan for US
            31 - Defined Benefit Plan for US
            32 - Inherited IRA for US
        account_number:
          type: string
          nullable: true
        enable_withhold_tax:
          type: integer
          nullable: true
        withhold_tax:
          type: number
          nullable: true
        enable_eft:
          type: integer
        eft_name:
          type: string
        eft_bankid:
          type: integer
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 6
            - 10
            - 16
            - 30
            - 39
            - 117
            - 177
            - 219
            - 241
            - 260
            - 275
            - 307
            - 308
            - 309
            - 318
            - 320
            - 321
            - 326
            - 340
            - 352
            - 370
            - 374
            - 383
            - 509
            - 532
            - 540
            - 568
            - 608
            - 614
            - 621
            - 623
            - 703
            - 809
            - 815
            - 819
            - 828
            - 829
            - 837
            - 839
            - 842
            - 849
            - 853
            - 865
            - 879
            - 889
            - 890
            - 899
          description: |-
            Only for Canada.
            Enums:
            0 - N/A
            1 - BMO
            2 - Scotia
            3 - RBC
            4 - TD
            6 - National
            10 - CIBC
            16 - HSBC
            30 - Canadian Western Bank / Western Union
            39 - Laurentian
            117 - Government
            177 - Bank of Canada
            219 - ATB
            241 - Bank of America
            260 - Citi
            275 - KEB Hana
            307 - Industrial and Commercial Bank of China (Canada)
            308 - Bank of China
            309 - Citizens
            318 - U.S. Bank National Association
            320 - PC Financial
            321 - Habib Canadian Bank
            326 - Simplii Financial
            340 - ICICI Bank of Canada
            352 - Digital Commerce Bank
            370 - Wealth One Bank of Canada
            374 - Motus Bank
            383 - Peoples Bank of Canada
            509 - The Canadian Trust Company
            532 - Effort Trust Company
            540 - Manulife Bank
            568 - Peace Hills Trust Company
            608 - Banque Alterna
            614 - ING / Tangerine
            621 - Peoples Trust Company
            623 - Equitable Bank
            703 - Wealthsimple Investments Inc.
            809 - Central 1 Credit Union BC
            815 - Desjardins
            819 - La Fédération des caisses populaires du Manitoba Inc.
            828 - Central 1 Credit Union Ontario
            829 - La Fédération des caisses populaires de l'Ontario Inc.
            837 - Meridian Credit Union
            839 - Central 1 Credit Union Atlantic
            842 - Alterna Savings
            849 - Bayview Credit Union
            853 - Concentra Financial Services
            865 - UNI Financial Coop
            879 - Co-op Credit Society of Manitoba
            889 - Credit Union Central of Saskatchewan
            890 - Alliance des caisses populaires de l'Ontario Limitée
            899 - Credit Union Alberta
        eft_transit:
          type: string
        eft_account:
          type: string
        eft_account_type:
          type: integer
          enum:
            - 0
            - 1
            - 2
          description: |-
            Only for US.
            Enums:
            0 - Checking
            1 - Savings
            2 - Loan Account
        enable_eft_direct_deposit:
          type: integer
          nullable: true
          description: |-
            Default 0. 0: Disable. 1: Enable
        eft_direct_deposit_data_centre:
          type: integer
          enum:
            - 0
            - 120
            - 220
            - 278
            - 300
            - 310
            - 320
            - 330
            - 370
            - 390
            - 420
            - 610
            - 1000
            - 1010
            - 1020
            - 1030
            - 1070
            - 1090
            - 1600
            - 86990
            - 21990
            - 10
            - 86920
            - 81510
            - 86500
            - 86900
            - 11
          description: |-
            Data Centre ID. Only for Canada.
            Enums:
            0 - N/A N/A
            120 - BMO All Regions
            220 - Scotia All Regions
            278 - RBC Regina
            300 - RBC Vancouver
            310 - RBC Montreal
            320 - RBC Toronto
            330 - RBC Halifax
            370 - RBC Winnipeg
            390 - RBC Calgary
            420 - TD All Regions
            610 - National All Regions
            1000 - CIBC Vancouver
            1010 - CIBC Montreal
            1020 - CIBC Toronto
            1030 - CIBC Halifax
            1070 - CIBC Winnipeg
            1090 - CIBC Calgary
            1600 - HSBC All Regions
            86990 - Canadian Western Bank / Western Union All Regions
            21990 - ATB All Regions
            10 - Central 1 Credit Union BC All Regions
            86920 - Central 1 Credit Union Ontario Ontario
            81510 - La Fédération des caisses populaires de l'Ontario Inc. All Regions
            86500 - Central 1 Credit Union Atlantic Atlantic Central
            86900 - Central 1 Credit Union Atlantic BC and Atlantic
            11 - Credit Union Alberta All Regions
        eft_direct_deposit_originator_id:
          type: string
        eft_direct_deposit_company_id:
          type: string
          nullable: true
          description: |-
            Only for US.
        eft_direct_deposit_handling_bank:
          type: string
          description: |-
            Only for US.
        ontitle:
          type: integer
          nullable: true
        default_interest:
          type: number
          nullable: true
        total_funds_to_invest:
          type: number
          nullable: true
        enable_different_tax_address:
          type: integer
          nullable: true
        tax_address:
          $ref: "#/components/schemas/Addresses"
        is_servicer:
          type: integer
        tax_id_or_ssn:
          type: string
          nullable: true
          description: |-
            SIN for Individual Account
        tax_id_type:
          type: integer
          nullable: true
          enum:
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
            - 7
            - 8
            - 9
          description: |-
            CA: Recipient ID Type (T5 Box 23). US: Federal ID Type.
            Enums:
            1 - 1 (Individual)
            2 - 2 (Joint account)
            3 - 3 (Corporation)
            4 - 4 (Association, trust, club, or partnership)
            5 - 5 (Government)
            6 - 1 (EIN)
            7 - 2 (SSN)
            8 - 3 (ITIN)
            9 - 4 (ATIN)
        fund_start_date:
          type: string
        deactivated:
          type: integer
          nullable: true
          description: |-
            Default 0. 0: false, 1: true.
        is_primary:
          type: integer
          description: |-
            Default 0. 0: false, 1: true.
        used_on_loan:
          type: integer
          description: |-
            Default 0. 0: false, 1: true.
        compliance_exemption_rule:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
            - 7
            - 8
            - 9
            - 10
            - 11
            - 12
            - 13
            - 14
            - 15
            - 16
            - 17
          description: |-
            Enums:
            0 - 
            1 - NI 45-106 2.3 [Accredited investor]
            2 - NI 45-106 2.5 [Family, friends and business associates]
            3 - NI 45-106 2.9(1) [Offering memorandum] (BC, NL)
            4 - NI 45-106 2.9(2) [Offering memorandum] (MB, PE, YT, NT, NU)
            5 - NI 45-106 2.9(2.1) [Offering memorandum] (AB, SK, ON, QC, NB, NS)
            6 - NI 45-106 2.10 [Minimum amount investment]
            7 - NI 45-106 2.12 [Asset acquisition]
            8 - NI 45-106 2.13 [Petroleum, natural gas and mining properties]
            9 - NI 45-106 2.14 [Securities for debt]
            10 - NI 45-106 2.19 [Additional investment in investment funds]
            11 - NI 45-106 2.30 [Isolated distribution by issuer]
            12 - Existing security holder exemption 
            13 - Investment dealer exemption (BC, AB, SK, MB, NB)
            14 - MI 45-108 [Crowdfunding] (SK, MB, ON, QC, NB, NS)
            15 - Distributions to purchasers outside of local jurisdiction (BC, AB, NB)
            16 - NI 45-106 5.2 [TSX Venture Exchange offering]
            17 - Other [describe in next column]
        compliance_other_exemption_rule:
          type: string
          nullable: true
          description: |-
            Number of Local Rule/Order/Blanket Order
        compliance_paragraph_number_ni45106s23:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
            - 7
            - 8
            - 9
            - 10
            - 11
            - 12
            - 13
            - 14
            - 15
            - 16
            - 17
            - 18
            - 19
            - 20
            - 21
            - 22
            - 23
            - 24
            - 25
            - 26
            - 27
          description: |-
            Enums:
            0 - 
            1 - a
            2 - b
            3 - c
            4 - d
            5 - e
            6 - e.1
            7 - f
            8 - g
            9 - h
            10 - i
            11 - j
            12 - j.1
            13 - k
            14 - l
            15 - m
            16 - n
            17 - o
            18 - p
            19 - q
            20 - r
            21 - s
            22 - t
            23 - u
            24 - v
            25 - w
            26 - a and/or p
            27 - d and/or q
        compliance_paragraph_number_ni45106s25:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
            - 7
            - 8
            - 9
          description: |-
            Enums:
            0 - 
            1 - a
            2 - b
            3 - c
            4 - d
            5 - e
            6 - f
            7 - g
            8 - h
            9 - i
        compliance_name_ni45106s25:
          type: string
          nullable: true
          description: |-
            NI 45-106 2.5
        compliance_position_ni45106s25:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
          description: |-
            NI 45-106 2.5
            Enums:
            0 - 
            1 - Director (D)
            2 - Executive officer (O)
            3 - Control person (C)
            4 - Founder (F)
        compliance_paragraph_number_ni45106s29:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
            - 7
            - 8
          description: |-
            Enums:
            0 - 
            1 - a
            2 - b
            3 - c
            4 - d
            5 - e
            6 - f
            7 - g
            8 - h
        compliance_is_purchaser_registrant:
          type: integer
          nullable: true
          description: |-
            Default 0. 0: false, 1: true.
        compliance_is_purchaser_insider:
          type: integer
          nullable: true
          description: |-
            Default 0. 0: false, 1: true.
        compliance_legal_name:
          type: string
          nullable: true
        directors:
          type: array
          items:
            $ref: "#/components/schemas/Account_directors"
        trustees:
          type: array
          items:
            $ref: "#/components/schemas/Account_trustees"
        investments:
          type: array
          items:
            $ref: "#/components/schemas/Investments"
        joints:
          type: array
          items:
            $ref: "#/components/schemas/Joints"
        loans:
          type: array
          items:
            $ref: "#/components/schemas/Loans"
        report_fields:
          type: array
          items: {}
        custom_fields:
          type: array
          items: {}
    Account_directors:
      type: object
      properties:
        id:
          type: integer
        account_id:
          type: integer
        legal_name:
          type: string
          nullable: true
    Account_trustees:
      type: object
      properties:
        id:
          type: integer
        account_id:
          type: integer
        legal_name:
          type: string
          nullable: true
        tax_id:
          type: string
          nullable: true
    Default_expenses:
      type: object
      properties:
        id:
          type: integer
        account_id:
          type: integer
        name:
          type: string
          nullable: true
        amount:
          type: number
          nullable: true
        frequency:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
            - 3
          description: |-
            Enums:
            0 - monthly
            1 - quarterly
            2 - semi-annually
            3 - annually
        first_charge_date:
          type: integer
          nullable: true
    Investors:
      type: object
      properties:
        investor_id:
          type: integer
        x_investorid:
          type: string
          nullable: true
        type:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 3
            - 2
            - 4
          description: |-
            Organization -> (1) is deprecated. Organization -> (1) and Fund -> (2) cannot be used in Investor->create.
            Enums:
            0 - Individual
            1 - Organization
            3 - Corporation
            2 - Fund
            4 - Servicer
        mic_name:
          type: string
        mic_leadership_type:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
          description: |-
            Enums:
            0 - President and Secretary
            1 - Director
            2 - Joint Directors
        mic_president:
          type: string
        mic_secretary:
          type: string
        mic_director:
          type: string
        mic_share_label:
          type: integer
          enum:
            - 0
            - 1
          description: |-
            Enums:
            0 - Shares
            1 - Units
        mic_payout:
          type: integer
          description: |-
            Day of each month
        mic_year_end:
          type: integer
          nullable: true
          description: |-
            1: January, 2: February, ..., 11: November, 0: December
        mic_quarterly_statement_date:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
          description: |-
            Enums:
            0 - Quarter End
            1 - Dividend Distribution Date
        mic_cert_issue:
          type: integer
          nullable: true
          description: |-
            Default 0. 0: false, 1: true.
        mic_distribution_method:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
          description: |-
            Enums:
            0 - Specific Date Holdings
            1 - Daily Proportionate Earnings
            2 - # of Days (Investor Specific)
        mic_allow_payouts_exceed_earnings:
          type: integer
          nullable: true
          description: |-
            Default 0. 0: false, 1: true.
        mic_only_allow_monthly_drip:
          type: integer
          nullable: true
          description: |-
            Default 0. Default 0. 0: Only allow Monthly DRIP for Regular Interest Payments. 1: Payout Frequency (under investor DRIP settings) decides the distribution frequency for regular payments - e.g. Quarterly Payout would cause reinvestment of interest each quarter, rather than on a monthly basis.
        mic_compound_interest_until_payout:
          type: integer
          nullable: true
          description: |-
            Default 0. 0: false, 1: true.
        mic_regular_payout_display:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
          description: |-
            Enums:
            0 - Display Interest Earned on First Day of Following Month
            1 - Display Interest Earned on Last Day of Current Month
        mic_onetime_distribution_display:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
          description: |-
            Enums:
            0 - Display One-Time Distribution Earned on Date of Distribution
            1 - Display One-Time Distribution Earned on Last Day of Accrual Period
        mic_deposit_date_mode:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
            - 3
          description: |-
            Enums:
            0 - Include Date of Deposit in Regular Payout/One-Time Distribution Calculation
            1 - Exclude Date of Deposit in Regular Payout/One-Time Distribution Calculation
            2 - Deposits not occurring on the 1st of the month, will wait until the 1st of next month to accrue interest
            3 - Deposits not occurring on the 1st of the month, will exclude date of deposit to accrue interest
        mic_redemption_date_mode:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
          description: |-
            Enums:
            0 - Exclude Date of Redemption in Regular Payout/One-Time Distribution Calculation
            1 - Include Date of Redemption in Regular Payout/One-Time Distribution Calculation
        first_name:
          type: string
        last_name:
          type: string
        dob:
          type: integer
          nullable: true
        homephone:
          type: string
          nullable: true
        mobile:
          type: string
          nullable: true
        email:
          type: string
          nullable: true
        notes:
          type: string
          nullable: true
        company:
          type: string
          nullable: true
        max_ltv:
          type: integer
          nullable: true
        address:
          $ref: "#/components/schemas/Addresses"
        receive_statements_monthly:
          type: number
        accounts:
          type: array
          items:
            $ref: "#/components/schemas/Accounts"
        report_fields:
          type: array
          items: {}
        loans:
          type: array
          items:
            $ref: "#/components/schemas/Loans"
        funds:
          type: array
          items:
            $ref: "#/components/schemas/Investors"
        tags:
          type: array
          items:
            $ref: "#/components/schemas/Tags"
        roles:
          type: array
          items:
            $ref: "#/components/schemas/Roles"
        emd_staff:
          $ref: "#/components/schemas/Emd_staff"
        custom_fields:
          type: array
          items: {}
        dry_run:
          type: integer
          nullable: true
          description: |-
            Field used for debugging purposes internally.
    Funds:
      type: object
      properties:
        id:
          type: number
        fund_id:
          type: number
        x_investorid:
          type: string
        type:
          type: number
        name:
          type: string
        president:
          type: string
        secretary:
          type: string
        share_label:
          type: integer
          enum:
            - 0
            - 1
          description: |-
            Enums:
            0 - Shares
            1 - Units
        payout:
          type: number
          description: |-
            Day of each month
        year_end:
          type: number
          description: |-
            1: January, 2: February, ..., 11: November, 0: December
        quarterly_statement_date:
          type: integer
          enum:
            - 0
            - 1
          description: |-
            Enums:
            0 - Quarter End
            1 - Dividend Distribution Date
        fund_revenue_recognition:
          type: integer
          enum:
            - 0
            - 1
          description: |-
            Enums:
            0 - Cash basis
            1 - Accrual basis
        investor_revenue_recognition:
          type: integer
          enum:
            - 0
            - 1
          description: |-
            Enums:
            0 - Cash basis
            1 - Accrual basis
        investor_payment_type:
          type: integer
          enum:
            - 0
            - 1
            - 2
            - 3
          description: |-
            Enums:
            0 - 
            1 - Eligible Dividend
            2 - Non-Eligible Dividend
            3 - Interest Income
        default_expenses:
          type: array
          items:
            $ref: "#/components/schemas/Default_expenses"
        investor_commitment_prior_to_deposit:
          type: number
          description: |-
            Default 0. 0: false, 1: true.
        new_commitments_overwrite:
          type: number
          description: |-
            Default 0. 0: false, 1: true.
        fund_generated_trade_confirm:
          type: number
          description: |-
            Default 0. 0: false, 1: true.
        issue_statements_per_account:
          type: number
          description: |-
            Default 0. 0: false, 1: true.
        share_price:
          type: integer
          enum:
            - 0
            - 1
          description: |-
            Enums:
            0 - Floating
            1 - Fixed
        nav_calculated:
          type: integer
          enum:
            - 0
            - 1
          description: |-
            Enums:
            0 - Pre-Drip
            1 - Post-Drip
        regular_monthly_payout:
          type: number
          description: |-
            Default 0. 0: false, 1: true.
        variable_payout_type:
          type: integer
          enum:
            - 0
            - 1
          description: |-
            Enums:
            0 - Dividend/Top Up
            1 - Interest Distribution
        per_diem_style:
          type: integer
          enum:
            - 0
            - 1
            - 2
          description: |-
            Enums:
            0 - Month-Specific
            1 - Annual-Even
            2 - 30/360
        regular_payout_style:
          type: integer
          enum:
            - 0
            - 1
          description: |-
            Enums:
            0 - Annual-Even
            1 - Month-Specific
        cert_issue:
          type: number
          description: |-
            Default 0. 0: false, 1: true.
        distribution_method:
          type: integer
          enum:
            - 0
            - 1
            - 2
          description: |-
            Enums:
            0 - Specific Date Holdings
            1 - Daily Proportionate Earnings
            2 - # of Days (Investor Specific)
        withheld_tax:
          type: integer
          enum:
            - 0
            - 1
          description: |-
            Enums:
            0 - affect DRIP
            1 - affect Payout
        allow_payouts_exceed_earnings:
          type: number
          description: |-
            Default 0. 0: false, 1: true.
        only_allow_monthly_drip:
          type: number
          description: |-
            Default 0. 0: true, 1: false.
        compound_interest_until_payout:
          type: number
          description: |-
            Default 0. 0: false, 1: true.
        regular_payout_display:
          type: integer
          enum:
            - 0
            - 1
          description: |-
            Enums:
            0 - Display Interest Earned on First Day of Following Month
            1 - Display Interest Earned on Last Day of Current Month
        onetime_distribution_display:
          type: integer
          enum:
            - 0
            - 1
          description: |-
            Enums:
            0 - Display One-Time Distribution Earned on Date of Distribution
            1 - Display One-Time Distribution Earned on Last Day of Accrual Period
        deposit_date_mode:
          type: integer
          enum:
            - 0
            - 1
            - 2
            - 3
          description: |-
            Enums:
            0 - Include Date of Deposit in Regular Payout/One-Time Distribution Calculation
            1 - Exclude Date of Deposit in Regular Payout/One-Time Distribution Calculation
            2 - Deposits not occurring on the 1st of the month, will wait until the 1st of next month to accrue interest
            3 - Deposits not occurring on the 1st of the month, will exclude date of deposit to accrue interest
        redemption_date_mode:
          type: integer
          enum:
            - 0
            - 1
          description: |-
            Enums:
            0 - Exclude Date of Redemption in Regular Payout/One-Time Distribution Calculation
            1 - Include Date of Redemption in Regular Payout/One-Time Distribution Calculation
        accounts:
          type: array
          items:
            $ref: "#/components/schemas/Accounts"
    Fund_active_investors:
      type: object
      properties:
        fund:
          $ref: "#/components/schemas/Funds"
        month:
          type: number
          description: |-
            Month of the deposit date.
        year:
          type: number
          description: |-
            Year of the deposit date.
        day:
          type: number
          description: |-
            Day of the deposit date.
        name:
          type: string
          description: |-
            Name of the Investor
        account:
          $ref: "#/components/schemas/Accounts"
        share_class:
          $ref: "#/components/schemas/Share_class"
        drip_payout:
          $ref: "#/components/schemas/Drip_payouts"
        share_price:
          type: number
        value:
          type: number
        value_in_percent:
          type: number
        shares_units:
          type: number
        shares_without_penalty:
          type: number
    Tags:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        is_persistent:
          type: integer
          nullable: true
          description: |-
            Default 0. 0: false, 1: true.
        entity_type:
          type: integer
          nullable: true
          enum:
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
            - 7
            - 8
            - 102
            - 103
            - 120
            - 130
          description: |-
            For a specific entity
            Enums:
            1 - loan
            2 - client
            3 - investor
            4 - broker
            5 - lawyer
            6 - titlecompany
            7 - appraiser
            8 - emd
            102 - task
            103 - deftask
            120 - lender
            130 - condocorporation
    Emds:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
          nullable: true
        abbreviation:
          type: string
        address:
          $ref: "#/components/schemas/Addresses"
        phone:
          type: string
          nullable: true
        fax:
          type: string
          nullable: true
        email:
          type: string
          nullable: true
        website:
          type: string
          nullable: true
        contact:
          type: string
          nullable: true
        notes:
          type: string
          nullable: true
        tags:
          type: array
          items:
            $ref: "#/components/schemas/Tags"
        custom_fields:
          type: array
          items: {}
    Emd_staff:
      type: object
      properties:
        id:
          type: integer
        emd:
          $ref: "#/components/schemas/Emds"
        first_name:
          type: string
          nullable: true
        last_name:
          type: string
          nullable: true
        email:
          type: string
          nullable: true
        phone:
          type: string
          nullable: true
        disabled:
          type: integer
          nullable: true
          description: |-
            Default 0. 0: false, 1: true.
        custom_fields:
          type: array
          items: {}
    Roles:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        entity_type_id:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
            - 7
            - 8
            - 101
          description: |-
            If provided, response is a list of roles in which that entity type e.g. investor is involved
            Enums:
            0 - N/A
            1 - loan
            2 - client
            3 - investor
            4 - broker
            5 - lawyer
            6 - titlecompany
            7 - appraiser
            8 - emd
            101 - substatus
        is_system_role:
          type: integer
          nullable: true
          description: |-
            Default 0. 0: false, 1: true.
        users:
          type: array
          items:
            $ref: "#/components/schemas/Users"
    Users:
      type: object
      properties:
        user_id:
          type: integer
        name:
          type: string
          nullable: true
        email:
          type: string
          nullable: true
        phone:
          type: string
          nullable: true
        roles:
          type: array
          items:
            $ref: "#/components/schemas/Roles"
    Loan_note:
      type: object
      properties:
        id:
          type: integer
        note:
          type: string
        date:
          type: integer
          nullable: true
    Loan_note_for_loan_update:
      type: object
      properties:
        id:
          type: integer
        note:
          type: string
    Main_property_for_loan_update:
      type: object
      properties:
        address:
          $ref: "#/components/schemas/Addresses"
        value:
          type: number
          nullable: true
        property_tax:
          type: number
          nullable: true
        property_tax_monthly:
          type: number
          nullable: true
        property_tax_holdback:
          type: number
        property_tax_monthly_holdback:
          type: number
          nullable: true
        property_tax_url:
          type: string
          nullable: true
        property_tax_id:
          type: string
          nullable: true
        condo_fees:
          type: number
          nullable: true
        heating_fees:
          type: number
        property_built_date:
          type: integer
          nullable: true
          description: |-
            Unix timestamp integer: number of seconds since Jan 01, 1970 in GMT/UTC timezone
        lot_size:
          type: string
        lot_size_unit:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
          description: |-
            Enums:
            0 - Sq Feet
            1 - Ac
            2 - Sq Meters
        living_space:
          type: string
          nullable: true
        living_space_unit:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
          description: |-
            Enums:
            0 - Sq Feet
            1 - Ac
            2 - Sq Meters
        rental_income:
          type: number
          nullable: true
        legal:
          type: string
          nullable: true
        occupancy:
          type: integer
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
          description: |-
            Enums:
            0 - 
            1 - Owner-Occupied
            2 - Rental
            3 - Owner-Occupied/Tenanted
            4 - Second Home
            5 - Vacant
        tenure:
          type: integer
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
          description: |-
            Enums:
            0 - 
            1 - Freehold
            2 - Leasehold
            3 - Condo
            4 - Co-Op
        property_type:
          type: integer
          nullable: true
          enum:
            - 1
            - 2
            - 3
            - 9
            - 7
            - 8
            - 4
            - 6
            - 11
            - 0
          description: |-
            Enums:
            1 - Detached
            2 - Semi-Detached
            3 - Row/Town House
            9 - Apartment
            7 - Mobile
            8 - Stacked
            4 - Commercial
            6 - Land
            11 - Condo
            0 - Other
        property_type_other_description:
          type: string
        purchase_price:
          type: number
          nullable: true
        propertyjurisdiction:
          type: string
          nullable: true
        subdivision_subsection:
          type: string
          nullable: true
        propertylronum:
          type: number
          nullable: true
        propertypin:
          type: string
          nullable: true
        propertypintail:
          type: string
          nullable: true
        propertyestate:
          type: number
          nullable: true
        xpropertyid:
          type: string
          nullable: true
        propertyjurisdiction:
          type: string
          nullable: true
        subdivision_subsection:
          type: string
          nullable: true
        repair_cost:
          type: number
          nullable: true
        appraised_date:
          type: number
          nullable: true
          description: |-
            Unix timestamp integer: number of seconds since Jan 01, 1970 in GMT/UTC timezone
        layout:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 6
            - 2
            - 3
            - 4
            - 5
            - 11
            - 12
            - 13
            - 14
            - 15
            - 16
            - 17
            - 18
            - 19
            - 20
            - 21
            - 22
            - 23
          description: |-
            Enums:
            0 - Empty. For loan types: Standard (0), Construction (1), Commercial (2), Fix & Flip (3), Personal (4)
            1 - Single Family. For loan types: Standard (0), Construction (1), Fix & Flip (3), Personal (4)
            6 - Multi Family
            2 - Duplex. For loan types: Standard (0), Construction (1), Fix & Flip (3), Personal (4)
            3 - Tri Plex. For loan types: Standard (0), Construction (1), Fix & Flip (3), Personal (4)
            4 - Four Plex. For loan types: Standard (0), Construction (1), Fix & Flip (3), Personal (4)
            5 - Modular. For loan types: Standard (0), Construction (1), Fix & Flip (3), Personal (4)
            11 - Retail. For loan types: Commercial (2)
            12 - Hospitality. For loan types: Commercial (2)
            13 - Multi Family. For loan types: Standard (0), Construction (1), Fix & Flip (3)
            14 - Mixed use. For loan types: Commercial (2)
            15 - Office. For loan types: Commercial (2)
            16 - Assisted living. For loan types: Commercial (2)
            17 - Medical. For loan types: Commercial (2)
            18 - Light Industrial. For loan types: Commercial (2)
            19 - Storage. For loan types: Commercial (2)
            20 - Special purpose. For loan types: Commercial (2)
            21 - Restaurant. For loan types: Commercial (2)
            22 - Land. For loan types: Commercial (2)
            23 - Other (fill in Property Description). For loan types: Commercial (2)
        custom_fields:
          type: array
          items: {}
    Other_properties:
      type: object
      properties:
        property_id:
          type: number
        loan_id:
          type: integer
        address:
          $ref: "#/components/schemas/Addresses"
        value:
          type: number
          nullable: true
        property_tax:
          type: number
          nullable: true
        property_tax_id:
          type: string
          nullable: true
        condo_fees:
          type: number
          nullable: true
        heating_fees:
          type: number
        lot_size:
          type: string
        living_space:
          type: string
          nullable: true
        rental_income:
          type: number
          nullable: true
        legal:
          type: string
          nullable: true
        property_entry_details:
          type: string
          nullable: true
        municipal_assessment_year:
          type: string
          nullable: true
        is_blanket:
          type: number
          nullable: true
          description: |-
            1 for blanket property, 0 for tagged property
        custom_fields:
          type: array
          items: {}
        insurances:
          type: array
          items:
            $ref: "#/components/schemas/Insurances"
        otherexpenses:
          type: array
          items:
            $ref: "#/components/schemas/Otherexpenses"
        positions:
          type: array
          items:
            $ref: "#/components/schemas/Positions"
    Mortgage_for_loan_update:
      type: object
      properties:
        id:
          type: integer
        total:
          type: number
          nullable: true
        amount:
          type: number
          nullable: true
          description: |-
            Loan Amount for Standard Loan Type. Initial Advance for Construction Loan Type or Standard Loan Type with Mortgage Application Type. Advance at Closing for Fix & Flip Loan Type.
        construction_lien_holdback:
          type: number
          nullable: true
        construction_lien_holdback_days:
          type: integer
        standby_interest:
          type: number
          nullable: true
          description: |-
            Number in percentage e.g. 10.99 stands for 10.99%. Standby Interest for Construction Loan Type. Standby Interest for Fix & Flip Loan Type is set to Interest Rate if 'Construction, Fix & Flip Loans: Charge Interest on Total Facility/Total Loan' is enabled under Company Settings > Optional Loan Fields > Commitment Fields
        enable_variable_rate:
          type: integer
          nullable: true
          description: |-
            1 to enable, 0 to disable.
        enable_escalating_rate:
          type: integer
          description: |-
            1 to enable, 0 to disable.
        escalating_rate_starts_in:
          type: integer
        escalating_rate:
          type: number
          nullable: true
          description: |-
            Number in percentage e.g. 10.99 stands for 10.99%.
        interest:
          type: number
          nullable: true
          description: |-
            Number in percentage e.g. 10.99 stands for 10.99%. If variable rate is enabled, the interest rate = Primate Rate + {prime_delta} >= {minimum_rate}.
        rate_index:
          type: integer
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 5
            - 8
            - 9
            - 10
            - 14
            - 15
            - 16
            - 18
            - 19
            - 21
            - 22
            - 24
            - 25
            - 26
            - 28
            - 29
            - 31
            - 32
            - 36
            - 38
            - 40
            - 42
            - 47
            - 51
            - 52
            - 57
            - 58
            - 65
            - 66
            - 67
            - 68
            - 70
            - 71
            - 72
            - 73
            - 76
            - 80
            - 82
            - 88
            - 89
            - 90
            - 92
            - 94
            - 95
            - 97
            - 98
            - 103
            - 104
            - 105
            - 107
            - 108
            - 109
            - 123
            - 130
            - 134
            - 135
            - 137
            - 139
            - 143
            - 145
            - 149
            - 150
            - 155
            - 157
            - 160
            - 161
            - 162
            - 163
            - 164
            - 165
            - 167
            - 168
            - 217
          description: |-
            Enums:
            0 - N/A
            1 - MCAP
            2 - TD
            3 - CIBC
            4 - RBC
            5 - WSJ Prime
            8 - Custom CA 2 Enabled
            9 - TEST
            10 - GG
            14 - TEST
            15 - TEST2
            16 - TEST
            18 - SRL TD
            19 - Test
            21 - Prime Rate
            22 - My NEw Index
            24 - Capstone Custom
            25 - Test Custom Index
            26 - RBC
            28 - gio's rate
            29 - gio's second rate
            31 - Custom Index
            32 - SOFR
            36 - Lan Look Back
            38 - BMO
            40 - Houze
            42 - TEST2
            47 - National Bank
            51 - WY Test
            52 - WSJ
            57 - GCMIC Prime
            58 - SOFR TEST
            65 - Test
            66 - DMIC TD Index
            67 - Custom
            68 - new
            70 - yup
            71 - no
            72 - Adam Custom
            73 - EQB
            76 - MDV-52646
            80 - Custom Index
            82 - Custom Decrease
            88 - TC
            89 - SOFR
            90 - Custom Index 2
            92 - WSJ Prime
            94 - SOFR
            95 - Custom Index 2022
            97 - Shirkhan's Rate
            98 - SOFR
            103 - Daria Test
            104 - SOFR
            105 - Custom
            107 - bmo
            108 - DONT DELETE !!! Variable rate test class
            109 - DONT DELETE !!! Variable rate test class 2
            123 - TD (1st of Month)
            130 - MyIndex
            134 - Camila_test_index
            135 - RTIndex
            137 - 2 nd cycle
            139 - 2 nd cycle and discharge
            143 - val_testing
            145 - val_testing_2
            149 - MDV-22108 Index
            150 - Eli's rate
            155 - Index 2
            157 - Robert Cheung
            160 - Gio's index
            161 - Gagan
            162 - SOFR
            163 - Gio's Index
            164 - CCC
            165 - Hell yeah
            167 - BMO
            168 - New Index
            217 - ABCP- BMO
        minimum_rate:
          type: number
          nullable: true
          description: |-
            Number in percentage e.g. 10.99 stands for 10.99%.
        prime_delta:
          type: number
          nullable: true
          description: |-
            Number in percentage e.g. 10.99 stands for 10.99%. Default 0 for non-variable-rate interest. Default the same as {interest} rate for variable-rate interest.
        term_mode:
          type: integer
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
          description: |-
            Not available for Personal Loan Type
            Enums:
            0 - Fully Closed
            1 - Closed Variable
            2 - Closed, Then Open
            3 - Fully Open
            4 - Minimum, Then Open
        defaulted_rate:
          type: number
          nullable: true
          description: |-
            Number in percentage e.g. 10.99 stands for 10.99%.
        interest_method:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
            - 6
            - 7
            - 5
          description: |-
            Enums:
            0 - equal amount
            1 - per-diem based
            2 - 31/360
            3 - 360/365
            4 - actual/360
            6 - 30/360 Special
            7 - 30/360 US
            5 - decide on a loan by loan basis
        position:
          type: integer
          enum:
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
            - 7
          description: |-
            Enums:
            1 - First
            2 - Second
            3 - Third
            4 - Fourth
            5 - Fifth
            6 - Sixth
            7 - Seventh
        term:
          type: integer
        holdback_amount:
          type: number
          nullable: true
          description: |-
            Default 0.
        holdback_app_mode:
          type: integer
          enum:
            - 0
            - 1
            - 2
          description: |-
            Enums:
            0 - Apply upfront (deferred payments)
            1 - Spread evenly
            2 - Apply at the end
        holdback_app_cycle:
          type: number
          nullable: true
          description: |-
            Months count to spread holdback evenly over.
            					Cannot be empty if holdback_app_mode = 1 (spread evenly)
            					Cannot be > 0 if holdback_app_mode != 1 (any other than “spread evenly”)
        holdback_start_at:
          type: number
          nullable: true
          description: |-
            Starting from month number from which holdback over. (Applies only (and only allowed) when holdback_app_mode is 0).
            							Cannot be empty if holdback_app_mode = 0 (Apply Upfront).
            							Cannot be > 0 if holdback_app_mode != 0 (any other than “Apply Upfront”).
        repay_mode:
          type: integer
          enum:
            - 0
            - 1
            - 2
          description: |-
            Default 0.
            Enums:
            0 - Interest Only / Interest Only Deferred
            1 - Principal + Interest
            2 - Capitalizing Interest
        defer_int_pay:
          type: integer
          description: |-
            Default 0. 1: defer interest payment. It's set when Repayment Type is Interest Only Deferred.
        main_defer_int_pay:
          type: integer
          description: |-
            Default 0.
            
            					0: When {holdback_amount} is specified, "Interest Schedule > charge interest at monthly payment" is enabled. Otherwise, "Interest Schedule > holdback / PPI" is enabled.
            
            					1: “Interest Schedule > defer interest payments until the next advance” is enabled.
        amort_in_years:
          type: number
          nullable: true
          description: |-
            Default 25 in years. If {repay_mode} is Principal Interest (1) and {amort_in_years} is not provided, {amort_yearmonth_years} and {amort_yearmonth_months} combined in years will be the default.
        amort_yearmonth_years:
          type: integer
          nullable: true
          description: |-
            To combine with {amort_yearmonth_months}.
        amort_yearmonth_months:
          type: number
          nullable: true
          description: |-
            To combine with {amort_yearmonth_years}.
        amort_compounding:
          type: integer
          enum:
            - 52
            - 26
            - 24
            - 12
            - 4
            - 2
            - 1
          description: |-
            Enums:
            52 - Weekly
            26 - Bi-Weekly
            24 - Semi-Monthly
            12 - Monthly
            4 - Quarterly
            2 - Semi-Annually
            1 - Annually
        frequency:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
            - 3
            - 7
          description: |-
            Default is 0 (Monthly)
            Enums:
            0 - Monthly
            1 - Semi-Monthly
            2 - Weekly
            3 - Bi-Weekly
            7 - Quarterly
        accelerate_payment:
          type: integer
          description: |-
            Default 0. 1 is to enable accelerate payment for {frequency} is Weekly (2) or Bi-Weekly (3)
        funding_date:
          type: integer
          nullable: true
        closing_date:
          type: integer
          nullable: true
          description: |-
            The field is shown if this is enabled: Company Settings > Optional Loan Fields > Investor Section > Different Closing vs. Payout Dates. It's greater than or equal to {funding_date}.
        doc_date:
          type: integer
          nullable: true
          description: |-
            The field is shown if this is enabled: Company Settings > Optional Loan Fields > Investor Section > Custom Maturity Date.
        pay_day:
          type: integer
          description: |-
            1 is Day 1. Default is 1.
        pay_day_type:
          type: integer
          nullable: true
          description: |-
            0 (default) or 1. 0 means start of each month or from quarterly start. 1 means before month end or from quarter end.
            
            0: Day {pay_day} from quarter start for {frequency} is Quarterly (7)
            0: Day {pay_day} of each month for {frequency} is not Quarterly (7)
            
            1: Day {pay_day} from quarter end for {frequency} is Quarterly (7)
            1: Day {pay_day} before month end for {frequency} is not Quarterly (7)
        investor_payout_day:
          type: integer
          nullable: true
          description: |-
            Default Company Settings > Default Investor Payout Day, {payday} if > 0, or 1
        investor_payout_day_2:
          type: integer
          nullable: true
          description: |-
            Default {investor_payout_day}. It's shown when {investor_payout_type} is start of quarter/month (0) and {frequency} is Semi-Monthly (1)
        investor_payout_type:
          type: integer
          nullable: true
          description: |-
            Default 0. Investors get paid on 0: Day from start of quarter/month, 1: Day from end of quarter/month, 2: Day from borrower payment date.
            
            0: Day {investor_payout_day} and {investor_payout_day_2} of month following end of quarter for {frequency} is Quarterly (7)
            0: Day {investor_payout_day} and {investor_payout_day_2} of each month for {frequency} is not Quarterly (7)
            
            1: Day {investor_payout_day} and {investor_payout_day_2} before month end of month following end of the quarter for {frequency} is Quarterly (7)
            1: Day {investor_payout_day} and {investor_payout_day_2} before month end for {frequency} is not Quarterly (7)
            
            2: Day {investor_payout_day} and {investor_payout_day_2} from borrower payment date
        pay_method:
          type: integer
          description: |-
            Default 0. Only Australia has 2.
        early_term_penalty_in_months:
          type: number
          nullable: true
          description: |-
            Default is Company Settings > Default Settings & Rates > Early Termination Penalty in months. Shown when {term_mode} is Fully Closed (0) and {type} is not Personal (4)
        early_term_penalty_first_months:
          type: number
          nullable: true
          description: |-
            Default 0. Early Term. Type: {term_mode}. For the first {early_term_penalty_first_months} month(s), the penalty will be {early_term_penalty_first_months_amount} month(s)
        type:
          type: integer
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
          description: |-
            Enums:
            0 - Standard
            1 - Construction
            2 - Commercial
            3 - Fix & Flip
            4 - Personal
        application_type:
          type: integer
          nullable: true
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
          description: |-
            Enums:
            0 - Mortgage
            1 - LOC
            2 - Bridge
            3 - Deed of Trust
            4 - Promissory Note
        early_term_penalty_first_months_amount:
          type: number
          nullable: true
          description: |-
            Default 0. Early Term. Type: {term_mode}. For the first {early_term_penalty_first_months} month(s), the penalty will be {early_term_penalty_first_months_amount} month(s)
        down_payment:
          type: number
          nullable: true
        early_term_penalty_min_months_then_open:
          type: number
          nullable: true
          description: |-
            for Early Term. Type {term_mode} is 'Minimum, Then Open' (4)
        early_term_penalty_min_amount_then_open:
          type: number
          nullable: true
          description: |-
            for Early Term. Type {term_mode} is 'Minimum, Then Open' (4)
        early_term_penalty_closed_variable_after_months:
          type: number
          nullable: true
          description: |-
            for Early Term. Type {term_mode} is 'Closed Variable' (1)
        fees:
          $ref: "#/components/schemas/Fees"
        custom_fees:
          type: array
          items:
            $ref: "#/components/schemas/Customfees"
    Apikey:
      type: object
      properties:
        gsid:
          type: integer
        name:
          type: string
    Loan_amenity:
      type: object
      properties:
        amenity_id:
          type: integer
        loan_id:
          type: integer
        amenity_number:
          type: number
        amenity_description:
          type: string
    Tax_payment_schedules:
      type: object
      properties:
        ps_id:
          type: integer
        due_date:
          type: integer
          nullable: true
        amount:
          type: number
          nullable: true
    Share_class:
      type: object
      properties:
        share_class_id:
          type: number
        name:
          type: string
    Drip_payouts:
      type: object
      properties:
        percent:
          type: number
          description: |-
            DRIP % for either reinvest or takeout
        amount:
          type: number
          description: |-
            DRIP amount for either reinvest or takeout
        is_fixed_amount:
          type: boolean
          description: |-
            DRIP amount for either reinvest or takeout
        frequency:
          type: integer
          enum:
            - 0
            - 1
            - 2
            - 3
          description: |-
            DRIP payout frequency value
            Enums:
            0 - monthly
            1 - quarterly
            2 - semi-annually
            3 - annually
        frequency_name:
          type: string
          description: |-
            DRIP payout frequency name
        mode:
          type: integer
          enum:
            - 0
            - 1
          description: |-
            Enums:
            0 - reinvest
            1 - takeout
    Additional_reserves:
      type: object
      properties:
        id:
          type: number
        loan_id:
          type: integer
        additional_reserve_name:
          type: string
          description: |-
            e.g Property Tax, Insurance , Condo Fees etc
        balance_asoftoday:
          type: number
          description: |-
            Additional Reserve balance as of today
        balance_atfunding:
          type: number
          description: |-
            Additional Reserve balance at funding.
        addr_id:
          type: number
          nullable: true
        description:
          type: string
          nullable: true
    Propertyowners:
      type: object
      properties:
        owner_id:
          type: integer
        loan_id:
          type: integer
        loan_property_id:
          type: integer
        owner_name:
          type: string
        owner_capacity:
          type: string
        owner_share:
          type: number
    Credit_reports:
      type: object
      properties:
        report_id:
          type: integer
        borrower_id:
          type: integer
          nullable: true
        loan_id:
          type: integer
          nullable: true
          description: |-
            A credit report may associate with a loan.
        credit_bureau_name:
          type: string
          nullable: true
        source:
          type: string
        score:
          type: number
          nullable: true
        pull_date:
          type: integer
        report:
          type: string
          nullable: true
          description: |-
            Mortgage Automator Format or other credit bureau report format
        fixed_format:
          type: string
          nullable: true
          description: |-
            Equifax Full File Fixed (FFF) format
        pio:
          type: string
          nullable: true
          description: |-
            Equifax PIO format
        pdf:
          type: string
          nullable: true
          description: |-
            Equifax Consumer Credit Report PDF, CoreLogic PDF
        xml:
          type: string
          nullable: true
          description: |-
            Equifax XML, CoreLogic XML
    Background_tasks:
      type: object
      properties:
        id:
          type: integer
          description: |-
            Unique Task ID
        title:
          type: string
        status_text:
          type: string
        status:
          type: number
        add_date:
          type: integer
          description: |-
            Unix timestamp when the task was created
        start_date:
          type: integer
          description: |-
            Unix timestamp when the task was started
        end_date:
          type: integer
          description: |-
            Unix timestamp when the task was completed
        response:
          type: string
          description: |-
            The response payload
        data:
          type: array
          items: {}
          description: |-
            Additional data depending on the type of task
    Refresh_generatedfield:
      type: object
      properties:
        task_ids:
          type: array
          items: {}
          description: |-
            The Task for this request
    Report:
      type: object
      properties:
        rbpresetid:
          type: integer
          description: |-
            Report Preset ID
        rbsavedfilterid:
          type: number
          description: |-
            The Filter ID to apply
        format:
          type: string
          description: |-
            Report Format
        start_date:
          type: integer
          description: |-
            Unix timestamp for the report's start date range
        end_date:
          type: integer
          description: |-
            Unix timestamp for the report's end date range
        rbpresetname:
          type: string
          description: |-
            Report Builder Preset Name
        download_link:
          type: string
          description: |-
            Download Link
    Servicing_transformations:
      type: object
      properties:
        results:
          type: array
          items: {}
          description: |-
            Array of Results
    Pac:
      type: object
      properties:
        results:
          type: array
          items: {}
          description: |-
            Array of Results
    Action_logs:
      type: object
      properties:
        id:
          type: integer
        user:
          type: string
          nullable: true
        action:
          type: string
        extra:
          type: string
          nullable: true
        module:
          type: string
          nullable: true
        submodule:
          type: string
          nullable: true
        time:
          type: integer
          nullable: true
    filterInteger:
      type: object
      properties:
        gte:
          type: integer
        lte:
          type: integer
    filterNumber:
      type: object
      properties:
        gte:
          type: number
        lte:
          type: number
    filterString:
      type: object
      properties:
        gte:
          type: string
        lte:
          type: string
