POST /compute/scenarioId
POST /api/v1/compute/{scenarioId}
Section titled “POST /api/v1/compute/{scenarioId}”Calculate servicing/borrowing capacity for a specific lender.
Overview
Section titled “Overview”Runs the servicing calculator for a given scenario and lender, returning whether the loan services, maximum borrowing capacity, rate breakdowns, and detailed validation results.
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: POST
URL: https://api.quickli.com/api/v1/compute/\{scenarioId\}
Path Parameters:
scenarioId(required) - Scenario ObjectId
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/jsonBody:
{ "lenderName": "cba", "addToRates": 0}| Field | Type | Required | Description |
|---|---|---|---|
lenderName | string | Yes | Lender identifier (e.g., 'cba', 'westpac', 'anz', 'nab') |
addToRates | number | No | Optional rate buffer to add (e.g., 0.5 for +0.5%) |
Response
Section titled “Response”Success Response (200 OK)
Section titled “Success Response (200 OK)”See Servicing Result Schema for complete details.
{ "data": { "lender_name": "cba", "does_service": true, "max_borrowing_capacity": 720000, "net_monthly_surplus": 1245.50, "debt_to_income_ratio": 5.2, "validations": [ { "name": "Minimum Income", "passed": true, "message": "Income exceeds minimum threshold" } ], "warnings": [ "Commission income requires evidence" ], "per_loan_rate_breakdown": [ { "loan_id": "loan-1", "rate": 6.24, "base_rate": 6.04 } ], "ytd_results": [ /* ... */ ] }}Error Responses
Section titled “Error Responses”401 Unauthorized
Section titled “401 Unauthorized”Invalid credentials.
403 Forbidden
Section titled “403 Forbidden”- User doesn’t have access to specified lender
404 Not Found
Section titled “404 Not Found”- Scenario doesn’t exist.
- Scenario is not a part of user’s accessible teams.
422 Validation Error
Section titled “422 Validation Error”Invalid request body.
Code Examples
Section titled “Code Examples”curl -X POST https://api.quickli.com/api/v1/compute/507f1f77bcf86cd799439011 \ -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}" \ -H "Content-Type: application/json" \ -d '{ "lenderName": "cba", "addToRates": 0 }'// See Authentication Guide for generateAuthHeaders implementationasync function computeServicing( scenarioId: string, lenderName: string, addToRates?: number) { const path = `/api/v1/compute/${scenarioId}`; const body = {lenderName, addToRates}; const headers = generateAuthHeaders('POST', path, body);
const response = await fetch( `https://api.quickli.com${path}`, { method: 'POST', headers, body: JSON.stringify(body) } );
if (!response.ok) { const error = await response.json(); throw new Error(error.error.message); }
return (await response.json()).data;}
// Usageconst result = await computeServicing('507f1f77bcf86cd799439011', 'cba');
if (result.does_service) { console.log('✓ Loan services with ' + result.lender_name); console.log('Max capacity: $' + result.max_borrowing_capacity.toLocaleString()); console.log('Rate: ' + result.per_loan_rate_breakdown[0].rate + '%');} else { console.log('✗ Loan does not service'); result.validations .filter(v => !v.passed) .forEach(v => console.log('- ' + v.name + ': ' + v.message));}Example Use Cases
Section titled “Example Use Cases”(See main code examples above for usage patterns)
Scenarios this may be helpful:
- Incorporating a piece of policy manually into servicing results
- Stress testing serviceability
- User must have access to both the scenario’s team AND the specified lender
- Integration partner must have access to the specified lender
- Rate buffer is added to all loan rates
- Results include detailed validation checks and warnings
- Calculations use lender-specific products and policies
See Also
Section titled “See Also”- Servicing Result Schema - Complete response documentation
- GET /scenarios/{id} - Get scenario details
- GET /products - View lender products
- GET /policies - Review lender policies
Last updated: 2025-11-19