{
  "schemaVersion": "1.0",
  "title": "Broker-Dealer Firm Dataset",
  "$comment": "Broker-Dealer Firm Dataset",
  "BrokerDealerResponse": {
    "type": "object",
    "properties": {
      "brokerDealerFirms": {
        "type": "array",
        "description": "Array of broker-dealer firm records",
        "items": {
          "$ref": "#/definitions/BrokerDealerFirm"
        }
      }
    }
  },
  "definitions": {
    "BrokerDealerFirm": {
      "type": "object",
      "properties": {
        "firmCrdNumber": {
          "type": "integer",
          "format": "int64",
          "description": "Central Registration Depository number assigned to the broker-dealer firm"
        },
        "applicantName": {
          "type": "string",
          "description": "Official legal name of the broker-dealer applicant",
          "maxLength": 255
        },
        "dbaName": {
          "type": "string",
          "description": "Doing Business As name (trade name) if different from legal name",
          "maxLength": 255
        },
        "secNumber": {
          "type": "string",
          "description": "SEC registration number assigned to the broker-dealer",
          "maxLength": 20
        },
        "irsNumber": {
          "type": "string",
          "description": "IRS Employer Identification Number (EIN)",
          "maxLength": 20
        },
        "mainAddress": {
          "$ref": "#/definitions/Address",
          "description": "Primary physical address of the main office"
        },
        "mailingAddress": {
          "$ref": "#/definitions/Address",
          "description": "Mailing address for correspondence"
        },
        "secStatus": {
          "$ref": "#/definitions/SECStatus",
          "description": "Current SEC registration status information"
        },
        "finraStatus": {
          "$ref": "#/definitions/FINRAStatus",
          "description": "Current FINRA membership status information"
        },
        "statesRegistered": {
          "type": "array",
          "description": "Array of state codes where the broker-dealer is registered",
          "items": {
            "type": "string",
            "description": "Two-letter state abbreviation code",
            "maxLength": 2,
            "enum": [
              "AK", "AL", "AR", "AZ", "CA", "CO", "CT", "DC", "DE", "FL",
              "GA", "HI", "IA", "ID", "IL", "IN", "KS", "KY", "LA", "MA",
              "MD", "ME", "MI", "MN", "MO", "MS", "MT", "NC", "ND", "NE",
              "NH", "NJ", "NM", "NV", "NY", "OH", "OK", "OR", "PA", "RI",
              "SC", "SD", "TN", "TX", "UT", "VA", "VT", "WA", "WI", "WV", "WY"
            ]
          }
        },
        "formBD": {
          "$ref": "#/definitions/FormBD",
          "description": "Form BD question information and indicators"
        },
        "legalStatus": {
          "type": "string",
          "description": "Legal status of the broker-dealer",
          "maxLength": 50
        },
        "typesOfBusiness": {
          "type": "array",
          "description": "Array of business type codes indicating activities conducted by the broker-dealer",
          "items": {
            "type": "string",
            "description": "Business activity code",
            "maxLength": 3,
            "oneOf": [
              {
                "const": "PCB",
                "description": "Put and call broker or dealer or option writer"
              },
              {
                "const": "BDR",
                "description": "Broker or dealer retailing corporate equity securities over-the-counter"
              },
              {
                "const": "MSB",
                "description": "Municipal securities broker"
              },
              {
                "const": "NEX",
                "description": "Non-exchange member arranging for transactions in listed securities by exchange member"
              },
              {
                "const": "EMC",
                "description": "Exchange member engaged in exchange commission business other than floor activities"
              },
              {
                "const": "EMF",
                "description": "Exchange member engaged in floor activities"
              },
              {
                "const": "IDM",
                "description": "Broker or dealer making inter-dealer markets in corporate securities over-the-counter"
              },
              {
                "const": "BDD",
                "description": "Broker or dealer selling corporate debt securities"
              },
              {
                "const": "USG",
                "description": "Underwriter or selling group participant (corporate securities other than mutual funds)"
              },
              {
                "const": "MFU",
                "description": "Mutual fund underwriter or sponsor"
              },
              {
                "const": "MFR",
                "description": "Mutual fund retailer"
              },
              {
                "const": "GSD",
                "description": "U.S. government securities dealer"
              },
              {
                "const": "GSB",
                "description": "U.S. government securities broker"
              },
              {
                "const": "MSD",
                "description": "Municipal securities dealer"
              },
              {
                "const": "VLA",
                "description": "Broker or dealer selling variable life insurance or annuities"
              },
              {
                "const": "SSL",
                "description": "Solicitor of time deposits in a financial institution"
              },
              {
                "const": "RES",
                "description": "Real estate syndicator"
              },
              {
                "const": "OGI",
                "description": "Broker or dealer selling gas or oil interests"
              },
              {
                "const": "BIA",
                "description": "Broker or dealer selling securities of only one issuer or associate issuers (other than mutual funds)"
              },
              {
                "const": "NPB",
                "description": "Broker or dealer selling securities of non-profit organizations (e.g., churches, hospitals)"
              },
              {
                "const": "IAD",
                "description": "Investment advisory services"
              },
              {
                "const": "TAP",
                "description": "Broker or dealer selling tax shelters or limited partnerships in primary distributions"
              },
              {
                "const": "TAS",
                "description": "Broker or dealer selling tax shelters or limited partnerships in the secondary market"
              },
              {
                "const": "TRA",
                "description": "Trading securities for own account"
              },
              {
                "const": "PLA",
                "description": "Private placements of securities"
              },
              {
                "const": "MRI",
                "description": "Broker or dealer selling interests in mortgages or other receivables"
              },
              {
                "const": "BNA",
                "description": "Broker or dealer involved in a networking, kiosk, or similar arrangement with a bank, savings bank or association, or credit union"
              },
              {
                "const": "INA",
                "description": "Broker or dealer involved in a networking, kiosk, or similar arrangement with an insurance company or agency"
              },
              {
                "const": "OTH",
                "description": "Free-form description provided by filer on Schedule D of the form BD"
              },
              {
                "const": "CMD",
                "description": "Effects transactions in commodity futures, commodities or commodity options as a broker for others or as a dealer for its own account"
              },
              {
                "const": "XSC",
                "description": "Free-form description provided by filer on Schedule D of the form BD"
              }
            ]
          }
        },
        "ownersAndOfficers": {
          "type": "array",
          "description": "Array of owners and officers associated with the broker-dealer",
          "items": {
            "$ref": "#/definitions/OwnerOfficer"
          }
        }
      }
    },
    "Address": {
      "type": "object",
      "properties": {
        "street1": {
          "type": "string",
          "description": "Primary street address line 1",
          "maxLength": 50
        },
        "street2": {
          "type": "string",
          "description": "Street address line 2 (suite, floor, etc.)",
          "maxLength": 50
        },
        "city": {
          "type": "string",
          "description": "City name",
          "maxLength": 50
        },
        "state": {
          "type": "string",
          "description": "State or province code",
          "maxLength": 2
        },
        "postalCode": {
          "type": "string",
          "description": "Postal or ZIP code",
          "maxLength": 11
        },
        "country": {
          "type": "string",
          "description": "Country name",
          "maxLength": 50
        }
      }
    },
    "SECStatus": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "description": "Current SEC registration status",
          "oneOf": [
            {
              "const": "APPROVED",
              "description": "Indicates SEC registration approval"
            },
            {
              "const": "TERMREQUEST",
              "description": "Indicates a termination request has been filed"
            },
            {
              "const": "CONDITIONAL",
              "description": "Indicates conditional approval with specific requirements"
            },
            {
              "const": "PENDINGWD",
              "description": "Indicates a pending withdrawal status"
            }
          ]
        },
        "statusDate": {
          "type": "string",
          "format": "date",
          "description": "Date the current status became effective YYYY-MM-DD",
          "maxLength": 10
        }
      }
    },
    "FINRAStatus": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "description": "Current FINRA membership status",
          "oneOf": [
            {
              "const": "APPROVED",
              "description": "Indicates FINRA membership approval"
            },
            {
              "const": "TERMREQUEST",
              "description": "Indicates a termination request has been filed"
            }
          ]
        },
        "statusDate": {
          "type": "string",
          "format": "date",
          "description": "Date the current status became effective YYYY-MM-DD",
          "maxLength": 10
        }
      }
    },
    "FormBD": {
      "type": "object",
      "description": "Form BD question responses and indicators",
      "properties": {
        "question2A": {
          "type": "boolean",
          "description": "Form BD Question 2A information or indicator"
        },
        "question2B": {
          "type": "boolean",
          "description": "Form BD Question 2B information or indicator"
        },
        "question2C": {
          "type": "boolean",
          "description": "Form BD Question 2C information or indicator"
        },
        "question2D": {
          "type": "boolean",
          "description": "Form BD Question 2D information or indicator"
        },
        "question3A": {
          "type": "boolean",
          "description": "Form BD Question 3A information or indicator"
        },
        "question6": {
          "type": "boolean",
          "description": "Form BD Question 6 information or indicator"
        },
        "question7": {
          "type": "boolean",
          "description": "Form BD Question 7 information or indicator"
        },
        "question8A": {
          "type": "boolean",
          "description": "Form BD Question 8A information or indicator"
        },
        "question8B": {
          "type": "boolean",
          "description": "Form BD Question 8B information or indicator"
        },
        "question8C": {
          "type": "boolean",
          "description": "Form BD Question 8C information or indicator"
        },
        "question9A": {
          "type": "boolean",
          "description": "Form BD Question 9A information or indicator"
        },
        "question9B": {
          "type": "boolean",
          "description": "Form BD Question 9B information or indicator"
        },
        "question10A": {
          "type": "boolean",
          "description": "Form BD Question 10A information or indicator"
        },
        "question10B": {
          "type": "boolean",
          "description": "Form BD Question 10B information or indicator"
        },
        "question12": {
          "type": "boolean",
          "description": "Form BD Question 12 information or indicator"
        },
        "question13A": {
          "type": "boolean",
          "description": "Form BD Question 13A information or indicator"
        },
        "question13B": {
          "type": "boolean",
          "description": "Form BD Question 13B information or indicator"
        }
      }
    },
    "OwnerOfficer": {
      "type": "object",
      "properties": {
        "scheduleType": {
          "type": "string",
          "description": "Schedule type: D for Direct (Schedule A) or I for Indirect (Schedule B)",
          "maxLength": 1,
          "oneOf": [
            {
              "const": "D",
              "description": "Direct ownership (Schedule A)"
            },
            {
              "const": "I",
              "description": "Indirect ownership (Schedule B)"
            }
          ]
        },
        "fullLegalName": {
          "type": "string",
          "description": "Full legal name of the owner or officer",
          "maxLength": 100
        },
        "entityType": {
          "type": "string",
          "description": "Type of entity: I for Individual, DE for Domestic Entity, FE for Foreign Entity",
          "maxLength": 2
        },
        "entityInWhichInterestIsOwned": {
          "type": "string",
          "description": "For indirect owners, the entity in which the ownership interest is held",
          "maxLength": 100
        },
        "status": {
          "type": "string",
          "description": "Current status/title of the owner/officer (e.g., President, CFO, Owner)",
          "maxLength": 100
        },
        "dateStatusAcquired": {
          "type": "string",
          "description": "Date the current status was acquired (YYYY-MM format)",
          "maxLength": 50
        },
        "ownershipCode": {
          "type": "string",
          "description": "Code indicating ownership percentage range",
          "maxLength": 50
        },
        "controlPerson": {
          "type": "boolean",
          "description": "Indicates whether the individual/entity is a control person"
        },
        "publicReportingCompany": {
          "type": "boolean",
          "description": "Indicates whether the owner is a public reporting company"
        },
        "identification": {
          "$ref": "#/definitions/Identification",
          "description": "Identification information for the owner/officer"
        }
      }
    },
    "Identification": {
      "type": "object",
      "properties": {
        "idType": {
          "type": "string",
          "description": "Type of identification (e.g., CRD, EIN)",
          "maxLength": 20
        },
        "idNumber": {
          "type": "string",
          "description": "Identification number corresponding to the ID type",
          "maxLength": 50
        }
      }
    }
  }
}
