{"openapi":"3.1.0","info":{"title":"ParcelDossier Assessment API","version":"0.1.0"},"paths":{"/v1/assessments":{"post":{"summary":"Submit a property for assessment","description":"Accepts one RESO Data Dictionary 2.0 shaped property payload, enqueues an assessment job and returns 202 with a `Location` header naming the poll URL. The assessment NEVER runs in this request (POST-then-poll only). Unknown fields are accepted and echoed back in `ignored_fields`; matching is exact-PascalCase RESO names only. Requires `Authorization: Bearer <api key>` -- the tenant is derived from the key and from nothing else. An `Idempotency-Key` header (max 255 printable chars) makes a retry within 24 hours return the ORIGINAL job instead of creating a second one; the same key with a different payload is refused with 409.","operationId":"createAssessment","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentSubjectIn"}}}},"responses":{"202":{"description":"Accepted: the job is queued. Poll the Location URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentCreated"}}},"headers":{"Location":{"description":"The status URL path to poll (/v1/assessments/{job_id}).","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before the first poll.","schema":{"type":"string"}}}},"400":{"content":{"application/problem+json":{}},"description":"Problem codes: https://api.parceldossier.com/problems/invalid-payload"},"401":{"content":{"application/problem+json":{}},"description":"Problem codes: https://api.parceldossier.com/problems/unauthorized"},"402":{"content":{"application/problem+json":{}},"description":"Problem codes: https://api.parceldossier.com/problems/subscription-inactive, https://api.parceldossier.com/problems/spend-cap-exceeded"},"403":{"content":{"application/problem+json":{}},"description":"Problem codes: https://api.parceldossier.com/problems/entitlement-forbidden"},"409":{"content":{"application/problem+json":{}},"description":"Problem codes: https://api.parceldossier.com/problems/idempotency-conflict"},"429":{"content":{"application/problem+json":{}},"description":"Problem codes: https://api.parceldossier.com/problems/rate-limit-exceeded, https://api.parceldossier.com/problems/concurrency-limit-exceeded"},"500":{"content":{"application/problem+json":{}},"description":"Problem codes: https://api.parceldossier.com/problems/internal-error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/assessments/{job_id}":{"get":{"summary":"Poll one assessment job's status","description":"Returns the job's status -- one of `queued`, `running`, `succeeded`, `failed`, `partial` -- with a per-lane state map (`pending`/`running`/`done`/`degraded`/`not_ordered`, where `not_ordered` means the lane was not part of the ordered dimension). No percentage and no ETA is reported. A job id another tenant owns answers 404, identically to an id that does not exist.","operationId":"getAssessmentStatus","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"The job's status and per-lane state map.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentStatus"}}},"headers":{"Retry-After":{"description":"Seconds to wait before polling again. Sent only while the job is not terminal.","schema":{"type":"string"}}}},"401":{"content":{"application/problem+json":{}},"description":"Problem codes: https://api.parceldossier.com/problems/unauthorized"},"402":{"content":{"application/problem+json":{}},"description":"Problem codes: https://api.parceldossier.com/problems/subscription-inactive"},"403":{"content":{"application/problem+json":{}},"description":"Problem codes: https://api.parceldossier.com/problems/entitlement-forbidden"},"404":{"content":{"application/problem+json":{}},"description":"Problem codes: https://api.parceldossier.com/problems/job-not-found"},"500":{"content":{"application/problem+json":{}},"description":"Problem codes: https://api.parceldossier.com/problems/internal-error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/assessments/{job_id}/result":{"get":{"summary":"Fetch a finished assessment","description":"Returns the assessment produced by a finished job: the scored output, its cited evidence ledger, the composite version record (`engine`/`model_id`/`prompt_hash`) that produced it, and per-lane token usage and cost. 409 while the job is still queued or running; 422 when the subject could not be assessed. A job id another tenant owns answers 404, identically to an id that does not exist.","operationId":"getAssessmentResult","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"The finished assessment, its evidence, version record and usage.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentResult"}}}},"401":{"content":{"application/problem+json":{}},"description":"Problem codes: https://api.parceldossier.com/problems/unauthorized"},"402":{"content":{"application/problem+json":{}},"description":"Problem codes: https://api.parceldossier.com/problems/subscription-inactive"},"403":{"content":{"application/problem+json":{}},"description":"Problem codes: https://api.parceldossier.com/problems/entitlement-forbidden"},"404":{"content":{"application/problem+json":{}},"description":"Problem codes: https://api.parceldossier.com/problems/job-not-found"},"409":{"content":{"application/problem+json":{}},"description":"Problem codes: https://api.parceldossier.com/problems/result-not-ready"},"422":{"content":{"application/problem+json":{}},"description":"Problem codes: https://api.parceldossier.com/problems/unassessable-subject"},"500":{"content":{"application/problem+json":{}},"description":"Problem codes: https://api.parceldossier.com/problems/internal-error"}}}},"/v1/assessments/by-id/{assessment_id}":{"get":{"summary":"Fetch a stored assessment by its own id","description":"Returns a previously produced assessment addressed by its OWN id (API-05: any stored assessment stays retrievable by ID, together with the engine/model/prompt version that produced it -- even after its job row is archived). Same body as the job-addressed result route. An id another tenant owns answers 404, identically to an id that does not exist.","operationId":"getAssessmentById","parameters":[{"name":"assessment_id","in":"path","required":true,"schema":{"type":"string","title":"Assessment Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"The stored assessment; same body as the job-addressed result route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentResult"}}}},"401":{"content":{"application/problem+json":{}},"description":"Problem codes: https://api.parceldossier.com/problems/unauthorized"},"402":{"content":{"application/problem+json":{}},"description":"Problem codes: https://api.parceldossier.com/problems/subscription-inactive"},"403":{"content":{"application/problem+json":{}},"description":"Problem codes: https://api.parceldossier.com/problems/entitlement-forbidden"},"404":{"content":{"application/problem+json":{}},"description":"Problem codes: https://api.parceldossier.com/problems/job-not-found"},"500":{"content":{"application/problem+json":{}},"description":"Problem codes: https://api.parceldossier.com/problems/internal-error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AssessmentCreated":{"properties":{"job_id":{"type":"string","title":"Job Id","description":"The job id, a full canonical UUID (version 4)."},"status":{"type":"string","enum":["queued","running","succeeded","failed","partial"],"title":"Status","description":"The job's current status. `queued` for a new job; an Idempotency-Key replay reports the ORIGINAL job's current status."},"subject_ref":{"type":"string","title":"Subject Ref","description":"Opaque subject reference, `subj:<uuid>`."},"ignored_fields":{"items":{"type":"string"},"type":"array","title":"Ignored Fields","description":"Submitted field names that are not RESO Data Dictionary names this API reads, sorted. Empty when none."},"scope_notice":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope Notice","description":"Set when the subject is outside the deployment's primary coverage area (explains which evidence lanes will be thin); null otherwise."},"poll":{"type":"string","title":"Poll","description":"The status URL path to poll; the same value as the Location header."},"dimension":{"type":"string","enum":["standard_assessment","deep_assessment_with_vision","sandbox_assessment"],"title":"Dimension","description":"The billing dimension the job was created with."}},"type":"object","required":["job_id","status","subject_ref","ignored_fields","scope_notice","poll","dimension"],"title":"AssessmentCreated","description":"The 202 body of createAssessment. The job is queued, never run inline.","examples":[{"dimension":"standard_assessment","ignored_fields":["listprice"],"job_id":"7c2b9f3e-5d1a-4e8b-9c6f-2a4b8d0e1f37","poll":"/v1/assessments/7c2b9f3e-5d1a-4e8b-9c6f-2a4b8d0e1f37","scope_notice":"This deployment's permit-history, property-tax and comparable-sales sources cover Florida only. The subject is outside Florida, so those dimensions are reported with reduced coverage rather than estimated or guessed. The nationwide flood-zone and broadband-availability lanes run normally.","status":"queued","subject_ref":"subj:0d9e8f7a-6b5c-4d3e-8f21-0a1b2c3d4e5f"}]},"AssessmentDocument":{"properties":{"overall_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Overall Score","description":"Overall verdict, 1-10."},"price_vs_comps_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price Vs Comps Score","description":"Price against comparable sales, 1-10."},"rental_potential_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rental Potential Score","description":"Strength as a rental, 1-10."},"investment_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Investment Score","description":"Investment quality, 1-10."},"livability_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Livability Score","description":"Quality as a home to live in, 1-10."},"estimated_monthly_rent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Estimated Monthly Rent","description":"Estimated monthly rent in USD."},"estimated_cap_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Estimated Cap Rate","description":"Estimated cap rate, percent."},"estimated_cash_on_cash":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Estimated Cash On Cash","description":"Estimated cash-on-cash return, percent, 20% down."},"recommendation":{"anyOf":[{"type":"string","enum":["hot_deal","solid_pick","neutral","risky"]},{"type":"string"},{"type":"null"}],"title":"Recommendation","description":"One of `hot_deal`, `solid_pick`, `neutral`, `risky`."},"reasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning","description":"Synthesis prose."},"bull_case":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Bull Case","description":"Surviving arguments for buying."},"bear_case":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Bear Case","description":"Surviving arguments against buying."},"red_flags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Red Flags","description":"Concrete concerns."},"open_items":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Open Items","description":"Open questions a document or inspection could settle: key, kind, description, optional band_low/band_high."},"coverage":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/CoverageEntry"},"type":"object"},{"type":"null"}],"title":"Coverage","description":"Input coverage per lane, keyed by lane name (description, neighborhood, financial, comparables, records, vision)."},"dimension_confidence":{"anyOf":[{"additionalProperties":{"type":"string","enum":["high","medium","low"]},"type":"object"},{"type":"null"}],"title":"Dimension Confidence","description":"How well-evidenced the conclusion is per lane, keyed by lane name: high, medium or low."},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"Document completeness status."},"scope_notice":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope Notice","description":"Set when the subject is outside the primary coverage area."}},"additionalProperties":true,"type":"object","title":"AssessmentDocument","description":"The stored assessment output, returned verbatim. Every key is optional\nhere (a partial or sandbox document may omit some) and further keys may\nappear."},"AssessmentResult":{"properties":{"job_id":{"type":"string","title":"Job Id","description":"The job that produced the assessment."},"assessment_id":{"type":"string","title":"Assessment Id","description":"The assessment's own id."},"status":{"anyOf":[{"type":"string","enum":["queued","running","succeeded","failed","partial"]},{"type":"null"}],"title":"Status","description":"The job's status; null when the job row is archived."},"dimension":{"anyOf":[{"type":"string","enum":["standard_assessment","deep_assessment_with_vision","sandbox_assessment"]},{"type":"null"}],"title":"Dimension","description":"The ordered billing dimension; null when the job row is archived."},"billing":{"anyOf":[{"$ref":"#/components/schemas/BillingEcho"},{"type":"null"}],"description":"The metered unit and why; null when the job row is archived."},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At","description":"When the assessment was stored, ISO-8601 timestamp."},"subject_ref":{"type":"string","title":"Subject Ref","description":"Opaque subject reference, `subj:<uuid>`."},"assessment":{"$ref":"#/components/schemas/AssessmentDocument","description":"The scored assessment document."},"evidence":{"items":{"$ref":"#/components/schemas/EvidenceItem"},"type":"array","title":"Evidence","description":"The cited evidence ledger."},"version":{"$ref":"#/components/schemas/VersionRecord","description":"engine / model_id / prompt_hash that produced it."},"usage":{"$ref":"#/components/schemas/UsageRecord","description":"Token usage and cost."},"sandbox":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sandbox","description":"Present (always true) ONLY on a sandbox document. Absent on live assessments."},"fixture_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fixture Id","description":"Present ONLY on a sandbox document: the synthetic fixture id."}},"type":"object","required":["job_id","assessment_id","status","dimension","billing","created_at","subject_ref","assessment","evidence","version","usage"],"title":"AssessmentResult","description":"The 200 body of getAssessmentResult and getAssessmentById (one shape).","examples":[{"assessment":{"coverage":{"records":{"coverage":0.0,"inputs_missing":["permit_history"],"inputs_present":[]}},"dimension_confidence":{"records":"low"},"investment_score":7,"livability_score":8,"overall_score":7,"price_vs_comps_score":7,"recommendation":"solid_pick","rental_potential_score":6},"assessment_id":"b41e7d90-3c2a-4f5e-8d71-6a9b0c1e2f45","billing":{"derived_unit":"standard_assessment","quantity":1,"reason":"billed"},"created_at":"2026-09-24T10:17:42.000000+00:00","dimension":"standard_assessment","evidence":[{"claim":"flood_zone","confidence":"high","observed_at":"2026-08-29T10:19:03Z","record":"NFHL 12099C0361F","source":"fema_nfhl","value":"X"}],"job_id":"7c2b9f3e-5d1a-4e8b-9c6f-2a4b8d0e1f37","status":"succeeded","subject_ref":"subj:0d9e8f7a-6b5c-4d3e-8f21-0a1b2c3d4e5f","usage":{"completion_tokens":100,"cost_usd":0.01,"lanes":{"description":{"completion_tokens":100,"cost_usd":0.01,"prompt_tokens":1000}},"prompt_tokens":1000},"version":{"engine":"engine-version","model_id":"model-id","prompt_hash":"sha256-of-prompt-set"}}]},"AssessmentStatus":{"properties":{"job_id":{"type":"string","title":"Job Id","description":"The job id (full UUID)."},"status":{"type":"string","enum":["queued","running","succeeded","failed","partial"],"title":"Status","description":"`queued`, `running`, or terminal `succeeded`, `failed`, `partial`. A Retry-After header is sent only while the status is not terminal."},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At","description":"When the job was created, ISO-8601 timestamp."},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At","description":"When the job reached a terminal status, ISO-8601 timestamp; null until then."},"lanes":{"items":{"$ref":"#/components/schemas/LaneState"},"type":"array","title":"Lanes","description":"Per-lane state map, one entry per lane."},"poll":{"type":"string","title":"Poll","description":"This status URL path."},"result":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result","description":"The result URL path once the status is `succeeded` or `partial`; null otherwise."},"dimension":{"anyOf":[{"type":"string","enum":["standard_assessment","deep_assessment_with_vision","sandbox_assessment"]},{"type":"null"}],"title":"Dimension","description":"The billing dimension the job was created with."},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Present ONLY when status is `failed`: the stable machine error code (never internal error text)."},"sandbox":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sandbox","description":"Present (always true) ONLY on a job created with a sandbox key (`pd_test_`). Absent on live jobs."},"fixture_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fixture Id","description":"Present ONLY on sandbox jobs: the synthetic fixture the sandbox answers with."}},"type":"object","required":["job_id","status","created_at","completed_at","lanes","poll","result","dimension"],"title":"AssessmentStatus","description":"The 200 body of getAssessmentStatus.","examples":[{"completed_at":"2026-09-24T10:17:42.000000+00:00","created_at":"2026-09-24T10:15:00.123456+00:00","dimension":"standard_assessment","job_id":"7c2b9f3e-5d1a-4e8b-9c6f-2a4b8d0e1f37","lanes":[{"lane":"description","state":"done"},{"lane":"neighborhood","state":"done"},{"lane":"financial","state":"done"},{"lane":"comparables","state":"done"},{"lane":"records","state":"done"},{"lane":"vision","state":"not_ordered"}],"poll":"/v1/assessments/7c2b9f3e-5d1a-4e8b-9c6f-2a4b8d0e1f37","result":"/v1/assessments/7c2b9f3e-5d1a-4e8b-9c6f-2a4b8d0e1f37/result","status":"succeeded"}]},"AssessmentSubjectIn":{"properties":{"StreetNumber":{"type":"string","title":"Streetnumber"},"StreetName":{"type":"string","title":"Streetname"},"City":{"type":"string","title":"City"},"StateOrProvince":{"type":"string","title":"Stateorprovince"},"PostalCode":{"type":"string","title":"Postalcode"},"ListPrice":{"type":"number","title":"Listprice"},"LivingArea":{"type":"number","title":"Livingarea"},"BedroomsTotal":{"type":"integer","title":"Bedroomstotal"},"BathroomsTotalInteger":{"type":"integer","title":"Bathroomstotalinteger"},"PublicRemarks":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Publicremarks"},"YearBuilt":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Yearbuilt"},"Latitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latitude"},"Longitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Longitude"},"ParcelNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parcelnumber"},"LotSizeSquareFeet":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lotsizesquarefeet"},"Stories":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Stories"},"GarageSpaces":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Garagespaces"},"AssociationFee":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Associationfee"},"PropertyType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Propertytype"},"BathroomsHalf":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bathroomshalf"},"UnparsedAddress":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unparsedaddress"},"Media":{"anyOf":[{"items":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"}]},"type":"array"},{"type":"null"}],"title":"Media"},"SchoolRatings":{"anyOf":[{"items":{"$ref":"#/components/schemas/SchoolRatingIn"},"type":"array"},{"type":"null"}],"title":"Schoolratings"},"BuyerCriteria":{"anyOf":[{"$ref":"#/components/schemas/BuyerCriteriaIn"},{"type":"null"}]},"PoolPrivateYN":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Poolprivateyn"},"Roof":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"string"},{"type":"null"}],"title":"Roof"},"ConstructionMaterials":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"string"},{"type":"null"}],"title":"Constructionmaterials"},"WindowFeatures":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"string"},{"type":"null"}],"title":"Windowfeatures"},"SubdivisionName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subdivisionname"},"StandardStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Standardstatus"},"ListingContractDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Listingcontractdate"},"DaysOnMarket":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Daysonmarket"},"OriginalListPrice":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Originallistprice"},"ClosePrice":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Closeprice"},"EstimatedValue":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Estimatedvalue"},"EstimatedValueSource":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Estimatedvaluesource"},"EstimatedRent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Estimatedrent"},"EstimatedRentSource":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Estimatedrentsource"}},"additionalProperties":true,"type":"object","required":["StreetNumber","StreetName","City","StateOrProvince","PostalCode","ListPrice","LivingArea","BedroomsTotal","BathroomsTotalInteger"],"title":"AssessmentSubjectIn","description":"One customer-supplied property, in RESO Data Dictionary 2.0 names.\n\n``extra=\"allow\"`` (D-02) collects everything not declared below into\n``model_extra``; the endpoint echoes those keys as ``ignored_fields``. The\nconfig carries that setting and nothing else (D-03): no alias generator, no\nby-name population fallback -- exact PascalCase names only."},"BillingEcho":{"properties":{"derived_unit":{"type":"string","title":"Derived Unit","description":"The billing dimension actually metered, e.g. `standard_assessment` (a deep order whose vision lane degraded is metered as standard)."},"quantity":{"type":"integer","title":"Quantity","description":"Units metered for this job: 1, or 0 when nothing is billed."},"reason":{"type":"string","title":"Reason","description":"Why: `billed`, `vision_degraded_downgrade`, `all_lanes_degraded`, `job_failed` or `dimension_not_meterable`."}},"type":"object","required":["derived_unit","quantity","reason"],"title":"BillingEcho","description":"Which billable unit the job was metered as, and why. Recomputed from\nthe same function the meter uses, so it cannot disagree with the bill."},"BuyerCriteriaIn":{"properties":{"Weights":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Weights"},"BudgetCap":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Budgetcap"},"AlertThreshold":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Alertthreshold"},"PropertyTypes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Propertytypes"}},"additionalProperties":true,"type":"object","title":"BuyerCriteriaIn","description":"What this buyer is optimizing for, supplied with the subject.\n\nOn the commercial branch these ARE the personalization: the orchestrator\nweights the shared system prompt with them and performs no personal-profile\nread at all (there is no personal user behind a tenant's submission, and\nreading the operator's own household profile would weight one tenant's\njudgment by another household's preferences).\n\nThe weight rules are IMPORTED from ``profile.py`` rather than restated here\n(D-F): the eight criterion keys and the inclusive bound are the personal\nfit-scorer's contract, and a second copy in this module is a rule that can\ndrift from the one it claims to mirror. The import is DEFERRED into the\nvalidator body because this module holds itself to the ``context.py`` leaf\nrule at import time -- ``profile`` pulls in ``database``.\n\nUnlike ``profile.validate_profile_fields``, a PARTIAL weight map is legal:\nthat validator merges onto an active row and therefore demands all eight\nkeys, while a commercial payload is optional-by-construction and absence\nnarrows rather than errors.\n\n``extra=\"allow\"`` for the D-H reason spelled out on\n:class:`SchoolRatingIn`."},"CoverageEntry":{"properties":{"coverage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Coverage","description":"Fraction of the lane's declared inputs present, 0.0 to 1.0."},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State","description":"Present only on a lane that did not run: `not_ordered` or `failed`."},"inputs_present":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Inputs Present","description":"Declared inputs that were present."},"inputs_missing":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Inputs Missing","description":"Declared inputs that were missing."}},"additionalProperties":true,"type":"object","title":"CoverageEntry","description":"One lane's input coverage. Extra keys may follow the shipped ones."},"EvidenceItem":{"properties":{"claim":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Claim","description":"What the row evidences."},"value":{"title":"Value","description":"The evidenced value, usually a string."},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Source type label."},"record":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Record","description":"Source record reference (e.g. a map panel id)."},"confidence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confidence","description":"Confidence in the row: high, medium or low."},"observed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Observed At","description":"When the value was observed, ISO-8601 timestamp; may be null."}},"type":"object","required":["claim","value","source","record","confidence","observed_at"],"title":"EvidenceItem","description":"One cited evidence row. Exactly these six keys, nothing else."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"LaneState":{"properties":{"lane":{"type":"string","title":"Lane","description":"Lane name. The six engine lanes (description, neighborhood, financial, comparables, records, vision) are always listed first, in that order; any further lane the worker stored follows them."},"state":{"type":"string","enum":["pending","running","done","degraded","not_ordered","failed"],"title":"State","description":"`pending` (not started), `running`, `done`, `degraded` (ordered, produced no coverage), `not_ordered` (not part of the ordered dimension), `failed` (ordered, and the lane stopped on a server-side error)."}},"type":"object","required":["lane","state"],"title":"LaneState","description":"One analysis lane's state. No percentage and no ETA is ever reported."},"SchoolRatingIn":{"properties":{"SchoolName":{"type":"string","title":"Schoolname"},"Level":{"type":"string","title":"Level"},"Rating":{"type":"number","title":"Rating"},"RatingScale":{"type":"string","title":"Ratingscale"},"Source":{"type":"string","title":"Source"},"SourceURL":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourceurl"}},"additionalProperties":true,"type":"object","required":["SchoolName","Level","Rating","RatingScale","Source"],"title":"SchoolRatingIn","description":"One customer-supplied school rating for the subject. DISPLAY-ONLY.\n\nFAIR HOUSING (non-negotiable). Nothing in this block is ever handed to a\nspecialist, advocate or judge prompt, it never enters the evidence ledger,\nand it never touches the composite score. School quality correlates with\nprotected characteristics, so a rating folded into a score is a score that\nencodes them; the only lawful use is to DISPLAY the customer's own number\nwith the customer's own attribution. That is why ``Source`` is required\nwithin a supplied item -- an unattributed rating cannot be displayed with\nattribution, and so cannot be displayed at all.\n\nThe rule is enforced by a committed regression test\n(``tests/test_commercial_end_to_end.py``), which asserts that neither a\nschool name nor a rating value from here occurs in ANY model-visible string\nof a run, and that the delivered document DOES carry the block with its\n``Source`` verbatim.\n\n``extra=\"allow\"`` (D-H): ``AssessmentSubjectIn`` is ``extra=\"allow\"`` per\nD-02 so that the WHOLE submission is stored as evidence. A nested model\ndefaulting to ``extra=\"ignore\"`` would silently drop a caller's unknown\nsub-keys out of ``model_dump()`` and therefore out of the stored JSONB,\nweakening exactly that guarantee. ``ignored_fields`` remains a TOP-LEVEL\n``model_extra`` echo and is deliberately not widened to nested keys."},"UsageRecord":{"properties":{"lanes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Lanes","description":"Per-lane usage keyed by lane name: prompt_tokens, completion_tokens, cost_usd, model_id."},"prompt_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Prompt Tokens","description":"Total prompt tokens."},"completion_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Completion Tokens","description":"Total completion tokens."},"cost_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Usd","description":"Total cost in USD."}},"type":"object","required":["lanes","prompt_tokens","completion_tokens","cost_usd"],"title":"UsageRecord","description":"Token usage and cost, per lane and in total."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VersionRecord":{"properties":{"engine":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Engine","description":"Engine version string."},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id","description":"Model identifier(s) used."},"prompt_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt Hash","description":"sha256 over the full prompt set."}},"type":"object","required":["engine","model_id","prompt_hash"],"title":"VersionRecord","description":"The composite version record that produced the assessment."}}}}