Examples
Single Family Primary Residence
Basic example with a single family home as primary residence.
Request:
curl -X POST https://yourdomain.com/api/{partner}/lead/create \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your_secret_key_here" \
-d '{
"affiliateId": "LEAD-12345",
"buildingType": "singleFamily",
"loanPurpose": "debtConsolidation",
"propertyUsage": "primaryResidence",
"contactInfo": {
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"phone": "+1-555-123-4567"
},
"address": {
"street": "123 Main St",
"city": "San Francisco",
"state": "CA",
"zip": "94102",
"county": "San Francisco"
},
"residentialAddress": {
"street": "456 Oak Ave",
"city": "San Francisco",
"state": "CA",
"zip": "94103"
},
"listedForSaleIn6Months": false,
"purchasedOrSubjectToMortgageIn6Months": false,
"liabilitiesIn4Years": false
}'
Response:
{
"success": true,
"quoteId": "clx1234567890abcdefgh",
"loginUrl": "https://yourdomain.com/api/auth/callback/credentials?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
Multi-Unit Investment Property
Example with a multi-unit investment property including rental information.
Request:
curl -X POST https://yourdomain.com/api/{partner}/lead/create \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your_secret_key_here" \
-d '{
"buildingType": "multiUnit",
"propertyUnits": 3,
"loanPurpose": "investment",
"propertyUsage": "investment",
"contactInfo": {
"firstName": "Jane",
"lastName": "Smith",
"email": "jane.smith@example.com",
"phone": "+1-555-987-6543"
},
"address": {
"street": "789 Elm St",
"city": "Los Angeles",
"state": "CA",
"zip": "90001"
},
"statedInformation": {
"monthlyRentalIncome": 4500,
"rentalOccupancy": "longTerm"
},
"residentialAddress": {
"street": "321 Pine St",
"city": "Los Angeles",
"state": "CA",
"zip": "90002"
},
"listedForSaleIn6Months": false,
"purchasedOrSubjectToMortgageIn6Months": false,
"liabilitiesIn4Years": false
}'
Response:
{
"success": true,
"quoteId": "clx0987654321zyxwvuts",
"loginUrl": "https://yourdomain.com/api/auth/callback/credentials?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
Condo Property
Example with a condo property (note the required unitNumber).
Request:
curl -X POST https://yourdomain.com/api/{partner}/lead/create \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your_secret_key_here" \
-d '{
"buildingType": "condo",
"loanPurpose": "homeImprovement",
"propertyUsage": "primaryResidence",
"contactInfo": {
"firstName": "Bob",
"lastName": "Johnson",
"email": "bob.johnson@example.com",
"phone": "+1-555-111-2222"
},
"address": {
"street": "100 Tower Blvd",
"city": "Seattle",
"state": "WA",
"zip": "98101",
"unitNumber": 305
},
"residentialAddress": {
"street": "100 Tower Blvd",
"city": "Seattle",
"state": "WA",
"zip": "98101"
},
"listedForSaleIn6Months": false,
"purchasedOrSubjectToMortgageIn6Months": false,
"liabilitiesIn4Years": false
}'
Response:
{
"success": true,
"quoteId": "clxabcdef123456789xyz",
"loginUrl": "https://yourdomain.com/api/auth/callback/credentials?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
Vacant Investment Property
Example with a vacant investment property (no rental income required).
Request:
curl -X POST https://yourdomain.com/api/{partner}/lead/create \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your_secret_key_here" \
-d '{
"buildingType": "singleFamily",
"loanPurpose": "investment",
"propertyUsage": "investment",
"contactInfo": {
"firstName": "Sarah",
"lastName": "Williams",
"email": "sarah.williams@example.com",
"phone": "+1-555-333-4444"
},
"address": {
"street": "555 Vacant Ln",
"city": "Austin",
"state": "TX",
"zip": "73301"
},
"statedInformation": {
"rentalOccupancy": "vacant"
},
"residentialAddress": {
"street": "777 Home St",
"city": "Austin",
"state": "TX",
"zip": "73302"
},
"listedForSaleIn6Months": false,
"purchasedOrSubjectToMortgageIn6Months": false,
"liabilitiesIn4Years": false
}'
Response:
{
"success": true,
"quoteId": "clxvacant123456789abc",
"loginUrl": "https://yourdomain.com/api/auth/callback/credentials?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
Second Home
Example with a second home property.
Request:
curl -X POST https://yourdomain.com/api/{partner}/lead/create \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your_secret_key_here" \
-d '{
"buildingType": "townhouse",
"loanPurpose": "homeImprovement",
"propertyUsage": "secondHome",
"contactInfo": {
"firstName": "Michael",
"lastName": "Brown",
"email": "michael.brown@example.com",
"phone": "+1-555-555-6666"
},
"address": {
"street": "888 Beach Rd",
"city": "Miami",
"state": "FL",
"zip": "33101"
},
"residentialAddress": {
"street": "999 Main Residence Dr",
"city": "Atlanta",
"state": "GA",
"zip": "30301"
},
"listedForSaleIn6Months": false,
"purchasedOrSubjectToMortgageIn6Months": false,
"liabilitiesIn4Years": false
}'
Response:
{
"success": true,
"quoteId": "clxsecond123456789xyz",
"loginUrl": "https://yourdomain.com/api/auth/callback/credentials?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}