GET /policies
GET /api/v1/policies
Section titled âGET /api/v1/policiesâQuery lending policies filtered by lender(s) and trigger(s).
Overview
Section titled âOverviewâRetrieves lending policy documents filtered by lenders and policy triggers. Policies contain markdown-formatted content describing how lenders assess income, expenses, properties, and borrower eligibility.
Authentication
Section titled âAuthenticationâRequired: RSA signature-based authentication
X-Auth-Client-ID: {clientId}X-Auth-Access-Token: {accessToken}X-Auth-Timestamp: {timestamp}X-Auth-Nonce: {nonce}X-Auth-Signature: {signature}Request
Section titled âRequestâMethod: GET
URL: https://api.quickli.com/api/v1/policies
Headers:
X-Auth-Client-ID: {clientId}X-Auth-Access-Token: {accessToken}X-Auth-Timestamp: {timestamp}X-Auth-Nonce: {nonce}X-Auth-Signature: {signature}Content-Type: application/jsonQuery Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
lenders | string | string[] | Yes | Single lender or comma-separated list |
triggers | string | string[] | Yes | Single trigger or comma-separated list |
search | string | No | Optional keyword search in policy content |
orderResults | string | No | 'true' (default) or 'false' to disable sorting |
Examples:
GET /api/v1/policies?lenders=cba&triggers=paygGET /api/v1/policies?lenders=cba,westpac&triggers=payg,commissionGET /api/v1/policies?lenders=cba&triggers=self_employed&search=tax+returnsResponse
Section titled âResponseâSuccess Response (200 OK)
Section titled âSuccess Response (200 OK)âSee Policy Schema for complete documentation.
{ "data": [ { "lender": "cba", "triggers": ["payg", "commission"], "content": "# PAYG Income Assessment\n\n## Standard Assessment\n- Minimum 3 months employment...", "lastVerifiedOn": "2025-10-15T00:00:00.000Z" } ], "meta": { "timestamp": "2025-11-03T10:30:00.000Z", "count": 1 }}With Search Highlights
Section titled âWith Search HighlightsâWhen using search, matching text is highlighted:
{ "data": [ { "lender": "cba", "triggers": ["self_employed"], "content": "...", "lastVerifiedOn": "2025-10-15T00:00:00.000Z", "highlights": [ "...ABN holders with <em>2 years</em> of trading history...", "...average of last <em>2 years</em> tax returns..." ] } ]}Error Responses
Section titled âError Responsesâ400 Bad Request
Section titled â400 Bad RequestâMissing lenders or triggers parameters.
401 Unauthorized
Section titled â401 UnauthorizedâInvalid credentials.
403 Forbidden
Section titled â403 ForbiddenâUser doesnât have access to specified lenders.
Code Examples
Section titled âCode Examplesâ# Basic querycurl -X GET 'https://api.quickli.com/api/v1/policies?lenders=cba&triggers=payg' \-H "X-Auth-Client-ID: {clientId}" \-H "X-Auth-Access-Token: {accessToken}" \-H "X-Auth-Timestamp: {timestamp}" \-H "X-Auth-Nonce: {nonce}" \-H "X-Auth-Signature: {signature}"
# Multiple triggerscurl -X GET 'https://api.quickli.com/api/v1/policies?lenders=cba,westpac&triggers=payg,commission,overtime' \-H "X-Auth-Client-ID: {clientId}" \-H "X-Auth-Access-Token: {accessToken}" \-H "X-Auth-Timestamp: {timestamp}" \-H "X-Auth-Nonce: {nonce}" \-H "X-Auth-Signature: {signature}"
# With searchcurl -X GET 'https://api.quickli.com/api/v1/policies?lenders=cba&triggers=self_employed&search=ABN' \-H "X-Auth-Client-ID: {clientId}" \-H "X-Auth-Access-Token: {accessToken}" \-H "X-Auth-Timestamp: {timestamp}" \-H "X-Auth-Nonce: {nonce}" \-H "X-Auth-Signature: {signature}"// See Authentication Guide for generateAuthHeaders implementationinterface PolicyQuery { lenders: string | string[]; triggers: string | string[]; search?: string; orderResults?: boolean;}
async function getPolicies(query: PolicyQuery) { const params = new URLSearchParams(); params.set('lenders', Array.isArray(query.lenders) ? query.lenders.join(',') : query.lenders); params.set('triggers', Array.isArray(query.triggers) ? query.triggers.join(',') : query.triggers);
if (query.search) params.set('search', query.search); if (query.orderResults !== undefined) params.set('orderResults', String(query.orderResults));
const path = `/api/v1/policies?${params}`; const headers = generateAuthHeaders('GET', path, {});
const response = await fetch( `https://api.quickli.com${path}`, { headers } );
if (!response.ok) { const error = await response.json(); throw new Error(error.error.message); }
return (await response.json()).data;}
// Usageconst policies = await getPolicies({ lenders: ['cba', 'westpac'], triggers: ['payg', 'commission']});
policies.forEach(policy => { console.log(`\n${policy.lender.toUpperCase()}`); console.log(`Triggers: ${policy.triggers.join(', ')}`); console.log(`Last verified: ${new Date(policy.lastVerifiedOn).toLocaleDateString()}`); console.log(policy.content);});# See Authentication Guide for generate_auth_headers implementationdef get_policies(lenders, triggers, search=None): params = { 'lenders': ','.join(lenders) if isinstance(lenders, list) else lenders, 'triggers': ','.join(triggers) if isinstance(triggers, list) else triggers }
if search: params['search'] = search
# Build path with query string from urllib.parse import urlencode path = f'/api/v1/policies?{urlencode(params)}' headers = generate_auth_headers('GET', path, None)
response = requests.get( f'https://api.quickli.com{path}', headers=headers )
response.raise_for_status() return response.json()['data']
# Usagepolicies = get_policies( lenders=['cba', 'westpac'], triggers=['payg', 'commission'])
for policy in policies: print(f"\n{policy['lender'].upper()}") print(f"Triggers: {', '.join(policy['triggers'])}") print(policy['content'])Common Policy Triggers
Section titled âCommon Policy TriggersâIncome Triggers
Section titled âIncome Triggersâpayg- PAYG salary assessmentcasual- Casual employmentcommission- Commission incomeovertime- Overtime incomeself_employed- Self-employed/ABN holdersrental_income- Rental property incomeoverseas_income- Foreign income
Expense Triggers
Section titled âExpense Triggersâliving_expenses- Living expense assessmenthem- Household Expenditure Measure
Property Triggers
Section titled âProperty Triggersâproperty_type- Property type restrictionssecurity_valuation- Valuation requirementsrural- Rural property lending
Borrower Triggers
Section titled âBorrower Triggersâfirst_home_buyer- FHB concessionsvisa_status- Residency requirementscredit_history- Credit requirements
See Policy Schema for complete list.
Use Cases
Section titled âUse Casesâ1. Research Income Assessment
Section titled â1. Research Income Assessmentâconst policies = await getPolicies({ lenders: ['cba', 'westpac', 'anz'], triggers: ['commission']});
policies.forEach(p => { console.log(`\n${p.lender}: Commission Income Policy`); console.log(p.content);});2. Compare Self-Employed Policies
Section titled â2. Compare Self-Employed Policiesâconst policies = await getPolicies({ lenders: ['cba', 'westpac', 'anz', 'nab'], triggers: ['self_employed']});
// Compare requirementspolicies.forEach(p => { console.log(`${p.lender}:`); if (p.content.includes('2 years')) { console.log(' - Requires 2 years trading history'); } if (p.content.includes('tax returns')) { console.log(' - Requires tax returns'); }});3. Search for Specific Requirements
Section titled â3. Search for Specific Requirementsâconst policies = await getPolicies({ lenders: 'cba', triggers: ['payg'], search: 'probation'});
// View highlighted excerptspolicies.forEach(p => { if (p.highlights) { console.log('Probation period mentions:'); p.highlights.forEach(h => console.log(`- ${h}`)); }});Rendering Policy Content
Section titled âRendering Policy ContentâPolicies use markdown format. Render with a markdown parser:
React/TypeScript
Section titled âReact/TypeScriptâimport ReactMarkdown from 'react-markdown';
function PolicyViewer({ policy }: { policy: Policy }) { return ( <div> <h2>{policy.lender.toUpperCase()} - {policy.triggers.join(', ')}</h2> <p>Last verified: {new Date(policy.lastVerifiedOn).toLocaleDateString()}</p> <ReactMarkdown>{policy.content}</ReactMarkdown> </div> );}Filtering and Sorting
Section titled âFiltering and SortingâPolicies are automatically:
- Filtered by your lender access permissions
- Filtered to exclude white-label lenders
- Sorted by trigger order, then lender name (unless
searchis used) - When
searchis used, sorted by relevance score
Disable sorting with orderResults=false.
- Policy content is markdown-formatted
- Policies are regularly verified (check
lastVerifiedOndate) - Search highlights are HTML-formatted with
<em>tags - White-label lenders are hidden from public API
See Also
Section titled âSee Alsoâ- Policy Schema - Complete schema and trigger list
- POST /compute/[scenarioId] - See how policies affect calculations
- GET /products - View lender products
Last updated: 2025-11-19