Parse debt contract into a draft payment schedule

POST /api/v1/businesses/{business_id}/cfo-portal/debt-schedule/parse-contract

Parse an uploaded lending contract into structured terms and schedule.

Request Body:

  • s3_key: S3 key of an uploaded contract document (required).
Operation ID: cfo_portal_parse_debt_contract_api_v1_businesses__business_id__cfo_portal_debt_schedule_parse_contract_post · View as markdown · OpenAPI slice

Authentication

Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.

Parameters

Path

business_id string required

Request body

s3_key string required

S3 key of the uploaded debt contract document.

Responses

201 Successful Response

contract ParsedDebtContract requiredParsedDebtContract
15 fields
name string required
lender string required
debt_type string required

DebtTypeEnum value: term_loan, line_of_credit, mortgage, equipment_loan, sba_loan, convertible_note, revenue_based, other.

original_principal_cents integer required
current_balance_cents integer required
interest_rate_bps integer

Annual interest rate in basis points (e.g. 500 = 5.00%). Set to 0 for revenue-based financing.

term_months integer

Loan term in months. For revenue-based financing this is an estimate of months to cap based on assumed revenue.

start_date string required

Contract start date as ISO-8601 YYYY-MM-DD.

maturity_date string required

Maturity/expected payoff date as ISO-8601 YYYY-MM-DD. For RBF this is an estimate based on the share rate.

payment_frequency string

PaymentFrequencyEnum value: monthly, quarterly, semi_annual, annual, bullet, or revenue_share.

payment_amount_cents integer

Scheduled payment per period (fixed) or 0 for RBF.

revenue_share_bps integer

Revenue-share rate in basis points; only set for revenue_based debt.

total_repayment_cap_cents integer

Total dollar cap on cumulative repayments; only set for revenue_based debt.

summary string

One-paragraph human summary of the contract.

confidence number

Parsing confidence in [0, 1] reported by the LLM.

payment_schedule array · ParsedDebtScheduleRow ParsedDebtScheduleRow
5 fields
payment_date string required

ISO-8601 YYYY-MM-DD.

amount_cents integer required
principal_cents integer required
interest_cents integer required
remaining_balance_cents integer required

400 Bad Request - Invalid input

401 Unauthorized - Authentication required

403 Forbidden - Insufficient permissions

404 Not Found - Resource does not exist

422 Validation Error

detail array · ValidationError ValidationError
5 fields
loc array · string | integer required
msg string required
type string required
input object
ctx object