A Vastu score is the output of a rule set, and rule sets get reviewed and corrected. A score with no record of the rules behind it cannot be reproduced later. The Vastu API now lets a caller pin the rules, compare two versions of them, and keep a signed receipt of what was issued.
Pin a rule snapshot
GET /v2/vastu/rules/versions lists the current immutable rules ID and the retained versions (three, one of them deprecated). Send rulesVersion on an assessment to select a retained snapshot. The earlier snapshots keep the placement judgments as they stood before the latest correction. The oldest, vastu-rules-2026-09-23, is deprecated: it stays accepted until 2027-01-31, and a response that applied it carries Deprecation, Sunset and Link headers. A historical snapshot rejects room types it never contained, instead of grading them with a newer rule. Unknown versions and malformed requests fail before billing.1
Source classifications keep their meaning across snapshots. Classical placement prescriptions, tradition and convention, and computed scoring are labelled separately.
Compare two snapshots
POST /v2/vastu/plan/compare-versions computes the same input under two retained snapshots. It returns both assessments, the findings that changed, and a reason for every changed rule. Identical versions return changed: false and no changes. Nothing is stored and the original property is not modified.
{
"fromVersion": "<earlier snapshot id>",
"toVersion": "<current snapshot id>",
"operation": "plan/analyze",
"input": {
"rooms": [
{"name": "living", "zone": "CENTER"},
{"name": "dining", "zone": "SE"}
]
}
}
Keep a signed receipt
Add receipt: true to an assessment request and the response includes a compact Ed25519-signed token.2 Its payload holds an assessment ID, a SHA-256 of the canonical input, a SHA-256 of the result, the rules ID, the score, the grade, the source labels and an issue time. It does not contain the plan or the room list. If the signing key is unavailable the request returns HTTP 503 with RECEIPT_SIGNING_UNAVAILABLE and is not charged.
Verify it, with or without the input
The public keys are published at /.well-known/vastu-receipt-keys.json as a standard key set with public material only.3 POST /v2/vastu/receipt/verify takes the token and, optionally, the original input. It needs an API key and costs nothing. If you supply the input, its hash and any rule pin must match the receipt. A modified token, an unknown key, a malformed token or a mismatched input returns HTTP 400.
Hashes sort JSON object keys recursively, keep array order and use compact UTF-8. The input digest leaves out only receipt, rulesVersion, requestId and idempotencyKey; the rule pin travels separately inside the signed payload. Keep the exact input next to its receipt.