# Use your own repair budget and margin

import { Card } from "zudoku/ui/Card";
import { Code2, Calculator, ChartNoAxesCombined } from "zudoku/icons";

Set your repair budget, target margin and supported property facts to price the house as you describe it.

## Set the repair budget and margin

These inputs use the existing sample address:

| Input | Example value |
| --- | --- |
| `address` | 1026 N Beckley Ave, Dallas, TX 75203 |
| `rehab_budget` | `48000` whole dollars |
| `target_margin` | `0.25`, or 25% |

`rehab_budget` accepts whole dollars from 0 to 10,000,000, inclusive.
Use `48000`, not `48000.50`.
It replaces the repair bracket selected by `condition`, even when you send both.

A zero budget prices the property as `turn_key` does.
Omitting both budget and condition also means no repairs.
Without your budget, the response uses the whole-project midpoint for the chosen condition.

`condition: tear_down` still receives `400`, even with a repair budget.
The service has no land-value estimate; analyze lot value separately.
Repair brackets are screening estimates, not contractor bids.

`target_margin` accepts a fraction from `0.01` to `0.9`, inclusive; its default is `0.2`.
For example, `0.25` means 25% of the repaired value.
The margin is a policy assumption chosen by judgment, not a fitted parameter.

The response's `rehab_budget` is the amount the arithmetic used.
The response's `target_margin` is the applied fraction, including when you accepted the default.
It appears on priced answers and is absent when `comp_band` is absent.

Changing the repair budget can change both the repaired value and holding costs.
Target profit uses the unrounded repaired value; published amounts may differ through rounding.
The default captured answer does not show the result of these custom inputs.

## Replace supported property facts

Send `overrides` to replace any of these six facts for the model, comparable-sales band and derived price.
Leaving it out keeps the county facts.

| Input | Allowed value |
| --- | --- |
| `overrides.square_feet` | Finished living area in square feet; a number above zero. |
| `overrides.bedrooms` | Bedroom count; a number at least zero, including studios. |
| `overrides.bathrooms` | Bathroom count; a number at least zero, which may be fractional, such as `2.5`. |
| `overrides.year_built` | Year built; a number above zero. |
| `overrides.lot_size_square_feet` | Lot size in square feet, never acres; a number above zero. |
| `overrides.property_type` | Nonblank text; surrounding spaces are trimmed. |

Each fact in `subject_property.facts` labels its source.
`caller-stated` means you supplied the value; `county-record` means the stored county value.
Your value reads `caller-stated` even when it equals the county record: the label tracks its source, not a change.

Overrides cannot change the property's identity, address or coordinates.
You cannot override `latitude`, `longitude`, or `partial_bathrooms`.
The resolved `subject_property.property_id` and `subject_property.address` still identify the matched house.

`subject_property.facts.partial_bathrooms` stays at the county figure and cannot be overridden.
Changing bathrooms does not change partial bathrooms, and this service does not add the two together.
Partial does not necessarily mean a half bath.

## Handle rejected values and missing facts

Unknown override keys, wrong types, `null`, invalid values and an empty overrides object receive `400` before charging.
Overrides can state facts, never erase them.
The [free request check](/production/test-without-spending) applies the same rules.

Top-level misspellings follow a different rule: they can count as extra properties and produce `413`.
Keep request options in their documented positions.

The valuation still needs coordinates, lot size and property type after overrides are applied.
If a required fact remains missing, the call is refused and its charge is refunded.
Supplying the missing lot size or property type can make the property possible to underwrite, with that fact labelled `caller-stated`.

Use [Score a property](/scoring/score-a-property) for the runnable default request and its captured answer.
The [reference](/api/scoring#score-a-property-address) gives the detailed input rules.

## Next steps

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

<Card className="docs-next-card"><a href="/scoring/score-a-property"><Code2 className="docs-next-icon" size={18} strokeWidth={1.5} aria-hidden="true" focusable="false" /><strong>Score a property</strong><span className="docs-next-description">Make the default call and read its answer.</span><span className="docs-next-arrow" aria-hidden="true">→</span></a></Card>

<Card className="docs-next-card"><a href="/scoring/maximum-allowable-offer"><Calculator className="docs-next-icon" size={18} strokeWidth={1.5} aria-hidden="true" focusable="false" /><strong>The maximum allowable offer</strong><span className="docs-next-description">Read the ceiling and its costs.</span><span className="docs-next-arrow" aria-hidden="true">→</span></a></Card>

<Card className="docs-next-card"><a href="/scoring/valuation-and-comps"><ChartNoAxesCombined className="docs-next-icon" size={18} strokeWidth={1.5} aria-hidden="true" focusable="false" /><strong>Valuation and comparable sales</strong><span className="docs-next-description">Read the evidence behind the numbers.</span><span className="docs-next-arrow" aria-hidden="true">→</span></a></Card>

</div>
