{"openapi":"3.1.0","info":{"title":"LenderCloud Partner API","version":"1.0.0","description":"Programmatic access for equipment sellers and platforms to submit credit applications, receive automated underwriting decisions, request and upload documents, and retrieve signed application packages. Bi-directional: pull status/decisions and optionally receive webhook events.","contact":{"name":"LenderCloud","url":"https://lendercloud.com/developers"}},"servers":[{"url":"https://lendercloud.com/api/v1","description":"Production"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Partner API key: `Authorization: Bearer lc_live_...`"}},"schemas":{"ApplicationRequest":{"type":"object","required":["business","owner","equipment","consent"],"properties":{"business":{"type":"object","required":["legal_name"],"properties":{"legal_name":{"type":"string"},"dba":{"type":"string"},"ein":{"type":"string"},"entity_type":{"type":"string","enum":["LLC","Corporation","S-Corp","Partnership","Sole Proprietor"]},"years_in_business":{"type":"string","enum":["<1","1-2","2-5","5-10","10+"]},"annual_revenue":{"type":"string"},"phone":{"type":"string"},"address":{"type":"string"},"vendor_name":{"type":"string"},"vendor_email":{"type":"string"}}},"owner":{"type":"object","required":["full_name","ssn"],"properties":{"full_name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"ownership_pct":{"type":"string"},"ssn":{"type":"string","description":"9-digit SSN; encrypted at rest."}}},"equipment":{"type":"object","required":["type","cost"],"properties":{"type":{"type":"string"},"cost":{"type":"number"},"condition":{"type":"string","enum":["New","Used"]},"requested_term":{"type":"string"}}},"consent":{"type":"object","required":["agreed","signer_name"],"properties":{"agreed":{"type":"boolean","description":"Borrower agreed to FCRA credit-pull + third-party lender assignment authorization."},"signer_name":{"type":"string","description":"Typed electronic signature."}}}}},"DecisionResponse":{"type":"object","properties":{"id":{"type":"integer"},"reference":{"type":"string"},"status":{"type":"string","enum":["approved","documents_required","declined"]},"decision":{"type":"object","properties":{"outcome":{"type":"string"},"score":{"type":"number"},"tier":{"type":"string"}}},"offers":{"type":"object","nullable":true,"description":"Selectable financing offers when approved."},"required_documents":{"type":"array","nullable":true,"items":{"type":"object"}},"reasons":{"type":"array","nullable":true,"description":"Top adverse-action reasons when declined.","items":{"type":"object"}},"credit_scores":{"type":"object"}}}}},"paths":{"/applications":{"post":{"summary":"Submit a credit application and receive an instant decision","description":"Creates an application, triggers business + personal credit pulls, scores it against the active scorecard, and returns approval + offers, a document request, or a decline with reasons.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationRequest"}}}},"responses":{"201":{"description":"Decision returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionResponse"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error"}}}},"/applications/{id}":{"get":{"summary":"Get application status and latest decision","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Application detail"},"404":{"description":"Not found"}}}},"/applications/{id}/documents":{"get":{"summary":"List required and uploaded documents","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Document lists"}}},"post":{"summary":"Upload a document","description":"Upload via JSON (base64) or multipart form-data. Fulfills an open document request when request_id is supplied.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["filename","content_base64"],"properties":{"filename":{"type":"string"},"doc_type":{"type":"string"},"content_base64":{"type":"string"},"request_id":{"type":"integer"}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"doc_type":{"type":"string"},"request_id":{"type":"integer"}}}}}},"responses":{"201":{"description":"Document received"},"422":{"description":"Validation error"}}}},"/applications/{id}/pdf":{"get":{"summary":"Download the signed application PDF","description":"Returns the completed, e-signed application PDF (with signature, IP, timestamp) for your lender package.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"PDF binary","content":{"application/pdf":{}}}}}},"/enrich":{"post":{"summary":"Prefill business data from a website, name, or EIN","description":"Returns firmographic data (legal name, EIN, entity type, address, revenue) to pre-fill an application, powered by Enigma + SEC EDGAR.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"website":{"type":"string"},"name":{"type":"string"},"ein":{"type":"string"}}}}}},"responses":{"200":{"description":"Enrichment result"}}}}}}