1) Create job (JSON batch)
Endpoint: POST /v1/distress
Submit a plain list of address strings. Output is CSV.
curl -X POST "BASE_URL/v1/distress" \
-H "Authorization: Bearer API_KEY" \
-H "Content-Type: application/json" \
-d ‘{
"source": "api",
"addresses": [
"123 Maple St, Springfield, IL 62704",
"456 Oak Ave, Springfield, IL 62704"
]
}’
Response: { "jobId": "..." } — use jobId to poll status and download output.csv.
2) Create job (CSV upload)
Endpoint: POST /v1/distress/csv (multipart/form-data)
Upload a CSV file with an address column. Output is CSV.
curl -X POST "BASE_URL/v1/distress/csv" \
-H "Authorization: Bearer API_KEY" \
-F "
[email protected]" \
-F "source=csv" \
-F "strict=false"
Response: { "jobId": "..." } — use jobId to poll status and download output.csv.
3) Create job (JSON upload)
Endpoint: POST /v1/distress/json
Submit addresses with an optional per-row id (e.g. a property ID from your system) — it is echoed back as data[].id in the output so you can correlate results with your own records. Output is JSON.
curl -X POST "BASE_URL/v1/distress/json" \
-H "Authorization: Bearer API_KEY" \
-H "Content-Type: application/json" \
-d ‘{
"source": "api",
"addresses": [
{ "id": "prop_001", "address": "123 Maple St, Springfield, IL 62704" },
{ "id": "prop_002", "address": "456 Oak Ave, Springfield, IL 62704" }
]
}’
Response: { "jobId": "..." } — use jobId to poll status and download output.json.
4) Poll status
Endpoint: GET /v1/distress/{jobId}
Check processing progress. When status is "completed" the job is ready to download.
curl -X GET "BASE_URL/v1/distress/JOB_ID" \
-H "Authorization: Bearer API_KEY"
Response: { "jobId", "status", "total", "done", "percentageDone", "outputDownloadUrl", "error" }
5) Webhook push (optional)
Instead of polling, configure a webhook URL on your account and the API will
POST job status automatically on every status change (
queued → processing → finalizing → completed or
error).
Set your webhook URL on the
Settings page (coming soon), or contact support.
Payload sent to your URL (same shape as GET /v1/distress/{jobId}):
POST https://your-server.example.com/webhook
Content-Type: application/json
{
"jobId": "11668fafc4d847d5bd7e9444698e5b08",
"source": "api",
"status": "completed",
"total": 250,
"done": 250,
"percentageDone": 100,
"outputDownloadUrl": "BASE_URL/v1/distress/JOB_ID/download",
"error": "",
"hasErrors": false,
"createdUtc": "2025-01-15T10:00:00Z",
"processingStartedUtc": "2025-01-15T10:00:05Z",
"completedUtc": "2025-01-15T10:04:22Z"
}
Delivery: 3 attempts with 1.5 s intervals. Your endpoint should return 2xx. Use the test endpoint below to verify your receiver works before going live.
curl -X POST "BASE_URL/v1/account/webhook/test" \
-H "Authorization: Bearer API_KEY" \
-H "Content-Type: application/json" \
-d '{ "status": "test", "jobId": "ping" }'
Test endpoint logs the received payload server-side and returns { "received": true }. Use it as your webhook URL during development.
6) Download output
Endpoint: GET /v1/distress/{jobId}/download?mode=stream
Returns output.csv or output.json depending on the job type. Use ?mode=stream when downloading via fetch — browsers can’t attach an Authorization header to a plain link click.
curl -L "BASE_URL/v1/distress/JOB_ID/download?mode=stream" \
-H "Authorization: Bearer API_KEY" \
-o output.csv
Response: file stream with Content-Disposition: attachment; filename="output.csv" (or output.json for JSON jobs).
Response examples
Shapes reflect what the portal expects from the API.
Job status JSON
{
"jobId": "11668fafc4d847d5bd7e9444698e5b08",
"status": "running",
"total": 250,
"done": 42,
"percentageDone": 16.8,
"outputDownloadUrl": "BASE_URL/v1/distress/11668fafc4d847d5bd7e9444698e5b08/download",
"error": null
}
output.csv row
address,distress,notes,imageUrl
"123 Maple St, Springfield, IL 62704",7,"damaged siding; peeling paint; overgrown yard","BASE_URL/v1/distress/JOB_ID/SHA.jpg"