> For the complete documentation index, see [llms.txt](https://docs.creditcoop.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.creditcoop.xyz/developer-api-docs/models.md).

# Models

## The ErrorResponse object

```json
{"openapi":"3.0.3","info":{"title":"Credit Coop API","version":"3.0.0"},"components":{"schemas":{"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"message":{"type":"string"},"statusCode":{"type":"integer"}}}}}}
```

## The Organization object

```json
{"openapi":"3.0.3","info":{"title":"Credit Coop API","version":"3.0.0"},"components":{"schemas":{"Organization":{"type":"object","required":["id","name","slug"],"properties":{"id":{"type":"string","format":"uuid","description":"Organization unique identifier"},"name":{"type":"string","maxLength":255,"description":"Organization display name"},"slug":{"type":"string","maxLength":100,"description":"URL-friendly identifier"},"header":{"type":"string","nullable":true,"description":"Short tagline or headline for the organization profile"},"description":{"type":"string","nullable":true,"description":"Brief summary of the organization"},"overview":{"type":"string","nullable":true,"description":"Long-form organization description (may contain Markdown)"},"links":{"type":"array","description":"Organization links and image assets. Labels starting with \"#\" are image assets (e.g. \"#logo\", \"#header\"); all others are external links (e.g. \"Twitter\", \"Website\").","items":{"type":"object","required":["id","label","url"],"properties":{"id":{"type":"string","format":"uuid","description":"Link unique identifier"},"label":{"type":"string","description":"Link type. \"#logo\" and \"#header\" denote image assets; other values (e.g. \"Twitter\", \"Website\") denote external links."},"linkText":{"type":"string","nullable":true,"description":"Display text for external links (e.g. \"@raincards\", \"rain.xyz\")"},"iconUrl":{"type":"string","nullable":true,"description":"Icon image URL for external links"},"url":{"type":"string","description":"Target URL (image URL for asset links, destination URL for external links)"}}}}}}}}}
```

## The Pagination object

```json
{"openapi":"3.0.3","info":{"title":"Credit Coop API","version":"3.0.0"},"components":{"schemas":{"Pagination":{"type":"object","required":["total","limit","offset"],"properties":{"total":{"type":"integer","description":"Total number of records matching the query"},"limit":{"type":"integer","description":"Maximum number of records returned per page"},"offset":{"type":"integer","description":"Number of records skipped from the start"}}}}}}
```

## The IdParam object

```json
{"openapi":"3.0.3","info":{"title":"Credit Coop API","version":"3.0.0"},"components":{"schemas":{"IdParam":{"type":"object","required":["id"],"properties":{"id":{"type":"string","format":"uuid","description":"Resource ID"}}}}}}
```

## The OrganizationIdParam object

```json
{"openapi":"3.0.3","info":{"title":"Credit Coop API","version":"3.0.0"},"components":{"schemas":{"OrganizationIdParam":{"type":"object","required":["organizationId"],"properties":{"organizationId":{"type":"string","format":"uuid","description":"Organization ID"}}}}}}
```

## The Token object

```json
{"openapi":"3.0.3","info":{"title":"Credit Coop API","version":"3.0.0"},"components":{"schemas":{"Token":{"type":"object","required":["id","address","networkId","symbol","decimals"],"properties":{"id":{"type":"string","format":"uuid","description":"Token unique identifier"},"address":{"type":"string","description":"Token contract address"},"networkId":{"type":"string","description":"CAIP-2 network identifier"},"symbol":{"type":"string","description":"Token ticker symbol (e.g. \"USDC\", \"WETH\")"},"name":{"type":"string","nullable":true,"description":"Full token name"},"decimals":{"type":"integer","minimum":0,"maximum":255,"description":"Number of decimal places for the token"},"wraps":{"type":"string","nullable":true,"description":"Underlying asset this token represents (e.g. \"USD\" for USDC, \"ETH\" for WETH)"},"iconUrl":{"type":"string","nullable":true,"description":"URL of the token icon image"},"coingeckoId":{"type":"string","nullable":true,"description":"CoinGecko API identifier for price lookups"}}}}}}
```

## The Network object

```json
{"openapi":"3.0.3","info":{"title":"Credit Coop API","version":"3.0.0"},"components":{"schemas":{"Network":{"type":"object","required":["networkId","displayName"],"properties":{"networkId":{"type":"string","description":"CAIP-2 network identifier"},"displayName":{"type":"string","description":"Human-readable network name (e.g. \"Ethereum Mainnet\")"},"explorerUrl":{"type":"string","nullable":true,"description":"Block explorer base URL"},"rpcUrl":{"type":"string","nullable":true,"description":"RPC endpoint URL"},"iconUrl":{"type":"string","nullable":true,"description":"URL of the network icon image"},"nativeCurrencySymbol":{"type":"string","nullable":true,"description":"Native currency ticker (e.g. \"ETH\")"},"nativeCurrencyDecimals":{"type":"integer","nullable":true,"description":"Native currency decimal places"}}}}}}
```

## The Vault object

```json
{"openapi":"3.0.3","info":{"title":"Credit Coop API","version":"3.0.0"},"components":{"schemas":{"Vault":{"type":"object","required":["id","address","networkId","protocolVersion","label","organizationId","deployedAt"],"properties":{"id":{"type":"string","format":"uuid","description":"Vault unique identifier"},"address":{"type":"string","description":"Vault contract address"},"networkId":{"type":"string","description":"CAIP-2 network identifier"},"protocolVersion":{"type":"string","nullable":true,"description":"Credit Coop protocol/contract generation (\"v1\", \"v2\", or \"v3\"). Determines which fields apply — several facility and credit-line fields are v3 only. Null when not classified."},"label":{"type":"string","nullable":true,"description":"Display label for the vault. Always present; null if not configured."},"organizationId":{"type":"string","format":"uuid","nullable":true,"description":"Vault curator organization ID"},"deployedAt":{"type":"string","format":"date-time","nullable":true,"description":"Timestamp when the vault contract was deployed"},"organization":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Organization"}],"description":"Organization details with links. Only included when expand includes \"organization\"."},"relatedAddresses":{"type":"object","nullable":true,"description":"On-chain related addresses. Only included when expand includes \"related-addresses\".","properties":{"creditStrategy":{"type":"string","nullable":true,"description":"CreditStrategy contract address. Manages credit allocation from vault funds to credit facilities."},"liquidStrategy":{"type":"string","nullable":true,"description":"LiquidStrategy contract address. Manages liquid asset reserves in the vault."},"vaultCurator":{"type":"string","nullable":true,"description":"Vault curator (manager) address of the CreditStrategy contract. Retrieved by calling manager() on the creditStrategy."},"whitelister":{"type":"string","nullable":true,"description":"Access-control authority that gates the vault deposit whitelist. Set per vault. Null for v2 vaults."},"synchronizer":{"type":"string","nullable":true,"description":"ERC-7540 Synchronizer contract for one-transaction deposit/redeem. Only for v3 vaults. Null for v2 vaults, or when none is set."}}},"assets":{"type":"object","nullable":true,"description":"Asset information. Only included when expand includes \"assets\".","properties":{"assetToken":{"type":"string","nullable":true,"description":"Asset token address"},"shareToken":{"type":"string","nullable":true,"description":"Share token address"},"decimals":{"type":"integer","nullable":true,"description":"Asset token decimals"},"totalAssets":{"type":"string","nullable":true,"description":"Total assets in the vault (raw uint256 — divide by 10^decimals to get human-readable value)"},"totalLiquidAssets":{"type":"string","nullable":true,"description":"Total liquid assets. Vault's balance - total pending deposits - claimable redeem assets + liquid strategy total assets + uninvested credit strategy assets (raw uint256 — divide by 10^decimals to get human-readable value)"},"totalSupply":{"type":"string","nullable":true,"description":"Total supply of vault shares (raw uint256 — divide by 10^decimals to get human-readable value)"},"sharePrice":{"type":"string","nullable":true,"description":"Share price of the vault (raw uint256 — divide by 10^decimals to get human-readable value)"},"baseUnit":{"type":"string","nullable":true,"description":"Minimum accounting unit used by the CreditStrategy for scaling interest calculations (raw uint256). Equal to 10^decimals."},"totalActiveCredit":{"type":"string","nullable":true,"description":"Total active credit from CreditStrategy. Deposits plus accrued and repaid interest for all credit lines (raw uint256 — divide by 10^decimals to get human-readable value)"},"uninvestedCreditAssets":{"type":"string","nullable":true,"description":"Uninvested credit assets. Asset token balance held by CreditStrategy (raw uint256 — divide by 10^decimals to get human-readable value)"}}},"apy":{"type":"object","nullable":true,"description":"APY data from historical sharePrice snapshots. Only included when expand includes \"apy\".","properties":{"apyPct30D":{"type":"number","nullable":true,"description":"30-day APY in percent (e.g. 5.0 = 5%). Null if insufficient snapshot data."}}},"fees":{"type":"object","nullable":true,"description":"Credit strategy fees in basis points. Only included when expand includes \"fees\".","properties":{"managementFee":{"type":"integer","description":"Management fee in basis points (e.g. 200 = 2%)"},"performanceFee":{"type":"integer","description":"Performance fee in basis points (e.g. 1000 = 10%)"}}}}},"Organization":{"type":"object","required":["id","name","slug"],"properties":{"id":{"type":"string","format":"uuid","description":"Organization unique identifier"},"name":{"type":"string","maxLength":255,"description":"Organization display name"},"slug":{"type":"string","maxLength":100,"description":"URL-friendly identifier"},"header":{"type":"string","nullable":true,"description":"Short tagline or headline for the organization profile"},"description":{"type":"string","nullable":true,"description":"Brief summary of the organization"},"overview":{"type":"string","nullable":true,"description":"Long-form organization description (may contain Markdown)"},"links":{"type":"array","description":"Organization links and image assets. Labels starting with \"#\" are image assets (e.g. \"#logo\", \"#header\"); all others are external links (e.g. \"Twitter\", \"Website\").","items":{"type":"object","required":["id","label","url"],"properties":{"id":{"type":"string","format":"uuid","description":"Link unique identifier"},"label":{"type":"string","description":"Link type. \"#logo\" and \"#header\" denote image assets; other values (e.g. \"Twitter\", \"Website\") denote external links."},"linkText":{"type":"string","nullable":true,"description":"Display text for external links (e.g. \"@raincards\", \"rain.xyz\")"},"iconUrl":{"type":"string","nullable":true,"description":"Icon image URL for external links"},"url":{"type":"string","description":"Target URL (image URL for asset links, destination URL for external links)"}}}}}}}}}
```

## The CreditFacility object

```json
{"openapi":"3.0.3","info":{"title":"Credit Coop API","version":"3.0.0"},"components":{"schemas":{"CreditFacility":{"type":"object","required":["id","address","networkId","protocolVersion","label","organizationId"],"properties":{"id":{"type":"string","format":"uuid","description":"Credit facility unique identifier"},"address":{"type":"string","description":"SecuredLine contract address"},"networkId":{"type":"string","description":"CAIP-2 network identifier"},"protocolVersion":{"type":"string","nullable":true,"description":"Credit Coop protocol/contract generation (\"v1\", \"v2\", or \"v3\"). Determines which fields apply — several facility and credit-line fields are v3 only. Null when not classified."},"label":{"type":"string","nullable":true,"description":"Display label for the credit facility. Always present; null if not configured."},"organizationId":{"type":"string","format":"uuid","nullable":true,"description":"Borrower organization ID"},"organization":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Organization"}],"description":"Organization details with links. Only included when expand includes \"organization\"."},"relatedAddresses":{"type":"object","nullable":true,"description":"On-chain related addresses. Only included when expand includes \"related-addresses\".","properties":{"spigot":{"type":"string","nullable":true,"description":"v1/v2 only. Spigot contract address. Captures and routes borrower revenue to debt repayment. Null for v3 facilities (no spigot layer)."},"borrower":{"type":"string","nullable":true,"description":"Address authorized to borrow, repay, and close credit lines. Present on all versions."},"admin":{"type":"string","nullable":true,"description":"v1/v2 only. Credit facility administrator address. Null for v3 facilities."},"spigotOperator":{"type":"string","nullable":true,"description":"v1/v2 only. Address authorized to execute revenue claims on the Spigot. Null for v3 facilities."},"escrow":{"type":"string","nullable":true,"description":"v2 only. Escrow contract address. Holds collateral posted by the borrower and enforces the minimum collateral ratio. Null for v1/v3 facilities (v3 collateral lives on the Servicing contract)."},"servicing":{"type":"string","nullable":true,"description":"v3 only. The facility's bound Servicing contract — the per-borrower hub for covenants, collateral, and cross-default. Null for v1/v2 facilities."},"servicingId":{"type":"string","format":"uuid","nullable":true,"description":"v3 only. Resource ID of the bound Servicing (use with GET /v3/servicings/:id). Null when the Servicing address is not registered, or for v1/v2 facilities."},"commitmentToken":{"type":"string","nullable":true,"description":"v3 only. The ERC-721 CommitmentToken singleton — the NFT contract representing every commitment/credit line in the facility (ownerOf(lineTokenId) is the lender). Facility-wide: the same contract for every line. Null for v1/v2 facilities (no commitment-NFT layer)."}}},"fees":{"type":"object","nullable":true,"description":"Fee configuration for the Credit Facility. Only included when expand includes \"fees\".","required":["originationFee","swapFee","servicingFee","drawFee","repayFee"],"properties":{"originationFee":{"type":"string","nullable":true,"description":"Origination fee (basis points). Present on v2 and v3."},"swapFee":{"type":"string","nullable":true,"description":"v2 only. Swap fee (basis points). Null for v3."},"servicingFee":{"type":"string","nullable":true,"description":"v2 only. Servicing fee (basis points). Null for v3."},"drawFee":{"type":"string","nullable":true,"description":"v3 only. Per-draw fee (basis points, FEE_DRAW). Null for v1/v2."},"repayFee":{"type":"string","nullable":true,"description":"v3 only. Per-repay fee (basis points, FEE_REPAY). Null for v1/v2."}}},"counts":{"type":"object","nullable":true,"description":"Active credit lines and open proposals counts. Only included when expand includes \"counts\".","required":["activeCreditLines","openProposals"],"properties":{"activeCreditLines":{"type":"integer","description":"Number of active credit lines"},"openProposals":{"type":"integer","description":"Number of open mutual consent proposals"}}},"status":{"type":"object","nullable":true,"description":"On-chain status for this facility. Only included when expand includes \"status\". An open facility may report LIQUIDATABLE when its borrower is in cross-default; once a facility is closed it reports REPAID and reflects only its own terminal outcome, never absorbing the borrower's wider default state. Borrower-wide default and covenant breach levels are reported per cross-default group on GET /v3/borrowers (expand=status).","required":["code","label","facilityClosed"],"properties":{"code":{"type":"integer","description":"Numeric status code (0: UNINITIALIZED, 1: ACTIVE, 2: LIQUIDATABLE, 3: REPAID, 4: INSOLVENT, 5: ABORTED)"},"label":{"type":"string","enum":["UNINITIALIZED","ACTIVE","LIQUIDATABLE","REPAID","INSOLVENT","ABORTED","UNKNOWN"],"description":"Human-readable status label. UNKNOWN is returned when the on-chain status code is outside the known range (e.g., a new status added by a future contract version)."},"facilityClosed":{"type":"boolean","description":"Whether this specific facility is closed (terminal). Always present whenever status is present (the entire status object is omitted when unavailable). For a closed facility code/label report REPAID; for an open facility they may additionally reflect borrower-wide cross-default (LIQUIDATABLE)."}}},"collateral":{"type":"object","nullable":true,"description":"On-chain collateral state from the Escrow contract. Only included when expand includes \"collateral\". Null when the facility has no escrow, RPC is unavailable, or the facility predates the Escrow architecture.","required":["maxLtvBps","totalOutstandingDebt","collateralValue","ltvBps","targetLtvBps","collateralTokens"],"properties":{"maxLtvBps":{"type":"string","nullable":true,"description":"Maximum loan-to-value ratio allowed for this facility, in basis points (10000 = 100%). Computed server-side as 10000² / minimumCollateralRatio (integer floor). Null when the facility does not enforce a collateral requirement."},"totalOutstandingDebt":{"type":"string","nullable":true,"description":"Total outstanding debt in USD as a formatted decimal string with trailing zeros trimmed (e.g. \"1234.56\"). The debt token's decimals are read from the first active credit position and applied server-side. \"0\" when there are no active positions. Null when the facility does not enforce a collateral requirement."},"collateralValue":{"type":"string","nullable":true,"description":"Collateral value in USD as a formatted decimal string with trailing zeros trimmed (e.g. \"2000\" or \"1999.99\"). Formatted server-side. Null when the facility does not enforce a collateral requirement."},"ltvBps":{"type":"string","nullable":true,"description":"Current loan-to-value ratio in basis points: (totalOutstandingDebt × 10000) / collateralValue, computed server-side from raw on-chain values (decimals normalized before division). \"0\" when there is no outstanding debt. \"999999999\" (sentinel) when debt is positive but on-chain collateral value is 0 — the facility is effectively infinitely undercollateralized. Null when the facility does not enforce a collateral requirement, or when debt decimals could not be resolved."},"targetLtvBps":{"type":"string","nullable":true,"description":"Target LTV in basis points. Defines the minimum collateral value required to back the facility's credit limit (min collateral ≈ creditLimit × 10000 / targetLtvBps). Null when no target is configured for this facility."},"collateralTokens":{"type":"array","description":"Every token ever enabled as collateral on the Escrow, with its current on-chain amount and USD value. May be empty if EnableCollateral events have not been ingested for this Escrow.","items":{"type":"object","required":["address","amount","decimals","usdValue"],"properties":{"address":{"type":"string","description":"Collateral token address (ERC-20)."},"amount":{"type":"string","nullable":true,"description":"Current on-chain collateral amount (raw uint256; divide by `decimals` to get human-readable value). Null if the on-chain `getCollateralData` read failed."},"decimals":{"type":"integer","nullable":true,"description":"Decimals of the collateral token itself (for rendering `amount`). Null if ERC-20 metadata could not be fetched."},"usdValue":{"type":"string","nullable":true,"description":"USD value of the current collateral amount as a human-readable decimal string (e.g. \"1234.56\"), up to 6 decimal places with trailing zeros trimmed. Null if amount, price, or decimals is unavailable."}}}}}},"totals":{"type":"object","nullable":true,"description":"v3 only. Facility-level aggregates for the facility's single asset: native-unit amounts plus `creditLimitUsd` (the total credit limit in USD). Only included when expand includes \"totals\". Null for v1/v2 facilities — their credit lines can use different tokens, so a single-asset total (and one `decimals`) is not meaningful (use the USD totals on GET /v3/credit-facilities/{id}/credit-lines instead). Also null for a v3 facility when the on-chain read is unavailable; use protocolVersion to distinguish the two cases.","required":["totalCommitment","totalDrawn","drawnRate","undrawnRate","token","decimals","creditLimitUsd"],"properties":{"totalCommitment":{"type":"string","nullable":true,"description":"The facility's total committed credit across its active credit lines, raw uint256 — divide by 10^decimals for a human-readable value. Closed lines no longer count toward the commitment."},"creditLimitUsd":{"type":"string","nullable":true,"description":"The facility's total credit limit in USD — totalCommitment priced in `token` at request time, as a human-readable decimal string. Null when totalCommitment is null, decimals is unavailable, or the token is unpriced. (For v1/v2, use creditLimitUsd on GET /v3/credit-facilities/{id}/credit-lines instead.)"},"totalDrawn":{"type":"string","nullable":true,"description":"The facility's total drawn principal across its credit lines, raw uint256 — divide by 10^decimals for a human-readable value."},"drawnRate":{"type":"string","nullable":true,"description":"Facility-default draw rate in basis points (DRAWN_RATE_BPS) — interest on drawn principal. Individual commitments may override this; see each credit line's drawRate for the effective per-line rate. Null if the facility exposes no per-facility rate getter (e.g. TIERED)."},"undrawnRate":{"type":"string","nullable":true,"description":"Facility-default undrawn rate in basis points (UNDRAWN_RATE_BPS) — interest on the undrawn commitment. Individual commitments may override this; see each credit line's facilityRate for the effective per-line rate. Null if the facility exposes no per-facility rate getter (e.g. TIERED)."},"token":{"type":"string","nullable":true,"description":"The single ERC-20 asset every credit line in the facility is denominated in — the unit of totalCommitment and totalDrawn."},"decimals":{"type":"integer","nullable":true,"description":"Decimals of the facility asset (token), for formatting the raw amounts above."}}}}},"Organization":{"type":"object","required":["id","name","slug"],"properties":{"id":{"type":"string","format":"uuid","description":"Organization unique identifier"},"name":{"type":"string","maxLength":255,"description":"Organization display name"},"slug":{"type":"string","maxLength":100,"description":"URL-friendly identifier"},"header":{"type":"string","nullable":true,"description":"Short tagline or headline for the organization profile"},"description":{"type":"string","nullable":true,"description":"Brief summary of the organization"},"overview":{"type":"string","nullable":true,"description":"Long-form organization description (may contain Markdown)"},"links":{"type":"array","description":"Organization links and image assets. Labels starting with \"#\" are image assets (e.g. \"#logo\", \"#header\"); all others are external links (e.g. \"Twitter\", \"Website\").","items":{"type":"object","required":["id","label","url"],"properties":{"id":{"type":"string","format":"uuid","description":"Link unique identifier"},"label":{"type":"string","description":"Link type. \"#logo\" and \"#header\" denote image assets; other values (e.g. \"Twitter\", \"Website\") denote external links."},"linkText":{"type":"string","nullable":true,"description":"Display text for external links (e.g. \"@raincards\", \"rain.xyz\")"},"iconUrl":{"type":"string","nullable":true,"description":"Icon image URL for external links"},"url":{"type":"string","description":"Target URL (image URL for asset links, destination URL for external links)"}}}}}}}}}
```

## The CreditLine object

```json
{"openapi":"3.0.3","info":{"title":"Credit Coop API","version":"3.0.0"},"components":{"schemas":{"CreditLine":{"type":"object","required":["lineTokenId"],"properties":{"lineTokenId":{"type":"string","description":"Credit line token ID"},"deposit":{"type":"string","nullable":true,"description":"Deposit amount (raw uint256 — divide by 10^decimals to get human-readable value)"},"creditLimit":{"type":"string","nullable":true,"description":"Credit limit (raw uint256 — divide by 10^decimals to get human-readable value). For open lines: equals current deposit. For closed lines: deposit from the most recent AddCredit or IncreaseCredit event."},"principal":{"type":"string","nullable":true,"description":"Principal amount borrowed (raw uint256 — divide by 10^decimals to get human-readable value)"},"interestBalance":{"type":"string","nullable":true,"description":"Total interest held by the credit line: the sum of interestAccrued and interestRepaid (raw uint256 — divide by 10^decimals to get human-readable value)."},"interestAccrued":{"type":"string","nullable":true,"description":"Interest accrued and owed by the borrower but not yet repaid (raw uint256 — divide by 10^decimals to get human-readable value)."},"interestRepaid":{"type":"string","nullable":true,"description":"Interest already repaid by the borrower into the credit line and held for the lender to claim/withdraw; resets to zero once the lender claims/withdraws it (raw uint256 — divide by 10^decimals to get human-readable value)."},"token":{"type":"string","nullable":true,"description":"Token address for this credit line"},"decimals":{"type":"integer","nullable":true,"description":"Token decimals"},"isOpen":{"type":"boolean","nullable":true,"description":"Whether the credit line is open"},"isRestricted":{"type":"boolean","nullable":true,"description":"Whether the credit line is restricted. Null for v3 (no equivalent)."},"earlyWithdrawalFee":{"type":"string","nullable":true,"description":"Early withdrawal fee in basis points. Null for v3 (no equivalent)."},"deadline":{"type":"string","format":"date-time","nullable":true,"description":"Credit line deadline"},"drawRate":{"type":"string","nullable":true,"description":"Draw rate in basis points (interest rate on borrowed principal)"},"facilityRate":{"type":"string","nullable":true,"description":"Facility rate in basis points (interest rate on unused deposit)"},"apyPct":{"type":"number","nullable":true,"description":"Computed APY as a percentage (e.g. 5.0 = 5.0%). Weighted average of drawRate on principal and facilityRate on unused deposit."},"createdTxHash":{"type":"string","nullable":true,"description":"Transaction hash of the AddCredit event that created this line"},"createdBlockNumber":{"type":"integer","nullable":true,"description":"Block number when this credit line was created"},"createdAt":{"type":"string","format":"date-time","nullable":true,"description":"Timestamp when this credit line was created. May be null for refinanced commitments."},"commitmentValue":{"type":"string","nullable":true,"description":"v3 only. Canonical par value of the commitment (drawn + interestOwed + claimable + undrawn residual), raw uint256. Null for v2. As of the last on-chain accrual checkpoint."},"claimable":{"type":"string","nullable":true,"description":"v3 only. Repaid/closed proceeds currently claimable by the commitment owner, raw uint256. Null for v2."},"facilityType":{"type":"string","nullable":true,"description":"v3 only. Facility type (\"RCF\" | \"TLA\" | \"DDTL\" | \"TIERED\"). Null for v2."},"isDefaulted":{"type":"boolean","nullable":true,"description":"v3 only. Cross-default (impairment) flag for the position's borrower. Null for v2."},"priority":{"type":"string","nullable":true,"description":"v3 only. Repayment-queue seniority of this commitment (raw uint256; the on-chain terms.priority). Sort by it client-side if you need a strict seniority ordering — the array is not guaranteed to be priority-sorted. Closed lines report `0` (on-chain storage is cleared on close), so drop closed lines before sorting. Null for v1/v2."},"fees":{"type":"object","nullable":true,"description":"Only included when expand=fees is specified. Null if fetching failed.","required":["originationFees"],"properties":{"originationFees":{"type":"string","nullable":true,"description":"Origination fees for this credit line (raw uint256 — divide by 10^decimals to get human-readable value). Null if unavailable."}}},"error":{"type":"string","nullable":true,"description":"Error message if fetching this credit line failed. Other fields will be null."}}}}}}
```

## The Servicing object

```json
{"openapi":"3.0.3","info":{"title":"Credit Coop API","version":"3.0.0"},"components":{"schemas":{"Servicing":{"type":"object","required":["id","address","networkId","organizationId"],"properties":{"id":{"type":"string","format":"uuid","description":"Servicing unique identifier"},"address":{"type":"string","description":"Servicing contract address"},"networkId":{"type":"string","description":"CAIP-2 network identifier"},"organizationId":{"type":"string","format":"uuid","nullable":true,"description":"Borrower organization ID"},"status":{"type":"object","nullable":true,"description":"On-chain cross-default health of the servicing. Only included when expand includes \"status\".","required":["closed","isDefaulted","breachLevel"],"properties":{"closed":{"type":"boolean","nullable":true,"description":"Whether the servicing has been wound down (terminal). Null when unavailable."},"isDefaulted":{"type":"boolean","nullable":true,"description":"Whether the borrower is in cross-default — one covenant breach gates every facility under this servicing. Null when unavailable."},"breachLevel":{"type":"string","nullable":true,"enum":["NONE","CURING","DEFAULTED"],"description":"Worst covenant breach level across the servicing. Null when it cannot be determined."}}},"asset":{"type":"object","nullable":true,"description":"The accounting unit every raw amount on this servicing (collateral value, capacity) is denominated in. Only included when expand includes \"asset\".","required":["token","decimals"],"properties":{"token":{"type":"string","nullable":true,"description":"Address of the accounting asset. Null when the servicing has no facilities yet or it could not be resolved."},"decimals":{"type":"integer","nullable":true,"description":"Decimals of the accounting asset — divide any raw uint256 amount by 10^decimals to get a human-readable value. Null when unavailable."}}},"organization":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Organization"}],"description":"Organization details with links. Only included when expand includes \"organization\"."},"relatedAddresses":{"type":"object","nullable":true,"description":"Servicer (owner), borrower, and trustee addresses. Only included when expand includes \"related-addresses\".","required":["owner","borrower","trustee"],"properties":{"owner":{"type":"string","nullable":true,"description":"The servicer — the owner of this Servicing hub (gates servicing actions). Distinct from the borrower and trustee."},"borrower":{"type":"string","nullable":true,"description":"The borrower this servicing serves."},"trustee":{"type":"string","nullable":true,"description":"Recipient of seized collateral on liquidation."}}},"collateral":{"type":"array","nullable":true,"description":"The shared collateral pool, one entry per registered collateral. Only included when expand includes \"collateral\".","items":{"type":"object","required":["address","advanceRateBps","value","decimals","valueUsd","level","asset","collateralToken","released","owner"],"properties":{"address":{"type":"string","description":"Collateral contract address."},"advanceRateBps":{"type":"integer","nullable":true,"description":"Share of this collateral's value that counts toward the borrowing base, in basis points (10000 = 100%). Null if unavailable."},"value":{"type":"string","nullable":true,"description":"Raw mark-to-market value (uint256) denominated in `asset` — divide by 10^`decimals` for the human amount. Null if unavailable."},"decimals":{"type":"integer","nullable":true,"description":"Decimals of `asset` — the shared precision of `value` and `valueUsd`. Null when the denomination could not be determined, or when `asset` is known but its on-chain `decimals()` read failed."},"valueUsd":{"type":"string","nullable":true,"description":"USD value as a human-readable decimal string, priced in `asset`. This is the correct number for the LTV sum (the server picks the right per-collateral token). Null when `asset` is unpriced or the denomination could not be determined."},"level":{"type":"string","nullable":true,"enum":["NONE","CURING","DEFAULTED"],"description":"Breach level reported by this collateral. Null if unavailable."},"asset":{"type":"string","nullable":true,"description":"The ERC-20 token that `value` and `valueUsd` are denominated in (so `asset`, `value`, `decimals`, and `valueUsd` are all mutually consistent). For a normal deposited-token collateral this is the same as `collateralToken`. It differs only for a revenue collateral, whose `value` is a fixed appraisal expressed in the facility's accounting unit rather than in the revenue token it collects — there `asset` is that accounting unit. Null when the denomination could not be determined."},"collateralToken":{"type":"string","nullable":true,"description":"The collateral's underlying on-chain token — use this for a \"Token\" column. For a deposited-token collateral it is the escrowed token; for a revenue collateral it is the token the revenue is paid in. Null for a collateral that pledges a contract rather than a token. Usually equals `asset`; it differs only for a revenue collateral (valued in the accounting unit, not the revenue token) — in that case use `valueUsd`/`asset`/`decimals` for the numbers and `collateralToken` only for display."},"released":{"type":"boolean","nullable":true,"description":"Whether this collateral has been released. A released collateral no longer backs the borrowing base, so exclude it when summing `valueUsd` into a collateral-coverage total (its `valueUsd` is still reported). Null if unavailable."},"owner":{"type":"string","nullable":true,"description":"The escrow owner that gates deposit/withdraw actions. Null if unavailable."}}}},"facilities":{"type":"array","nullable":true,"description":"The facilities bound to this servicing. Only included when expand includes \"facilities\".","items":{"type":"object","required":["address","facilityId","organizationId"],"properties":{"address":{"type":"string","description":"Facility contract address."},"facilityId":{"type":"string","format":"uuid","nullable":true,"description":"Resource ID of the facility (use with GET /v3/credit-facilities/:id). Null when the facility address is not registered."},"organizationId":{"type":"string","format":"uuid","nullable":true,"description":"Organization ID of the facility, when registered."}}}},"capacity":{"type":"object","nullable":true,"description":"Shared borrowing-base aggregates across every facility. Only included when expand includes \"capacity\". All amounts are raw uint256 in the accounting unit — divide by 10^decimals.","required":["totalAdvancedValue","totalDrawn","totalCommitted","remainingDrawCapacity","remainingOriginationCapacity"],"properties":{"totalAdvancedValue":{"type":"string","nullable":true,"description":"The shared borrowing base. Null if unavailable."},"totalDrawn":{"type":"string","nullable":true,"description":"Total drawn across all facilities. Null if unavailable."},"totalCommitted":{"type":"string","nullable":true,"description":"Total committed across all facilities. Null if unavailable."},"remainingDrawCapacity":{"type":"string","nullable":true,"description":"Borrowing base remaining for new draws (floored at 0). Null when an input is unavailable."},"remainingOriginationCapacity":{"type":"string","nullable":true,"description":"Borrowing base remaining for new originations (floored at 0). Null when an input is unavailable."}}},"covenants":{"type":"array","nullable":true,"description":"Per-covenant breach levels behind the cross-default status. Only included when expand includes \"covenants\".","items":{"type":"object","required":["address","level","cureWindow","kind","defaultedSince","params"],"properties":{"address":{"type":"string","description":"Covenant contract address."},"level":{"type":"string","nullable":true,"enum":["NONE","CURING","DEFAULTED"],"description":"Breach level for this covenant. Null if unavailable."},"cureWindow":{"type":"string","nullable":true,"description":"Grace period in seconds before a breach escalates from CURING to DEFAULTED. Null if unavailable, or for a collateral entry (collaterals also appear here but expose no cure window)."},"kind":{"type":"string","nullable":true,"description":"Covenant implementation name — one of \"Threshold\", \"Invariant\", \"Maturity\", \"Attestation\", \"SigningAuthority\" (a collateral entry surfaces its adapter name instead). Determines which \"params\" are present. Null if unavailable."},"defaultedSince":{"type":"string","nullable":true,"description":"Unix timestamp (seconds) this covenant entered DEFAULTED, as a raw uint256 string. \"0\" means not currently defaulted. Null if unavailable."},"params":{"type":"object","nullable":true,"description":"Kind-specific covenant configuration. Present for every recognized covenant kind (Threshold, Invariant, Maturity, Attestation, SigningAuthority), with only that kind's fields populated; null for collateral entries and unrecognized kinds.","properties":{"target":{"type":"string","nullable":true,"description":"Contract the covenant reads to evaluate compliance (Threshold, Invariant)."},"callData":{"type":"string","nullable":true,"description":"View-call calldata read on \"target\" to obtain the reading, as raw hex (Threshold, Invariant)."},"op":{"type":"string","nullable":true,"enum":["GT","GTE","LT","LTE","EQ","NEQ"],"description":"Comparison operator applied to the reading vs. threshold (Threshold only)."},"threshold":{"type":"string","nullable":true,"description":"Value the reading is compared against, as a raw uint256 string (Threshold only)."},"expectedHash":{"type":"string","nullable":true,"description":"keccak256 of the expected staticcall return, as a bytes32 hex string (Invariant only)."},"facility":{"type":"string","nullable":true,"description":"Credit facility whose commitment maturities the covenant watches (Maturity only)."},"signer":{"type":"string","nullable":true,"description":"Wallet that must submit periodic attestations (SigningAuthority only)."},"attestationWindow":{"type":"string","nullable":true,"description":"Seconds an attestation stays fresh, as a raw uint256 string (SigningAuthority only)."},"deployedAt":{"type":"string","nullable":true,"description":"Deploy timestamp (unix seconds, raw uint256 string) anchoring the first attestation deadline (SigningAuthority only)."},"servicer":{"type":"string","nullable":true,"description":"Party authorized to declare/cure off-chain breaches (Attestation only)."}}}}}}}},"Organization":{"type":"object","required":["id","name","slug"],"properties":{"id":{"type":"string","format":"uuid","description":"Organization unique identifier"},"name":{"type":"string","maxLength":255,"description":"Organization display name"},"slug":{"type":"string","maxLength":100,"description":"URL-friendly identifier"},"header":{"type":"string","nullable":true,"description":"Short tagline or headline for the organization profile"},"description":{"type":"string","nullable":true,"description":"Brief summary of the organization"},"overview":{"type":"string","nullable":true,"description":"Long-form organization description (may contain Markdown)"},"links":{"type":"array","description":"Organization links and image assets. Labels starting with \"#\" are image assets (e.g. \"#logo\", \"#header\"); all others are external links (e.g. \"Twitter\", \"Website\").","items":{"type":"object","required":["id","label","url"],"properties":{"id":{"type":"string","format":"uuid","description":"Link unique identifier"},"label":{"type":"string","description":"Link type. \"#logo\" and \"#header\" denote image assets; other values (e.g. \"Twitter\", \"Website\") denote external links."},"linkText":{"type":"string","nullable":true,"description":"Display text for external links (e.g. \"@raincards\", \"rain.xyz\")"},"iconUrl":{"type":"string","nullable":true,"description":"Icon image URL for external links"},"url":{"type":"string","description":"Target URL (image URL for asset links, destination URL for external links)"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.creditcoop.xyz/developer-api-docs/models.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
