# Attribute calls to your customers

import { Card } from "zudoku/ui/Card";
import { RotateCcw, CircleAlert } from "zudoku/icons";

Add `X-Customer-Reference` to identify the customer for a [charged call](/definitions), an API request with a price.

## Send your customer identifier

The header is optional on any charged call.
Send your own ID, not a name or email.
The value is 1 to 64 characters: letters, digits, `.`, `_`, `:` and `-`.

An invalid value receives [`400 invalid-request`](/errors/invalid-request) with `reason: customer-reference-form`.
Nothing is charged for that refusal.

Use the same customer ID in each language:

<CodeTabs syncKey="request-language" hideIcon>

```bash title="cURL"
curl https://api.investorliftdata.com/v1/predict \
  --request POST --max-time 30 \
  --header "Authorization: Bearer $INVESTORLIFT_API_KEY" \
  --header "Content-Type: application/json" \
  --header "X-Customer-Reference: cust-42" \
  --data '{"address": "1026 N Beckley Ave, Dallas, TX 75203"}'
```

```javascript title="JavaScript"
const response = await fetch("https://api.investorliftdata.com/v1/predict", {
  method: "POST",
  signal: AbortSignal.timeout(30_000),
  headers: {
    Authorization: `Bearer ${process.env.INVESTORLIFT_API_KEY}`,
    "Content-Type": "application/json",
    "X-Customer-Reference": "cust-42",
  },
  body: JSON.stringify({ address: "1026 N Beckley Ave, Dallas, TX 75203" }),
});
console.log(await response.json());
```

```python title="Python"
import os
import requests

response = requests.post(
    "https://api.investorliftdata.com/v1/predict",
    headers={
        "Authorization": f"Bearer {os.environ['INVESTORLIFT_API_KEY']}",
        "Content-Type": "application/json",
        "X-Customer-Reference": "cust-42",
    },
    json={"address": "1026 N Beckley Ave, Dallas, TX 75203"},
    timeout=30,
)
print(response.json())
```

</CodeTabs>

<details>
<summary>Show the full response (145 lines)</summary>

```json title="Full response" operation="predict"
{
  "comps": [
    {
      "sqft": 2080,
      "lotsize": 6500,
      "bedrooms": 6,
      "bathrooms": 2,
      "sale_date": "2024-12-03",
      "sale_price": 246641,
      "year_built": 1945,
      "address_zip": "75203",
      "property_id": "00000000000000000000000000000001",
      "address_city": "Dallas",
      "address_state": "TX",
      "property_type": "Single Family",
      "address_street": "523 N Marsalis Ave",
      "distance_miles": 0.4,
      "similarity_rank": 1,
      "price_per_square_foot": 119
    },
    {
      "sqft": 1400,
      "lotsize": 7025,
      "bedrooms": 3,
      "bathrooms": 1,
      "sale_date": "2026-05-08",
      "sale_price": 234999,
      "year_built": 1930,
      "address_zip": "75203",
      "property_id": "00000000000000000000000000000001",
      "address_city": "Dallas",
      "address_state": "TX",
      "property_type": "Single Family",
      "address_street": "102 E 5th St",
      "distance_miles": 0.09,
      "similarity_rank": 2,
      "price_per_square_foot": 168
    },
    {
      "sqft": 1787,
      "lotsize": 6678,
      "bedrooms": 4,
      "bathrooms": 2,
      "sale_date": "2025-03-05",
      "sale_price": 503139,
      "year_built": 1945,
      "address_zip": "75208",
      "property_id": "00000000000000000000000000000001",
      "address_city": "Dallas",
      "address_state": "TX",
      "property_type": "Single Family",
      "address_street": "818 Elsbeth St",
      "distance_miles": 0.24,
      "similarity_rank": 3,
      "price_per_square_foot": 282
    }
  ],
  "comp_band": {
    "low": 388634,
    "high": 942020,
    "median": 571412
  },
  "cost_stack": {
    "loan": 331200,
    "points": 6624,
    "interest": 6533,
    "hold_days": 60,
    "down_payment": 82800,
    "closing_costs": 29562,
    "target_profit": 114282
  },
  "rehab_budget": 0,
  "target_margin": 0.2,
  "valuation_mean": 1016099,
  "subject_property": {
    "facts": {
      "bathrooms": {
        "value": 2,
        "source": "county-record"
      },
      "year_built": {
        "value": 1935,
        "source": "county-record"
      },
      "square_feet": {
        "value": 2047,
        "source": "county-record"
      },
      "property_type": {
        "value": "Single Family",
        "source": "county-record"
      },
      "lot_size_square_feet": {
        "value": 7100,
        "source": "county-record"
      }
    },
    "address": {
      "zip": "75203",
      "city": "Dallas",
      "state": "TX",
      "street": "1026 N Beckley Ave"
    },
    "property_id": "00000000000000000000000000000001",
    "address_quality": {
      "code": "zip-confirmed",
      "statement": "The house number matched exactly one county record, and that record sits in the same ZIP code your address resolved to. Check the address and property facts in this block before relying on these numbers."
    },
    "outside_model_range": {
      "flagged": false,
      "reasons": []
    }
  },
  "as_is_similar_band": {
    "basis": "all-comparable-sales",
    "statement": "Too few comparable sales passed the size, age and recency filter this service applies to state a similar-sales range, so this price-per-square-foot range covers every comparable sale below that carries a usable sale price and square footage. `qualifying_sales` is how many passed the filter and fell short.",
    "qualifying_sales": 1,
    "price_per_square_foot": {
      "low": 190,
      "high": 460,
      "median": 279
    }
  },
  "rehab_adjusted_arv": 571000,
  "max_allowable_offer": {
    "amount": 414000,
    "clamped": false
  },
  "valuation_quantiles": {
    "0.02": 191787,
    "0.10": 345336,
    "0.20": 476815,
    "0.30": 598093,
    "0.40": 733771,
    "0.50": 878872,
    "0.60": 1110818,
    "0.70": 1417051,
    "0.80": 1988162,
    "0.90": 3615373,
    "0.98": 15505619
  },
  "effective_sample_size": 51.04950714111328,
  "model_estimate_available": true,
  "pricing_model_arv_estimate": 1417000
}
```

</details>

## Next steps

<div className="docs-next-steps">

<Card className="docs-next-card"><a href="/production/retry-safely"><RotateCcw className="docs-next-icon" size={18} strokeWidth={1.5} aria-hidden="true" focusable="false" /><strong>Retry safely</strong><span className="docs-next-description">Protect retries with a request key.</span><span className="docs-next-arrow" aria-hidden="true">→</span></a></Card>

<Card className="docs-next-card"><a href="/production/handle-errors"><CircleAlert className="docs-next-icon" size={18} strokeWidth={1.5} aria-hidden="true" focusable="false" /><strong>Handle errors</strong><span className="docs-next-description">Find the right fix for a refusal.</span><span className="docs-next-arrow" aria-hidden="true">→</span></a></Card>

</div>
