{"$schema":"https://json-schema.org/draft/2020-12/schema","title":"Loan Application","description":"Structured loan-application file submitted by a company to a prospective lender, including requested terms, a three-year financial snapshot, a schedule of existing debt and a consent to credit check.","type":"object","required":["application_date","application_reference","lender_name","lender_contact","applicant","request","financials","existing_debt","signatory"],"additionalProperties":false,"properties":{"application_date":{"type":"string","format":"date"},"application_reference":{"type":"string","minLength":1},"lender_name":{"type":"string","minLength":1},"lender_contact":{"type":"string","minLength":1},"applicant":{"type":"object","required":["legal_name","legal_form","registration","vat_id","address","industry","headcount","contact_name","contact_email","contact_phone"],"additionalProperties":false,"properties":{"legal_name":{"type":"string","minLength":1},"legal_form":{"type":"string","minLength":1},"registration":{"type":"string","minLength":1},"vat_id":{"type":"string","minLength":1},"address":{"type":"string","minLength":1},"industry":{"type":"string","minLength":1},"headcount":{"type":"integer","minimum":0},"contact_name":{"type":"string","minLength":1},"contact_email":{"type":"string","minLength":1},"contact_phone":{"type":"string","minLength":1}}},"request":{"type":"object","required":["amount","purpose","term_months","requested_rate","schedule_kind","preferred_disbursement_date"],"additionalProperties":false,"properties":{"amount":{"type":"number","exclusiveMinimum":0},"purpose":{"type":"string","minLength":1},"term_months":{"type":"integer","minimum":1,"maximum":600},"requested_rate":{"type":"number","minimum":0,"maximum":100},"schedule_kind":{"type":"string","enum":["bullet","amortizing","interest_only"]},"preferred_disbursement_date":{"type":"string","format":"date"}}},"collateral_summary":{"type":"string"},"financials":{"type":"object","required":["revenue","ebitda","net_income"],"additionalProperties":false,"properties":{"revenue":{"$ref":"#/$defs/yearTriple"},"ebitda":{"$ref":"#/$defs/yearTriple"},"net_income":{"$ref":"#/$defs/yearTriple"}}},"existing_debt":{"type":"array","items":{"type":"object","required":["lender","kind","original_amount","outstanding_amount","rate","maturity"],"additionalProperties":false,"properties":{"lender":{"type":"string","minLength":1},"kind":{"type":"string","minLength":1},"original_amount":{"type":"number","minimum":0},"outstanding_amount":{"type":"number","minimum":0},"rate":{"type":"number","minimum":0,"maximum":100},"maturity":{"type":"string","format":"date"}}}},"signatory":{"type":"object","required":["name","title"],"additionalProperties":false,"properties":{"name":{"type":"string","minLength":1},"title":{"type":"string","minLength":1}}}},"$defs":{"yearTriple":{"type":"object","required":["y_minus_2","y_minus_1","y_last"],"additionalProperties":false,"properties":{"y_minus_2":{"type":"number"},"y_minus_1":{"type":"number"},"y_last":{"type":"number"}}}}}