{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/oxfordledge-com/json-schema/oxfordledge-com-borrower-detail-response-schema.json",
  "title": "BorrowerDetailResponse",
  "description": "`GET /api/bdc/borrower` response. F4 schema-tightening + correction\n(2026-04-30): `borrowerName` + `holders` REQUIRED on every 200 shape\n(empty-query {borrowerName, holders=[], error}; disambiguation {ambiguous,\nmatches, holders=[]}; success with borrowerNorm/totals); 400/404/500 are\nErrorResponse. Frontend `borrower-view.js` reads `data.borrowerName` and\niterates `data.holders`. COUNSEL 2026-09-27 D4: a not-first-party\n`description` is null for anonymous / API-key / OAuth callers with the\nreason in `descriptionWithheld`; a served one carries `descriptionLabel`\n(who wrote it), the SSR borrower page's caption.",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/oxfordledge-com-api-openapi.yml#/components/schemas/BorrowerDetailResponse",
  "properties": {
    "borrowerName": {
      "type": "string",
      "title": "Borrowername"
    },
    "holders": {
      "items": {
        "additionalProperties": true,
        "type": "object"
      },
      "type": "array",
      "title": "Holders"
    },
    "borrowerNorm": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Borrowernorm"
    },
    "displayName": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Displayname"
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Description"
    },
    "descriptionSource": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Descriptionsource"
    },
    "descriptionSources": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Descriptionsources"
    },
    "descriptionLabel": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Descriptionlabel"
    },
    "descriptionWithheld": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Descriptionwithheld"
    },
    "withheldFilings": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/BDCWithheldFiling"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Withheldfilings",
      "description": "Withheld (v271) filings newer than the filing each lender is shown at, holding this borrower -- skipped, never shown; present only when one exists (OWNER 2026-10-27)."
    },
    "industry": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Industry"
    },
    "totalHolders": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Totalholders"
    },
    "totalParAmount": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Totalparamount"
    },
    "totalFairValue": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Totalfairvalue"
    },
    "parBasisFairValue": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Parbasisfairvalue",
      "description": "BDC QA 2026-10-27 P2-8: fair value of the same current rows totalParAmount sums (rows with a par amount)."
    },
    "noParFairValue": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Noparfairvalue",
      "description": "Fair value of the current rows with no par amount (equity and similar): totalFairValue - parBasisFairValue."
    },
    "ambiguous": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Ambiguous"
    },
    "matches": {
      "anyOf": [
        {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Matches"
    },
    "match_type": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Match Type"
    },
    "message": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Message"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Error"
    },
    "found": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Found"
    },
    "suggestions": {
      "anyOf": [
        {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Suggestions"
    },
    "avgMarkedPrice": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Avgmarkedprice"
    },
    "avgMarkedPriceBasis": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Avgmarkedpricebasis"
    },
    "minMarkedPrice": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Minmarkedprice"
    },
    "maxMarkedPrice": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Maxmarkedprice"
    },
    "markExcludedRowCount": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Markexcludedrowcount"
    },
    "markStatisticsBasis": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Markstatisticsbasis"
    },
    "unfundedRowCount": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Unfundedrowcount"
    },
    "possibleRelatedBorrowers": {
      "anyOf": [
        {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Possiblerelatedborrowers",
      "description": "Possibly the same company (automated name match, not reviewed): other borrower keys (borrowerNorm, borrowerName, pagePath, relationBasis, holderCount, holderTickers, totalFv). Suggestions only: their lenders are NOT in totalHolders / totalFairValue, and a holder row keeps its staleBasis; an exited row whose lender's newest filing holds one of them carries possibleRelatedBorrowerNorm. [] = looked, none; null = the reads failed this request (possibleRelatedBorrowersNote says so)."
    },
    "possibleRelatedBorrowersBasis": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Possiblerelatedborrowersbasis"
    },
    "possibleRelatedBorrowersNote": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Possiblerelatedborrowersnote"
    }
  },
  "additionalProperties": true,
  "type": "object",
  "required": [
    "borrowerName",
    "holders"
  ],
  "$defs": {
    "BDCWithheldFiling": {
      "properties": {
        "ticker": {
          "type": "string",
          "title": "Ticker"
        },
        "filingDate": {
          "type": "string",
          "title": "Filingdate"
        },
        "note": {
          "type": "string",
          "title": "Note"
        },
        "quarterKey": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Quarterkey"
        }
      },
      "additionalProperties": true,
      "type": "object",
      "required": [
        "ticker",
        "filingDate",
        "note"
      ],
      "title": "BDCWithheldFiling",
      "description": "One entry of `withheldFilings` (OWNER ruling 2026-10-27 #2): a stored\nBDC filing the v271 display quarantine withholds, named because the\nrequest's scope included it. Present on /api/bdc/holdings, /api/bdc/soi and\n/api/bdc/borrower-mark-history ONLY when one is in scope; `note` is the\ndated public sentence (pg_db/queries/bdc_filing_quarantine.py)."
    }
  }
}