{"openapi":"3.1.0","info":{"title":"Cressida Direct API","version":"1.0.0","description":"Machine-readable API for Cressida Direct — a nationwide direct lender for commercial and investment property financing. This API enables AI agents, autonomous buyers, and third-party integrations to query loan programs, transactions, and submit inquiries.","contact":{"name":"Cressida Direct","url":"https://cressidadirect.com","email":"info@cressidadirect.com"},"license":{"name":"Proprietary"}},"servers":[{"url":"https://cressidadirect.com","description":"Production"}],"tags":[{"name":"Programs","description":"Loan program data — rates, LTV, eligibility, documentation requirements"},{"name":"Transactions","description":"Recent closed loan transactions"},{"name":"Contact","description":"Contact and inquiry submission"},{"name":"Broker","description":"Broker portal — authentication required"},{"name":"Loans","description":"Loan submission and status — authentication required"}],"paths":{"/api/trpc/programs.list":{"post":{"tags":["Programs"],"summary":"List all loan programs","description":"Returns all 7 loan programs with full details: rates, LTV, loan amounts, documentation requirements, property types, borrower types, and FAQs. Filter by category.","operationId":"programs_list","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"json":{"type":"object","properties":{"category":{"type":"string","enum":["all","owner_occupied","investment","residential","short_term","sba"],"description":"Filter programs by category"}}}}},"example":{"json":{}}}}},"responses":{"200":{"description":"Array of loan program objects","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"data":{"type":"object","properties":{"json":{"type":"array","items":{"$ref":"#/components/schemas/LoanProgram"}}}}}}}}}}}}}},"/api/trpc/programs.getBySlug":{"post":{"tags":["Programs"],"summary":"Get a loan program by slug","description":"Returns full details for a single loan program including all parameters, FAQs, and schema.org LoanOrCredit data.","operationId":"programs_getBySlug","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"json":{"type":"object","required":["slug"],"properties":{"slug":{"type":"string","enum":["sba-504-7a","owner-occupied-commercial","investor-commercial","investor-residential","bridge-financing","fix-and-flip","guc-residential"]}}}}},"example":{"json":{"slug":"investor-residential"}}}}},"responses":{"200":{"description":"Loan program object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoanProgram"}}}},"404":{"description":"Program not found"}}}},"/api/trpc/programs.compare":{"post":{"tags":["Programs"],"summary":"Compare multiple loan programs","description":"Returns an array of loan program objects for side-by-side comparison. Pass up to 7 slugs.","operationId":"programs_compare","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"json":{"type":"object","required":["slugs"],"properties":{"slugs":{"type":"array","items":{"type":"string"},"maxItems":7}}}}},"example":{"json":{"slugs":["investor-commercial","bridge-financing"]}}}}},"responses":{"200":{"description":"Array of loan program objects","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LoanProgram"}}}}}}}},"/api/trpc/transactions.list":{"post":{"tags":["Transactions"],"summary":"List recent closed transactions","description":"Returns recent closed loan transactions. Filter by state, property type, and loan amount range.","operationId":"transactions_list","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"json":{"type":"object","properties":{"state":{"type":"string","description":"2-letter US state code (e.g. CA, TX)"},"propertyType":{"type":"string"},"minAmount":{"type":"number"},"maxAmount":{"type":"number"}}}}},"example":{"json":{"state":"CA","minAmount":500000}}}}},"responses":{"200":{"description":"Array of transaction objects","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Transaction"}}}}}}}},"/api/trpc/blog.list":{"post":{"tags":["Blog"],"summary":"List published Market Insights articles","description":"Returns published blog articles covering DSCR, SBA, commercial lending, and bridge financing topics. AEO-optimized with FAQ sections and structured data.","operationId":"blog_list","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"json":{"type":"object","properties":{"category":{"type":"string","enum":["dscr","sba","commercial","bridge","market_update","broker_tips"]}}}}},"example":{"json":{}}}}},"responses":{"200":{"description":"Array of blog post objects"}}}},"/api/trpc/blog.getBySlug":{"post":{"tags":["Blog"],"summary":"Get a blog article by slug","operationId":"blog_getBySlug","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"json":{"type":"object","required":["slug"],"properties":{"slug":{"type":"string"}}}}},"example":{"json":{"slug":"what-is-a-dscr-loan"}}}}},"responses":{"200":{"description":"Blog post object with full content"},"404":{"description":"Article not found"}}}},"/api/trpc/contact.submit":{"post":{"tags":["Contact"],"summary":"Submit a contact inquiry","description":"Submit a financing inquiry or general question. The owner receives an in-app notification. Response guaranteed within 1 business day.","operationId":"contact_submit","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"json":{"type":"object","required":["name","email","message"],"properties":{"name":{"type":"string","minLength":2,"maxLength":255},"email":{"type":"string","format":"email"},"phone":{"type":"string"},"subject":{"type":"string"},"message":{"type":"string","minLength":10,"maxLength":5000}}}}}}}},"responses":{"200":{"description":"Inquiry submitted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"data":{"type":"object","properties":{"json":{"type":"object","properties":{"success":{"type":"boolean"}}}}}}}}}}}}}}}},"components":{"schemas":{"LoanOrService":{"type":"object","description":"Schema.org LoanOrService type — a Cressida Direct loan program","x-schema-org-type":"LoanOrService"},"LoanProgram":{"type":"object","description":"A Cressida Direct loan program with full eligibility and parameter data","properties":{"slug":{"type":"string","description":"URL-safe unique identifier"},"name":{"type":"string"},"tagline":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","enum":["owner_occupied","investment","residential","short_term","sba"]},"bestFor":{"type":"string"},"loanRange":{"type":"object","properties":{"min":{"type":"number","description":"Minimum loan amount in USD"},"max":{"type":"number","description":"Maximum loan amount in USD"}}},"maxLtv":{"type":"number","description":"Maximum loan-to-value percentage"},"maxLtc":{"type":"number","description":"Maximum loan-to-cost percentage (construction programs)"},"documentation":{"type":"string","description":"Documentation type required"},"propertyTypes":{"type":"array","items":{"type":"string"}},"borrowerTypes":{"type":"array","items":{"type":"string"}},"closingDays":{"type":"object","properties":{"min":{"type":"number"},"max":{"type":"number"}}},"taxReturnsRequired":{"type":"boolean"},"balloonPayment":{"type":"boolean"},"yspAvailable":{"type":"boolean"},"highlights":{"type":"array","items":{"type":"string"}},"features":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"}}}},"faqs":{"type":"array","items":{"type":"object","properties":{"question":{"type":"string"},"answer":{"type":"string"}}}}}},"Transaction":{"type":"object","description":"A closed loan transaction","properties":{"id":{"type":"integer"},"city":{"type":"string"},"state":{"type":"string"},"amount":{"type":"string","description":"Loan amount in USD (decimal string)"},"propertyType":{"type":"string"},"loanPurpose":{"type":"string"},"ltv":{"type":"string","description":"LTV percentage (decimal string)"},"rate":{"type":"string"},"brokerEarned":{"type":"string","description":"Broker compensation in USD (decimal string)"},"closedDays":{"type":"integer"},"highlights":{"type":"array","items":{"type":"string"}}}}},"securitySchemes":{"cookieAuth":{"type":"apiKey","in":"cookie","name":"session","description":"Session cookie obtained via Manus OAuth flow at /api/oauth/callback"}}}}