{"openapi":"3.1.0","info":{"title":"GET /api/v1/capital/offers","version":"1.0.0","description":"List capital offers open to this business"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/capital/offers":{"get":{"tags":["capital"],"summary":"List capital offers open to this business","description":"Marketplace-listed, active lending programs the business does not already hold a line on (pending, active or suspended). Each offer carries the program's limit range, payback terms, annual rate and draw fee as the program defines them, the business's in-flight application to it if any, and `eligibility_preview`: a read-only look at the bank and Shopify data an assessment would measure (null when it could not be read). No assessment is run.","operationId":"list_capital_offers","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-business-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Business-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope_CapitalOffersResponse_"}}}},"401":{"description":"Unauthorized - Missing or expired token, an MCP OAuth token used against the REST API, or no access to this business","content":{"application/json":{"example":{"error":"unauthorized","message":"Authentication required","code":"AUTH_001","request_id":"3f0e7c2a-9b4d-4e1a-8c6f-2d5b7a1e9c30"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"error":"forbidden","message":"You don't have permission to access this resource","code":"AUTH_002","request_id":"3f0e7c2a-9b4d-4e1a-8c6f-2d5b7a1e9c30"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"validation_error","message":"Validation failed: amount: Input should be a valid integer","errors":{"amount":"Input should be a valid integer"},"code":"GEN_002","request_id":"3f0e7c2a-9b4d-4e1a-8c6f-2d5b7a1e9c30"}}}}},"x-fastapi-operation-id":"list_capital_offers_api_v1_capital_offers_get"}}},"components":{"schemas":{"AssessmentStatusEnum":{"type":"string","enum":["pending","completed","failed"],"title":"AssessmentStatusEnum","description":"Underwriting assessment lifecycle.\n\nPlaid backfill, categorisation, and trailing-ratio history can take up\nto three days (FRD §9.3), so an assessment is explicitly asynchronous."},"CapitalApplicationSummary":{"properties":{"id":{"type":"string","title":"Id"},"status":{"$ref":"#/components/schemas/AssessmentStatusEnum"},"requested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Requested At"},"waiting_on":{"items":{"type":"string"},"type":"array","title":"Waiting On"},"decision_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Status","description":"`approved` or `declined` once the lender decided."},"credit_line_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Credit Line Id"}},"type":"object","required":["id","status"],"title":"CapitalApplicationSummary","description":"The business's in-flight application to one offer, if any."},"CapitalEligibilityPreview":{"properties":{"bank_connected":{"type":"boolean","title":"Bank Connected","description":"A bank connection (Plaid item or partner feed) exists."},"bank_backfilled":{"type":"boolean","title":"Bank Backfilled","description":"The bank connection's first sync has delivered."},"months_of_bank_history":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Months Of Bank History","description":"Whole months between the oldest bank-feed row and today."},"shopify_connected":{"type":"boolean","title":"Shopify Connected","default":false},"waiting_on":{"items":{"type":"string"},"type":"array","title":"Waiting On","description":"What an assessment would wait on today, in the vocabulary of `UnderwritingAssessmentResponse.waiting_on`."},"checked_at":{"type":"string","format":"date-time","title":"Checked At"}},"type":"object","required":["bank_connected","bank_backfilled","checked_at"],"title":"CapitalEligibilityPreview","description":"A cheap read of the data an assessment would measure.\n\nReuses the underwriting readiness check, read-only: nothing is scored\nand no assessment is opened."},"CapitalOffer":{"properties":{"program_id":{"type":"string","title":"Program Id"},"operator_business_id":{"type":"string","title":"Operator Business Id"},"display_name":{"type":"string","title":"Display Name"},"blurb":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Blurb"},"lending_model":{"$ref":"#/components/schemas/LendingModel"},"limit_min_cents":{"type":"integer","title":"Limit Min Cents"},"limit_max_cents":{"type":"integer","title":"Limit Max Cents"},"allowed_term_days":{"items":{"type":"integer"},"type":"array","title":"Allowed Term Days"},"default_rate_bps":{"type":"integer","title":"Default Rate Bps","description":"Annual rate in basis points."},"default_disbursement_fee_bps":{"type":"integer","title":"Default Disbursement Fee Bps","description":"Fee on each draw at origination, in basis points."},"max_float_days":{"type":"integer","title":"Max Float Days"},"legal_lending_entity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Lending Entity"},"eligibility_preview":{"anyOf":[{"$ref":"#/components/schemas/CapitalEligibilityPreview"},{"type":"null"}],"description":"Null when no cheap pre-check could be read."},"application":{"anyOf":[{"$ref":"#/components/schemas/CapitalApplicationSummary"},{"type":"null"}],"description":"The business's application to this offer, when one exists."}},"type":"object","required":["program_id","operator_business_id","display_name","lending_model","limit_min_cents","limit_max_cents","allowed_term_days","default_rate_bps","default_disbursement_fee_bps","max_float_days"],"title":"CapitalOffer","description":"One listed program, as a borrower sees it."},"CapitalOffersResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CapitalOffer"},"type":"array","title":"Items"}},"type":"object","title":"CapitalOffersResponse"},"LendingModel":{"type":"string","enum":["per_transaction","cycle_draw"],"title":"LendingModel","description":"What the unit of borrowing is.\n\n* ``per_transaction`` — every posted card transaction originates its\n  own loan with its own term, due date, fee, and daily accrual after\n  the due date. The monthly statement is a presentation wrapper and\n  the moment accrued interest is applied. This is the Tie model\n  (FRD v2 §10.5, D-01).\n* ``cycle_draw`` — settlements accumulate into a monthly cycle that\n  resolves into one draw at close, carrying one term, one due date,\n  and one interest figure. The credit-card model FRD v1 specified.\n\nA program picks one. Lines inherit it, and every engine branch keys\non it, so a second partner on the other model is a row, not a build."},"SuccessEnvelope_CapitalOffersResponse_":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"data":{"anyOf":[{"$ref":"#/components/schemas/CapitalOffersResponse"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"SuccessEnvelope[CapitalOffersResponse]"},"ErrorResponse":{"title":"ErrorResponse","type":"object","description":"Envelope returned by every non-2xx response. Branch on `code` (stable) rather than `message` (human-readable, may change).","required":["error","message","code"],"properties":{"error":{"type":"string","description":"Error category: `validation_error`, `unauthorized`, `forbidden`, `not_found`, `conflict`, `rate_limited`, `server_error`, or `service_unavailable`."},"message":{"type":"string","description":"Human-readable explanation, safe to show to end users."},"code":{"type":"string","description":"Stable machine-readable code in `CATEGORY_NNN` form (e.g. `NOT_FOUND_006`, `AUTH_010`, `GEN_002`)."},"request_id":{"type":"string","description":"Correlation id for support requests. Echoes the `x-request-id` request header when one was supplied."},"errors":{"type":"object","additionalProperties":{"type":"string"},"description":"Field-level validation messages keyed by field name. Present on 400/422 validation failures only."}}}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Token","description":"API token authentication. Format: `Bearer dz_...`"}}},"security":[{"BearerAuth":[]}]}