Policy Schema
Policy Schema
Section titled âPolicy SchemaâThe policy schema represents lending policies from various lenders, categorized by policy triggers and containing detailed policy content in markdown format.
Overview
Section titled âOverviewâPolicies document how lenders assess and treat different aspects of loan applications, such as:
- Income assessment (PAYG, self-employed, rental, overseas)
- Expense calculations and buffers
- Property type restrictions
- Borrower eligibility criteria
- Special circumstances and exceptions
Schema Structure
Section titled âSchema Structureâinterface Policy { lender: LenderName; triggers: PolicyTrigger[]; content: string; lastVerifiedOn: string; highlights?: string[];}Core Fields
Section titled âCore Fieldsâ| Field | Type | Description |
|---|---|---|
lender | string | Lender identifier (e.g., 'cba', 'westpac', 'anz') |
triggers | string[] | Array of policy trigger keywords |
content | string | Markdown-formatted policy text |
lastVerifiedOn | string | ISO 8601 timestamp of last policy verification |
highlights | string[] | Search result highlights (when using search query) |
Policy Triggers
Section titled âPolicy TriggersâTriggers categorize policies by topic. Common triggers include:
Income Triggers
Section titled âIncome Triggersâ| Trigger | Description |
|---|---|
payg | PAYG salary and wages assessment |
casual | Casual employment income |
commission | Commission and bonus income |
overtime | Overtime income assessment |
self_employed | Self-employed income (ABN holders) |
rental_income | Rental property income |
investment_income | Dividends, interest, distributions |
overseas_income | Foreign-sourced income |
centrelink | Government benefits and pensions |
child_support | Child support received |
Expense Triggers
Section titled âExpense Triggersâ| Trigger | Description |
|---|---|
living_expenses | Living expense assessment methods |
hem | Household Expenditure Measure |
declared_expenses | Declared vs minimum expenses |
child_support_paid | Child support payments |
Property Triggers
Section titled âProperty Triggersâ| Trigger | Description |
|---|---|
property_type | Acceptable property types |
security_valuation | Valuation requirements |
construction | Construction loan policies |
rural | Rural property lending |
commercial | Commercial property security |
Borrower Triggers
Section titled âBorrower Triggersâ| Trigger | Description |
|---|---|
first_home_buyer | First home buyer concessions |
visa_status | Visa and residency requirements |
credit_history | Credit score and history requirements |
age_restrictions | Age-related lending limits |
Other Common Triggers
Section titled âOther Common Triggersâ| Trigger | Description |
|---|---|
lvr_limits | Maximum LVR by property type |
interest_only | Interest-only lending policies |
offset_accounts | Offset account availability |
lmi | Lenders Mortgage Insurance requirements |
serviceability | Servicing calculation methodologies |
Content Format
Section titled âContent FormatâPolicy content is stored as markdown for rich formatting:
# PAYG Income Assessment
## Standard Assessment- Minimum 3 months employment required- Base salary assessed at 100%- Probation period accepted with conditions
## Commission Income- Minimum 12 months history required- Average of last 2 years assessed at 80%- Must be regular and ongoing
## Overtime- Minimum 12 months history required- Assessed at 80% of average- Must be substantiated with payslipsExample Response
Section titled âExample Responseâ{ "data": [ { "lender": "cba", "triggers": ["payg", "commission", "overtime"], "content": "# PAYG Income Assessment\n\n## Standard Assessment\n- Minimum 3 months employment...", "lastVerifiedOn": "2025-10-15T00:00:00.000Z" }, { "lender": "westpac", "triggers": ["payg"], "content": "# PAYG Salary Income\n\nWestpac assesses PAYG income...", "lastVerifiedOn": "2025-10-20T00:00:00.000Z" } ], "meta": { "timestamp": "2025-11-03T10:30:00.000Z", "count": 2 }}Example with Search Highlights
Section titled âExample with Search HighlightsâWhen using the search parameter, matching text is highlighted:
{ "data": [ { "lender": "anz", "triggers": ["self_employed"], "content": "# Self-Employed Income...", "lastVerifiedOn": "2025-10-18T00:00:00.000Z", "highlights": [ "...ABN holders with <em>2 years</em> of trading history...", "...average of last <em>2 years</em> tax returns..." ] } ], "meta": { "timestamp": "2025-11-03T10:30:00.000Z", "count": 1 }}Using Policies
Section titled âUsing PoliciesâQuery by Trigger
Section titled âQuery by Triggerâ# Get all PAYG income policiescurl -X GET 'https://api.quickli.com/api/v1/policies?lenders=cba,westpac,anz&triggers=payg' \ -H "Authorization: Bearer {credentials}"Search Policy Content
Section titled âSearch Policy Contentâ# Search for specific requirementscurl -X GET 'https://api.quickli.com/api/v1/policies?lenders=cba&triggers=self_employed&search=tax+returns' \ -H "Authorization: Bearer {credentials}"Multiple Triggers
Section titled âMultiple Triggersâ# Get policies covering multiple topicscurl -X GET 'https://api.quickli.com/api/v1/policies?lenders=cba&triggers=payg,commission,overtime' \ -H "Authorization: Bearer {credentials}"Common Use Cases
Section titled âCommon Use Casesâ1. Income Assessment Research
Section titled â1. Income Assessment ResearchâScenario: Need to understand how CBA assesses commission income.
curl -X GET 'https://api.quickli.com/api/v1/policies?lenders=cba&triggers=commission' \ -H "Authorization: Bearer {credentials}"Review:
- Minimum history requirements
- Assessment percentage
- Documentation needed
- Any special conditions
2. Compare Lender Policies
Section titled â2. Compare Lender PoliciesâScenario: Compare self-employed income policies across lenders.
curl -X GET 'https://api.quickli.com/api/v1/policies?lenders=cba,westpac,anz,nab&triggers=self_employed' \ -H "Authorization: Bearer {credentials}"Analyze:
- Which lender has most favorable terms?
- Trading history requirements
- Documentation differences
- Assessment methodologies
3. Property Type Research
Section titled â3. Property Type ResearchâScenario: Check if lenders accept rural properties.
curl -X GET 'https://api.quickli.com/api/v1/policies?lenders=cba,westpac,anz&triggers=rural' \ -H "Authorization: Bearer {credentials}"Review:
- Maximum LVR for rural
- Land size restrictions
- Valuation requirements
- Any exclusions
4. Search Specific Requirements
Section titled â4. Search Specific RequirementsâScenario: Find policies mentioning âprobation periodâ.
curl -X GET 'https://api.quickli.com/api/v1/policies?lenders=cba,westpac&triggers=payg&search=probation' \ -H "Authorization: Bearer {credentials}"Result: Highlighted excerpts showing probation period policies.
Rendering Policy Content
Section titled âRendering Policy ContentâTypeScript/React
Section titled âTypeScript/Reactâimport ReactMarkdown from 'react-markdown';
function PolicyViewer({ policy }: { policy: Policy }) { return ( <div> <h2>{policy.lender.toUpperCase()} Policy</h2> <p>Triggers: {policy.triggers.join(', ')}</p> <p>Last verified: {new Date(policy.lastVerifiedOn).toLocaleDateString()}</p>
<div className="policy-content"> <ReactMarkdown>{policy.content}</ReactMarkdown> </div> </div> );}import markdown
def render_policy(policy): html_content = markdown.markdown(policy['content'])
print(f"Lender: {policy['lender']}") print(f"Triggers: {', '.join(policy['triggers'])}") print(f"Last Verified: {policy['lastVerifiedOn']}") print("\nPolicy Content:") print(html_content)Plain Text
Section titled âPlain Textâ// Extract plain text from markdownfunction stripMarkdown(content) { return content .replace(/#{1,6}\s/g, '') // Remove headers .replace(/\*\*(.*?)\*\*/g, '$1') // Remove bold .replace(/\*(.*?)\*/g, '$1') // Remove italic .replace(/\[(.*?)\]\(.*?\)/g, '$1'); // Remove links}
console.log(stripMarkdown(policy.content));Policy Updates
Section titled âPolicy UpdatesâPolicies are regularly verified and updated to reflect:
- Lender policy changes
- Rate and criteria updates
- New policy announcements
- Seasonal or promotional changes
Best practice: Check lastVerifiedOn date and consider policies older than 3 months as potentially outdated.
Filtering and Sorting
Section titled âFiltering and SortingâAPI Filtering
Section titled âAPI FilteringâThe API automatically filters policies by:
- Lender access: Only lenders you have permission for
- White-label exclusion: White-label lenders are hidden from public API
- Trigger matching: Only policies with requested triggers
API Sorting
Section titled âAPI SortingâBy default, policies are sorted by:
- Trigger order: Policies appear in the order of requested triggers
- Lender name: Within each trigger, sorted alphabetically by lender
When using search, sorting is by relevance score instead.
Disable Sorting
Section titled âDisable SortingâTo get unsorted results:
curl -X GET 'https://api.quickli.com/api/v1/policies?lenders=cba&triggers=payg&orderResults=false' \ -H "Authorization: Bearer {credentials}"Complete Example
Section titled âComplete ExampleâRequest
Section titled âRequestâcurl -X GET 'https://api.quickli.com/api/v1/policies?lenders=cba,westpac&triggers=payg,commission&search=12+months' \ -H "Authorization: Bearer {credentials}" \ -H "Content-Type: application/json"Response
Section titled âResponseâ{ "data": [ { "lender": "cba", "triggers": ["payg", "commission"], "content": "# PAYG and Commission Income\n\n## Standard PAYG\n- Minimum 3 months employment...\n\n## Commission Income\n- Requires 12 months history...", "lastVerifiedOn": "2025-10-15T00:00:00.000Z", "highlights": [ "...Requires <em>12 months</em> history of commission payments..." ] }, { "lender": "westpac", "triggers": ["payg", "commission"], "content": "# Employment Income Assessment\n\n## PAYG Income\n- Minimum 6 months employment...\n\n## Commission\n- Average of last 12 months...", "lastVerifiedOn": "2025-10-20T00:00:00.000Z", "highlights": [ "...Average of last <em>12 months</em> commission income..." ] } ], "meta": { "timestamp": "2025-11-03T10:30:00.000Z", "count": 2 }}Next Steps
Section titled âNext Stepsâ- Get policies endpoint - Fetch policy data
- Compute servicing endpoint - See how policies affect calculations
- Scenario schema - Build scenarios that comply with policies
Last updated: 2025-11-03