API Documentation
Use these endpoints to submit leads programmatically into the PingFlow distribution system
POST
Lead Ingestion
Endpoint
POST https://leadtest.iamaffiliate.com/api/post.php
Description
Submit a lead into the distribution system. The lead will be instantly pinged to all active buyers. The highest bidder wins and the full response includes all bids.
Request Fields
| Field | Type | Required | Description |
|---|---|---|---|
zip | string | Yes | 5-digit ZIP code |
property_type | string | No | house, condo, townhouse, multi_family, land, commercial |
address | string | No | Street address (also accepts address_1) |
city | string | No | City name |
state | string | No | 2-letter state code (also accepts state_abbr) |
first_name | string | No | Contact first name |
last_name | string | No | Contact last name |
email | string | No | Contact email |
phone | string | No | 10-digit phone |
bedrooms | integer | No | Number of bedrooms |
bathrooms | integer | No | Number of bathrooms |
condition | string | No | excellent, good, fair, poor, needs_renovation |
asking_price | number | No | Seller's asking price |
motivation | string | No | inherited, relocating, downsizing, foreclosure, etc. |
timeline | string | No | asap, 1_month, 3_months, 6_months, 1_year |
test | boolean | No | Set to 1 to flag as test lead |
Example Request (cURL)
# Submit a lead via JSON
curl -X POST https://leadtest.iamaffiliate.com/api/post.php \
-H "Content-Type: application/json" \
-d '{
"zip": "60601",
"property_type": "house",
"address": "123 Main St",
"city": "Chicago",
"state": "IL",
"first_name": "John",
"last_name": "Smith",
"email": "john@example.com",
"phone": "5551234567",
"bedrooms": 3,
"bathrooms": 2,
"condition": "good",
"asking_price": 250000,
"motivation": "relocating",
"timeline": "asap"
}'
Success Response
{
"success": true,
"lead_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "sold",
"message": "Lead accepted",
"price": 45.50,
"buyer": "DirectBuy Internal",
"bids": [
{ "buyer": "DirectBuy Internal", "bid": 45.50, "status": "accepted", "response_time_ms": 142 },
{ "buyer": "Real Estate Bees", "bid": 32.00, "status": "accepted", "response_time_ms": 289 }
]
}
Rejected Response
{
"success": false,
"lead_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "rejected",
"message": "Lead rejected",
"bids": [
{ "buyer": "Real Estate Bees", "bid": 0, "status": "rejected", "response_time_ms": 180 },
{ "buyer": "DirectBuy Internal", "bid": 0, "status": "rejected", "response_time_ms": 95 }
]
}
Ping Tree Flow
Lead Submitted
Ping All Buyers
Collect Bids
Highest Bid Wins
Deliver Lead