{"openapi":"3.1.0","info":{"title":"TaxKit API","version":"0.0.1","description":"HTTP API for TaxKit health checks, public calculator metadata, calculator execution and accepted public documentation."},"paths":{"/api/health":{"get":{"tags":["Health"],"operationId":"health.getHealth","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"service":{"type":"string","enum":["taxkit"]},"status":{"type":"string","enum":["ok"]}},"required":["service","status"],"additionalProperties":false}}}}},"description":"Return API health."}},"/api/v1/jurisdictions":{"get":{"tags":["Calculator API"],"operationId":"calculatorApi.getJurisdictions","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"jurisdictions":{"type":"array","items":{"type":"object","properties":{"code":{"anyOf":[{"anyOf":[{"type":"string","enum":["AU"]}]},{"anyOf":[{"type":"string","enum":["AU"]}]}]},"title":{"type":"string"}},"required":["code","title"],"additionalProperties":false}}},"required":["jurisdictions"],"additionalProperties":false}}}},"504":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/CalculatorOperationTimedOutEncoded"}},"required":["error"],"additionalProperties":false}}}}},"description":"List supported public API jurisdictions."}},"/api/v1/tax-years":{"get":{"tags":["Calculator API"],"operationId":"calculatorApi.getTaxYears","parameters":[{"name":"jurisdiction","in":"query","schema":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string","enum":["AU"]}]},{"anyOf":[{"type":"string","enum":["AU"]}]}]},{"type":"null"}]},"required":false},{"name":"taxYear","in":"query","schema":{"anyOf":[{"anyOf":[{"type":"string","enum":["2025-26"]},{"type":"string","enum":["2025-26"]}]},{"type":"null"}]},"required":false}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"taxYears":{"type":"array","items":{"type":"object","properties":{"jurisdiction":{"anyOf":[{"anyOf":[{"type":"string","enum":["AU"]}]},{"anyOf":[{"type":"string","enum":["AU"]}]}]},"taxYear":{"anyOf":[{"type":"string","enum":["2025-26"]},{"type":"string","enum":["2025-26"]}]}},"required":["jurisdiction","taxYear"],"additionalProperties":false}}},"required":["taxYears"],"additionalProperties":false}}}},"504":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/CalculatorOperationTimedOutEncoded"}},"required":["error"],"additionalProperties":false}}}}},"description":"List supported tax years for a jurisdiction."}},"/api/v1/calculators":{"get":{"tags":["Calculator API"],"operationId":"calculatorApi.listCalculators","parameters":[{"name":"jurisdiction","in":"query","schema":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string","enum":["AU"]}]},{"anyOf":[{"type":"string","enum":["AU"]}]}]},{"type":"null"}]},"required":false},{"name":"taxYear","in":"query","schema":{"anyOf":[{"anyOf":[{"type":"string","enum":["2025-26"]},{"type":"string","enum":["2025-26"]}]},{"type":"null"}]},"required":false}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"calculators":{"type":"array","items":{"type":"object","properties":{"calculatorId":{"anyOf":[{"type":"string","enum":["au.pay.take-home","au.pay.withholdings"]},{"anyOf":[{"type":"string","enum":["au.income-tax.annual"]}]}]},"context":{"type":"object","properties":{"jurisdiction":{"anyOf":[{"anyOf":[{"type":"string","enum":["AU"]}]},{"anyOf":[{"type":"string","enum":["AU"]}]}]},"taxYear":{"anyOf":[{"type":"string","enum":["2025-26"]},{"type":"string","enum":["2025-26"]}]}},"required":["jurisdiction","taxYear"],"additionalProperties":false},"description":{"type":"string"},"inputFactIds":{"type":"array","items":{"type":"string"}},"outputFactIds":{"type":"array","items":{"type":"string"}},"reportSchemaName":{"type":"string"},"ruleIds":{"type":"array","items":{"type":"string"}},"supportedHelpModes":{"type":"array","items":{"type":"string","enum":["none","errors","schema","examples","sources","full"]}},"title":{"type":"string"}},"required":["calculatorId","context","description","inputFactIds","outputFactIds","reportSchemaName","ruleIds","supportedHelpModes","title"],"additionalProperties":false}}},"required":["calculators"],"additionalProperties":false}}}},"504":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/CalculatorOperationTimedOutEncoded"}},"required":["error"],"additionalProperties":false}}}}},"description":"List public calculator catalog entries."}},"/api/v1/calculators/{calculatorId}":{"get":{"tags":["Calculator API"],"operationId":"calculatorApi.getCalculator","parameters":[{"name":"calculatorId","in":"path","schema":{"anyOf":[{"type":"string","enum":["au.pay.take-home","au.pay.withholdings"]},{"anyOf":[{"type":"string","enum":["au.income-tax.annual"]}]}]},"required":true},{"name":"help","in":"query","schema":{"anyOf":[{"type":"string","enum":["none","errors","schema","examples","sources","full"]},{"type":"null"}]},"required":false},{"name":"jurisdiction","in":"query","schema":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string","enum":["AU"]}]},{"anyOf":[{"type":"string","enum":["AU"]}]}]},{"type":"null"}]},"required":false},{"name":"taxYear","in":"query","schema":{"anyOf":[{"anyOf":[{"type":"string","enum":["2025-26"]},{"type":"string","enum":["2025-26"]}]},{"type":"null"}]},"required":false}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"calculatorId":{"anyOf":[{"type":"string","enum":["au.pay.take-home","au.pay.withholdings"]},{"anyOf":[{"type":"string","enum":["au.income-tax.annual"]}]}]},"context":{"type":"object","properties":{"jurisdiction":{"anyOf":[{"anyOf":[{"type":"string","enum":["AU"]}]},{"anyOf":[{"type":"string","enum":["AU"]}]}]},"taxYear":{"anyOf":[{"type":"string","enum":["2025-26"]},{"type":"string","enum":["2025-26"]}]}},"required":["jurisdiction","taxYear"],"additionalProperties":false},"description":{"type":"string"},"inputFactIds":{"type":"array","items":{"type":"string"}},"outputFactIds":{"type":"array","items":{"type":"string"}},"reportSchemaName":{"type":"string"},"ruleIds":{"type":"array","items":{"type":"string"}},"supportedHelpModes":{"type":"array","items":{"type":"string","enum":["none","errors","schema","examples","sources","full"]}},"title":{"type":"string"}},"required":["calculatorId","context","description","inputFactIds","outputFactIds","reportSchemaName","ruleIds","supportedHelpModes","title"],"additionalProperties":false}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"anyOf":[{"$ref":"#/components/schemas/CalculationErrorEncoded"},{"$ref":"#/components/schemas/CalculatorInputDecodeErrorEncoded"},{"$ref":"#/components/schemas/UnsupportedCalculatorErrorEncoded"},{"$ref":"#/components/schemas/UnsupportedCalculatorContextErrorEncoded"}]}},"required":["error"],"additionalProperties":false}}}},"504":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/CalculatorOperationTimedOutEncoded"}},"required":["error"],"additionalProperties":false}}}}},"description":"Return one public calculator catalog entry."}},"/api/v1/calculators/{calculatorId}/schema":{"get":{"tags":["Calculator API"],"operationId":"calculatorApi.getCalculatorSchema","parameters":[{"name":"calculatorId","in":"path","schema":{"anyOf":[{"type":"string","enum":["au.pay.take-home","au.pay.withholdings"]},{"anyOf":[{"type":"string","enum":["au.income-tax.annual"]}]}]},"required":true},{"name":"help","in":"query","schema":{"anyOf":[{"type":"string","enum":["none","errors","schema","examples","sources","full"]},{"type":"null"}]},"required":false},{"name":"jurisdiction","in":"query","schema":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string","enum":["AU"]}]},{"anyOf":[{"type":"string","enum":["AU"]}]}]},{"type":"null"}]},"required":false},{"name":"taxYear","in":"query","schema":{"anyOf":[{"anyOf":[{"type":"string","enum":["2025-26"]},{"type":"string","enum":["2025-26"]}]},{"type":"null"}]},"required":false}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"calculator":{"type":"object","properties":{"calculatorId":{"anyOf":[{"type":"string","enum":["au.pay.take-home","au.pay.withholdings"]},{"anyOf":[{"type":"string","enum":["au.income-tax.annual"]}]}]},"context":{"type":"object","properties":{"jurisdiction":{"anyOf":[{"anyOf":[{"type":"string","enum":["AU"]}]},{"anyOf":[{"type":"string","enum":["AU"]}]}]},"taxYear":{"anyOf":[{"type":"string","enum":["2025-26"]},{"type":"string","enum":["2025-26"]}]}},"required":["jurisdiction","taxYear"],"additionalProperties":false},"description":{"type":"string"},"inputFactIds":{"type":"array","items":{"type":"string"}},"outputFactIds":{"type":"array","items":{"type":"string"}},"reportSchemaName":{"type":"string"},"ruleIds":{"type":"array","items":{"type":"string"}},"supportedHelpModes":{"type":"array","items":{"type":"string","enum":["none","errors","schema","examples","sources","full"]}},"title":{"type":"string"}},"required":["calculatorId","context","description","inputFactIds","outputFactIds","reportSchemaName","ruleIds","supportedHelpModes","title"],"additionalProperties":false},"inputFacts":{"type":"array","items":{"type":"object","properties":{"authority":{"type":"string","enum":["input","derived","parameter"]},"id":{"type":"string"},"question":{"anyOf":[{"$ref":"#/components/schemas/FactQuestionEncoded"},{"type":"null"}]},"schemaTag":{"type":"string"},"title":{"type":"string"}},"required":["authority","id","schemaTag","title"],"additionalProperties":false}},"outputFacts":{"type":"array","items":{"type":"object","properties":{"authority":{"type":"string","enum":["input","derived","parameter"]},"id":{"type":"string"},"question":{"anyOf":[{"$ref":"#/components/schemas/FactQuestionEncoded"},{"type":"null"}]},"schemaTag":{"type":"string"},"title":{"type":"string"}},"required":["authority","id","schemaTag","title"],"additionalProperties":false}},"reportSchemaName":{"type":"string"},"rules":{"type":"array","items":{"type":"object","properties":{"allowDuplicateProvides":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"id":{"type":"string"},"parameters":{"type":"array","items":{"type":"object","properties":{"effectivePeriod":{"type":"object","properties":{"from":{"type":"string"},"toExclusive":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["from"],"additionalProperties":false},"id":{"type":"string"},"source":{"type":"object","properties":{"_tag":{"type":"string","enum":["SourceRef"]},"kind":{"type":"string","enum":["ato-publication","legislation","regulation","internal-validation"]},"reference":{"type":"string"},"title":{"type":"string"}},"required":["_tag","kind","reference","title"],"additionalProperties":false},"title":{"type":"string"}},"required":["effectivePeriod","id","source","title"],"additionalProperties":false}},"provides":{"type":"array","items":{"type":"string"}},"requires":{"type":"array","items":{"type":"string"}},"sourcePolicy":{"type":"string","enum":["not-required","required"]},"sources":{"type":"array","items":{"type":"object","properties":{"_tag":{"type":"string","enum":["SourceRef"]},"kind":{"type":"string","enum":["ato-publication","legislation","regulation","internal-validation"]},"reference":{"type":"string"},"title":{"type":"string"}},"required":["_tag","kind","reference","title"],"additionalProperties":false}},"title":{"type":"string"}},"required":["id","parameters","provides","requires","sourcePolicy","sources","title"],"additionalProperties":false}}},"required":["calculator","inputFacts","outputFacts","reportSchemaName","rules"],"additionalProperties":false}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"anyOf":[{"$ref":"#/components/schemas/CalculationErrorEncoded"},{"$ref":"#/components/schemas/CalculatorInputDecodeErrorEncoded"},{"$ref":"#/components/schemas/UnsupportedCalculatorErrorEncoded"},{"$ref":"#/components/schemas/UnsupportedCalculatorContextErrorEncoded"}]}},"required":["error"],"additionalProperties":false}}}},"504":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/CalculatorOperationTimedOutEncoded"}},"required":["error"],"additionalProperties":false}}}}},"description":"Return fact, rule and report schema metadata for one calculator."}},"/api/v1/calculators/{calculatorId}/graph":{"get":{"tags":["Calculator API"],"operationId":"calculatorApi.getCalculatorGraph","parameters":[{"name":"calculatorId","in":"path","schema":{"anyOf":[{"type":"string","enum":["au.pay.take-home","au.pay.withholdings"]},{"anyOf":[{"type":"string","enum":["au.income-tax.annual"]}]}]},"required":true},{"name":"jurisdiction","in":"query","schema":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string","enum":["AU"]}]},{"anyOf":[{"type":"string","enum":["AU"]}]}]},{"type":"null"}]},"required":false},{"name":"taxYear","in":"query","schema":{"anyOf":[{"anyOf":[{"type":"string","enum":["2025-26"]},{"type":"string","enum":["2025-26"]}]},{"type":"null"}]},"required":false}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"calculator":{"type":"object","properties":{"calculatorId":{"anyOf":[{"type":"string","enum":["au.pay.take-home","au.pay.withholdings"]},{"anyOf":[{"type":"string","enum":["au.income-tax.annual"]}]}]},"context":{"type":"object","properties":{"jurisdiction":{"anyOf":[{"anyOf":[{"type":"string","enum":["AU"]}]},{"anyOf":[{"type":"string","enum":["AU"]}]}]},"taxYear":{"anyOf":[{"type":"string","enum":["2025-26"]},{"type":"string","enum":["2025-26"]}]}},"required":["jurisdiction","taxYear"],"additionalProperties":false},"description":{"type":"string"},"inputFactIds":{"type":"array","items":{"type":"string"}},"outputFactIds":{"type":"array","items":{"type":"string"}},"reportSchemaName":{"type":"string"},"ruleIds":{"type":"array","items":{"type":"string"}},"supportedHelpModes":{"type":"array","items":{"type":"string","enum":["none","errors","schema","examples","sources","full"]}},"title":{"type":"string"}},"required":["calculatorId","context","description","inputFactIds","outputFactIds","reportSchemaName","ruleIds","supportedHelpModes","title"],"additionalProperties":false},"edges":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"ruleId":{"type":"string"},"to":{"type":"string"}},"required":["from","ruleId","to"],"additionalProperties":false}},"facts":{"type":"array","items":{"type":"object","properties":{"authority":{"type":"string","enum":["input","derived","parameter"]},"id":{"type":"string"},"question":{"anyOf":[{"$ref":"#/components/schemas/FactQuestionEncoded"},{"type":"null"}]},"schemaTag":{"type":"string"},"title":{"type":"string"}},"required":["authority","id","schemaTag","title"],"additionalProperties":false}},"rules":{"type":"array","items":{"type":"object","properties":{"allowDuplicateProvides":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"id":{"type":"string"},"parameters":{"type":"array","items":{"type":"object","properties":{"effectivePeriod":{"type":"object","properties":{"from":{"type":"string"},"toExclusive":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["from"],"additionalProperties":false},"id":{"type":"string"},"source":{"type":"object","properties":{"_tag":{"type":"string","enum":["SourceRef"]},"kind":{"type":"string","enum":["ato-publication","legislation","regulation","internal-validation"]},"reference":{"type":"string"},"title":{"type":"string"}},"required":["_tag","kind","reference","title"],"additionalProperties":false},"title":{"type":"string"}},"required":["effectivePeriod","id","source","title"],"additionalProperties":false}},"provides":{"type":"array","items":{"type":"string"}},"requires":{"type":"array","items":{"type":"string"}},"sourcePolicy":{"type":"string","enum":["not-required","required"]},"sources":{"type":"array","items":{"type":"object","properties":{"_tag":{"type":"string","enum":["SourceRef"]},"kind":{"type":"string","enum":["ato-publication","legislation","regulation","internal-validation"]},"reference":{"type":"string"},"title":{"type":"string"}},"required":["_tag","kind","reference","title"],"additionalProperties":false}},"title":{"type":"string"}},"required":["id","parameters","provides","requires","sourcePolicy","sources","title"],"additionalProperties":false}},"validationIssues":{"type":"array","items":{"$ref":"#/components/schemas/GraphValidationIssueEncoded"}}},"required":["calculator","edges","facts","rules","validationIssues"],"additionalProperties":false}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"anyOf":[{"$ref":"#/components/schemas/CalculationErrorEncoded"},{"$ref":"#/components/schemas/CalculatorInputDecodeErrorEncoded"},{"$ref":"#/components/schemas/UnsupportedCalculatorErrorEncoded"},{"$ref":"#/components/schemas/UnsupportedCalculatorContextErrorEncoded"}]}},"required":["error"],"additionalProperties":false}}}},"504":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/CalculatorOperationTimedOutEncoded"}},"required":["error"],"additionalProperties":false}}}}},"description":"Return graph edges and canonical graph validation diagnostics for one calculator."}},"/api/v1/calculators/{calculatorId}/calculate":{"post":{"tags":["Calculator API"],"operationId":"calculatorApi.calculate","parameters":[{"name":"calculatorId","in":"path","schema":{"anyOf":[{"type":"string","enum":["au.pay.take-home","au.pay.withholdings"]},{"anyOf":[{"type":"string","enum":["au.income-tax.annual"]}]}]},"required":true},{"name":"help","in":"query","schema":{"anyOf":[{"type":"string","enum":["none","errors","schema","examples","sources","full"]},{"type":"null"}]},"required":false}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"calculator":{"type":"object","properties":{"calculatorId":{"anyOf":[{"type":"string","enum":["au.pay.take-home","au.pay.withholdings"]},{"anyOf":[{"type":"string","enum":["au.income-tax.annual"]}]}]},"context":{"type":"object","properties":{"jurisdiction":{"anyOf":[{"anyOf":[{"type":"string","enum":["AU"]}]},{"anyOf":[{"type":"string","enum":["AU"]}]}]},"taxYear":{"anyOf":[{"type":"string","enum":["2025-26"]},{"type":"string","enum":["2025-26"]}]}},"required":["jurisdiction","taxYear"],"additionalProperties":false},"description":{"type":"string"},"inputFactIds":{"type":"array","items":{"type":"string"}},"outputFactIds":{"type":"array","items":{"type":"string"}},"reportSchemaName":{"type":"string"},"ruleIds":{"type":"array","items":{"type":"string"}},"supportedHelpModes":{"type":"array","items":{"type":"string","enum":["none","errors","schema","examples","sources","full"]}},"title":{"type":"string"}},"required":["calculatorId","context","description","inputFactIds","outputFactIds","reportSchemaName","ruleIds","supportedHelpModes","title"],"additionalProperties":false},"diagnostics":{"$ref":"#/components/schemas/CalculationDiagnosticsEncoded"},"report":{"anyOf":[{"$ref":"#/components/schemas/TakeHomePayReportEncoded"},{"$ref":"#/components/schemas/PayWithholdingsLedgerEncoded"},{"$ref":"#/components/schemas/AnnualTaxReportEncoded"}]}},"required":["calculator","diagnostics","report"],"additionalProperties":false}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"anyOf":[{"$ref":"#/components/schemas/CalculationErrorEncoded"},{"$ref":"#/components/schemas/CalculatorInputDecodeErrorEncoded"},{"$ref":"#/components/schemas/UnsupportedCalculatorErrorEncoded"},{"$ref":"#/components/schemas/UnsupportedCalculatorContextErrorEncoded"}]}},"required":["error"],"additionalProperties":false}}}},"408":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/CalculatorRequestBodyTimedOutEncoded"}},"required":["error"],"additionalProperties":false}}}},"413":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/CalculatorRequestBodyTooLargeEncoded"}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/CalculatorRateLimitedEncoded"}},"required":["error"],"additionalProperties":false}}},"headers":{"retry-after":{"schema":{"type":"string","enum":["60"]},"required":true}}},"503":{"description":"Error","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"error":{"$ref":"#/components/schemas/CalculatorAdmissionUnavailableEncoded"}},"required":["error"],"additionalProperties":false},{"type":"object","properties":{"error":{"$ref":"#/components/schemas/CalculatorCapacityExceededEncoded"}},"required":["error"],"additionalProperties":false}]}}}},"504":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/CalculatorOperationTimedOutEncoded"}},"required":["error"],"additionalProperties":false}}}}},"description":"Run one public calculator using canonical scenario decoding and rule-pack layers.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"facts":{"anyOf":[{"type":"object","properties":{"grossPay":{"$ref":"#/components/schemas/GrossPayEncoded"},"taxFreeThresholdClaimed":{"type":"boolean"}},"required":["grossPay","taxFreeThresholdClaimed"],"additionalProperties":false},{"type":"object","properties":{"taxableIncome":{"$ref":"#/components/schemas/MoneyEncoded"}},"required":["taxableIncome"],"additionalProperties":false}]},"jurisdiction":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string","enum":["AU"]}]},{"anyOf":[{"type":"string","enum":["AU"]}]}]},{"type":"null"}]},"taxYear":{"anyOf":[{"anyOf":[{"type":"string","enum":["2025-26"]},{"type":"string","enum":["2025-26"]}]},{"type":"null"}]}},"required":["facts"],"additionalProperties":false}}},"required":true}}},"/api/v1/facts":{"get":{"tags":["Calculator API"],"operationId":"calculatorApi.listFacts","parameters":[{"name":"calculator","in":"query","schema":{"anyOf":[{"anyOf":[{"type":"string","enum":["au.pay.take-home","au.pay.withholdings"]},{"anyOf":[{"type":"string","enum":["au.income-tax.annual"]}]}]},{"type":"null"}]},"required":false},{"name":"jurisdiction","in":"query","schema":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string","enum":["AU"]}]},{"anyOf":[{"type":"string","enum":["AU"]}]}]},{"type":"null"}]},"required":false},{"name":"taxYear","in":"query","schema":{"anyOf":[{"anyOf":[{"type":"string","enum":["2025-26"]},{"type":"string","enum":["2025-26"]}]},{"type":"null"}]},"required":false}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"facts":{"type":"array","items":{"type":"object","properties":{"authority":{"type":"string","enum":["input","derived","parameter"]},"id":{"type":"string"},"question":{"anyOf":[{"$ref":"#/components/schemas/FactQuestionEncoded"},{"type":"null"}]},"schemaTag":{"type":"string"},"title":{"type":"string"}},"required":["authority","id","schemaTag","title"],"additionalProperties":false}}},"required":["facts"],"additionalProperties":false}}}},"504":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/CalculatorOperationTimedOutEncoded"}},"required":["error"],"additionalProperties":false}}}}},"description":"List canonical fact descriptors, optionally filtered by calculator context."}},"/api/v1/rules":{"get":{"tags":["Calculator API"],"operationId":"calculatorApi.listRules","parameters":[{"name":"calculator","in":"query","schema":{"anyOf":[{"anyOf":[{"type":"string","enum":["au.pay.take-home","au.pay.withholdings"]},{"anyOf":[{"type":"string","enum":["au.income-tax.annual"]}]}]},{"type":"null"}]},"required":false},{"name":"jurisdiction","in":"query","schema":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string","enum":["AU"]}]},{"anyOf":[{"type":"string","enum":["AU"]}]}]},{"type":"null"}]},"required":false},{"name":"taxYear","in":"query","schema":{"anyOf":[{"anyOf":[{"type":"string","enum":["2025-26"]},{"type":"string","enum":["2025-26"]}]},{"type":"null"}]},"required":false}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"rules":{"type":"array","items":{"type":"object","properties":{"allowDuplicateProvides":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"id":{"type":"string"},"parameters":{"type":"array","items":{"type":"object","properties":{"effectivePeriod":{"type":"object","properties":{"from":{"type":"string"},"toExclusive":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["from"],"additionalProperties":false},"id":{"type":"string"},"source":{"type":"object","properties":{"_tag":{"type":"string","enum":["SourceRef"]},"kind":{"type":"string","enum":["ato-publication","legislation","regulation","internal-validation"]},"reference":{"type":"string"},"title":{"type":"string"}},"required":["_tag","kind","reference","title"],"additionalProperties":false},"title":{"type":"string"}},"required":["effectivePeriod","id","source","title"],"additionalProperties":false}},"provides":{"type":"array","items":{"type":"string"}},"requires":{"type":"array","items":{"type":"string"}},"sourcePolicy":{"type":"string","enum":["not-required","required"]},"sources":{"type":"array","items":{"type":"object","properties":{"_tag":{"type":"string","enum":["SourceRef"]},"kind":{"type":"string","enum":["ato-publication","legislation","regulation","internal-validation"]},"reference":{"type":"string"},"title":{"type":"string"}},"required":["_tag","kind","reference","title"],"additionalProperties":false}},"title":{"type":"string"}},"required":["id","parameters","provides","requires","sourcePolicy","sources","title"],"additionalProperties":false}}},"required":["rules"],"additionalProperties":false}}}},"504":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/CalculatorOperationTimedOutEncoded"}},"required":["error"],"additionalProperties":false}}}}},"description":"List canonical rule descriptors, optionally filtered by calculator context."}},"/api/v1/docs/navigation":{"get":{"tags":["Public documentation"],"operationId":"content.getNavigation","parameters":[],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"primaryNavigation":{"type":"array","items":{"type":"object","properties":{"pageType":{"type":"string","enum":["api reference overview","changelog or release note","concept","contribution guide","decision page","guide","quickstart","reference","section index","troubleshooting"]},"path":{"type":"string","pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","minLength":1},"primaryReader":{"type":"string","enum":["API consumer","Application integrator","Correctness reviewer","Documentation contributor","New contributor","SDK evaluator","Type-safety focused developer"]},"source":{"type":"string","pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","minLength":1},"title":{"type":"string","pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","minLength":1},"pages":{"type":"array","items":{"type":"object","properties":{"pageType":{"type":"string","enum":["api reference overview","changelog or release note","concept","contribution guide","decision page","guide","quickstart","reference","section index","troubleshooting"]},"path":{"type":"string","pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","minLength":1},"primaryReader":{"type":"string","enum":["API consumer","Application integrator","Correctness reviewer","Documentation contributor","New contributor","SDK evaluator","Type-safety focused developer"]},"source":{"type":"string","pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","minLength":1},"title":{"type":"string","pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","minLength":1}},"required":["pageType","path","primaryReader","source","title"],"additionalProperties":false}}},"required":["pageType","path","primaryReader","source","title","pages"],"additionalProperties":false}}},"required":["primaryNavigation"],"additionalProperties":false}}}}},"description":"Read navigation for accepted public documentation."}},"/api/v1/docs/page":{"get":{"tags":["Public documentation"],"operationId":"content.getPage","parameters":[{"name":"path","in":"query","schema":{"type":"string","pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","minLength":1,"maxLength":256,"allOf":[{"pattern":"^\\/[a-z0-9-]+(?:\\/[a-z0-9-]+)*$"}]},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"frontmatter":{"type":"object","properties":{"description":{"type":"string","pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","minLength":1},"status":{"type":"string","enum":["published"]},"title":{"type":"string","pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","minLength":1}},"required":["description","status","title"],"additionalProperties":false},"markdown":{"type":"string"},"path":{"type":"string","pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","minLength":1,"maxLength":256,"allOf":[{"pattern":"^\\/[a-z0-9-]+(?:\\/[a-z0-9-]+)*$"}]},"slugs":{"type":"array","items":{"type":"string","pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","minLength":1}},"source":{"type":"string","pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","minLength":1}},"required":["frontmatter","markdown","path","slugs","source"],"additionalProperties":false}}}},"404":{"description":"DocsPageUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsPageUnavailableEncoded"}}}}},"description":"Read one accepted public documentation page."}},"/api/v1/docs/search":{"get":{"tags":["Public documentation"],"operationId":"content.searchPages","parameters":[{"name":"term","in":"query","schema":{"type":"string","pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","minLength":1,"maxLength":100},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","minLength":1},"excerpt":{"type":"string","maxLength":240},"path":{"type":"string","pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","minLength":1},"title":{"type":"string","pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","minLength":1}},"required":["description","excerpt","path","title"],"additionalProperties":false}}}}},"503":{"description":"DocsSearchUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsSearchUnavailableEncoded"}}}}},"description":"Search accepted public documentation; at most 20 results with 240-character excerpts."}},"/api/v1/docs/markdown":{"get":{"tags":["Public documentation"],"operationId":"content.getMarkdown","parameters":[{"name":"path","in":"query","schema":{"type":"string","pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","minLength":1,"maxLength":256,"allOf":[{"pattern":"^\\/[a-z0-9-]+(?:\\/[a-z0-9-]+)*$"}]},"required":true}],"security":[],"responses":{"200":{"description":"Success","content":{"text/markdown":{"schema":{"type":"string"}}}},"404":{"description":"DocsPageUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocsPageUnavailableEncoded"}}}}},"description":"Read processed public Markdown, with resolved links and without executable MDX. This route does not return personal calculation reports."}}},"components":{"schemas":{"DocsPageUnavailableEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["DocsPageUnavailable"]},"message":{"type":"string","enum":["The documentation page was not found."]}},"required":["_tag","message"],"additionalProperties":false},"DocsSearchUnavailableEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["DocsSearchUnavailable"]},"message":{"type":"string","enum":["Documentation search is temporarily unavailable."]}},"required":["_tag","message"],"additionalProperties":false},"CalculatorOperationTimedOutEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["CalculatorOperationTimedOut"]},"code":{"type":"string","enum":["calculation-timeout"]},"message":{"type":"string","enum":["The calculation could not finish within five seconds. Try again when you are ready."]},"retry":{"type":"string","enum":["try-again-manually"]}},"required":["_tag","code","message","retry"],"additionalProperties":false},"FactQuestionEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["FactQuestion"]},"helpText":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"inputKind":{"type":"string","enum":["money","boolean","selection"]},"prompt":{"type":"string"}},"required":["_tag","id","inputKind","prompt"],"additionalProperties":false},"CalculatorRequestBodyTooLargeEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["CalculatorRequestBodyTooLarge"]},"code":{"type":"string","enum":["request-too-large"]},"message":{"type":"string","enum":["This request is too large. Reduce it to 64 KiB or less and try again."]},"retry":{"type":"string","enum":["reduce-request"]}},"required":["_tag","code","message","retry"],"additionalProperties":false},"CalculatorRequestBodyTimedOutEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["CalculatorRequestBodyTimedOut"]},"code":{"type":"string","enum":["request-timeout"]},"message":{"type":"string","enum":["This request could not be read within five seconds. Try again when you are ready."]},"retry":{"type":"string","enum":["try-again-manually"]}},"required":["_tag","code","message","retry"],"additionalProperties":false},"CalculatorCapacityExceededEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["CalculatorCapacityExceeded"]},"code":{"type":"string","enum":["calculation-capacity"]},"message":{"type":"string","enum":["The calculators are busy. Try again when you are ready."]},"retry":{"type":"string","enum":["try-again-manually"]}},"required":["_tag","code","message","retry"],"additionalProperties":false},"CalculatorAdmissionUnavailableEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["CalculatorAdmissionUnavailable"]},"code":{"type":"string","enum":["calculation-admission-unavailable"]},"message":{"type":"string","enum":["The calculation could not be started. Try again when you are ready."]},"retry":{"type":"string","enum":["try-again-manually"]}},"required":["_tag","code","message","retry"],"additionalProperties":false},"CalculatorRateLimitedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["CalculatorRateLimited"]},"code":{"type":"string","enum":["rate-limited"]},"message":{"type":"string","enum":["Too many calculations were sent. Wait a minute before trying again."]},"retry":{"type":"string","enum":["wait-then-try-manually"]}},"required":["_tag","code","message","retry"],"additionalProperties":false},"UnsupportedCalculatorContextErrorEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["UnsupportedCalculatorContextError"]},"context":{"type":"object","properties":{"jurisdiction":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string","enum":["AU"]}]},{"anyOf":[{"type":"string","enum":["AU"]}]}]},{"type":"null"}]},"taxYear":{"anyOf":[{"anyOf":[{"type":"string","enum":["2025-26"]},{"type":"string","enum":["2025-26"]}]},{"type":"null"}]}},"additionalProperties":false},"message":{"type":"string"},"requestedCalculator":{"anyOf":[{"type":"string","enum":["au.pay.take-home","au.pay.withholdings"]},{"anyOf":[{"type":"string","enum":["au.income-tax.annual"]}]}]}},"required":["_tag","context","message","requestedCalculator"],"additionalProperties":false},"UnsupportedCalculatorErrorEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["UnsupportedCalculatorError"]},"message":{"type":"string"},"requestedCalculator":{"type":"string"}},"required":["_tag","message","requestedCalculator"],"additionalProperties":false},"CalculatorInputDecodeErrorEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["CalculatorInputDecodeError"]},"calculatorId":{"anyOf":[{"anyOf":[{"type":"string","enum":["au.pay.take-home","au.pay.withholdings"]},{"anyOf":[{"type":"string","enum":["au.income-tax.annual"]}]}]},{"type":"null"}]},"help":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"factId":{"type":"string"},"question":{"anyOf":[{"$ref":"#/components/schemas/FactQuestionEncoded"},{"type":"null"}]},"title":{"type":"string"}},"required":["factId","title"],"additionalProperties":false}},{"type":"null"}]},"issues":{"type":"array","items":{"$ref":"#/components/schemas/CalculatorInputIssueEncoded"}},"message":{"type":"string"}},"required":["_tag","issues","message"],"additionalProperties":false},"CalculatorInputIssueEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["CalculatorInputIssue"]},"message":{"type":"string"},"path":{"type":"array","items":{"type":"string"}}},"required":["_tag","message","path"],"additionalProperties":false},"CalculationErrorEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["CalculationError"]},"cause":{"anyOf":[{},{"type":"null"}]},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"AnnualTaxReportEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["AnnualTaxReport"]},"ledger":{"$ref":"#/components/schemas/AnnualTaxLedgerEncoded"},"liability":{"$ref":"#/components/schemas/MoneyEncoded"},"rawLiability":{"$ref":"#/components/schemas/MoneyEncoded"},"rulePackVersion":{"type":"string","enum":["rules-au-income-tax/1.0.0"]},"taxableIncome":{"$ref":"#/components/schemas/MoneyEncoded"},"trace":{"$ref":"#/components/schemas/Objects_"}},"required":["_tag","ledger","liability","rawLiability","rulePackVersion","taxableIncome","trace"],"additionalProperties":false},"Objects_":{"type":"object","properties":{"_tag":{"type":"string","enum":["TraceNode"]},"children":{"type":"array","items":{"$ref":"#/components/schemas/Objects_"}},"formula":{"anyOf":[{"type":"string"},{"type":"null"}]},"inputs":{"type":"object"},"result":{},"rounding":{"anyOf":[{"type":"string","enum":["none","round-to-nearest-cent","floor-cent","ceil-cent","floor-dollar","ceil-dollar","ato-withholding-rounding"]},{"type":"null"}]},"ruleId":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"_tag":{"type":"string","enum":["SourceRef"]},"kind":{"type":"string","enum":["ato-publication","legislation","regulation","internal-validation"]},"reference":{"type":"string"},"title":{"type":"string"}},"required":["_tag","kind","reference","title"],"additionalProperties":false}},"title":{"type":"string"}},"required":["_tag","children","inputs","result","ruleId","sources","title"],"additionalProperties":false},"MoneyEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["Money"]},"cents":{"type":"integer"},"currency":{"type":"string","enum":["AUD"]}},"required":["_tag","cents","currency"],"additionalProperties":false},"AnnualTaxLedgerEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["AnnualTaxLedger"]},"components":{"type":"array","items":{"type":"object","properties":{"_tag":{"type":"string","enum":["LedgerComponent"]},"amount":{"$ref":"#/components/schemas/MoneyEncoded"},"effect":{"type":"string","enum":["additive","subtractive","informational"]},"id":{"type":"string"},"label":{"type":"string"},"status":{"type":"string","enum":["active","disabled","zeroed"]},"trace":{"$ref":"#/components/schemas/Objects_"}},"required":["_tag","amount","effect","id","label","status","trace"],"additionalProperties":false}},"rawLiability":{"$ref":"#/components/schemas/MoneyEncoded"},"trace":{"$ref":"#/components/schemas/Objects_"}},"required":["_tag","components","rawLiability","trace"],"additionalProperties":false},"PayWithholdingsLedgerEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["PayWithholdingsLedger"]},"components":{"type":"array","items":{"type":"object","properties":{"_tag":{"type":"string","enum":["LedgerComponent"]},"amount":{"$ref":"#/components/schemas/MoneyEncoded"},"effect":{"type":"string","enum":["additive","subtractive","informational"]},"id":{"type":"string"},"label":{"type":"string"},"status":{"type":"string","enum":["active","disabled","zeroed"]},"trace":{"$ref":"#/components/schemas/Objects_"}},"required":["_tag","amount","effect","id","label","status","trace"],"additionalProperties":false}},"period":{"type":"string","enum":["weekly","fortnightly","monthly"]},"total":{"$ref":"#/components/schemas/MoneyEncoded"},"trace":{"$ref":"#/components/schemas/Objects_"}},"required":["_tag","components","period","total","trace"],"additionalProperties":false},"TakeHomePayReportEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["TakeHomePayReport"]},"grossPay":{"$ref":"#/components/schemas/MoneyEncoded"},"netPay":{"$ref":"#/components/schemas/MoneyEncoded"},"period":{"type":"string","enum":["weekly","fortnightly","monthly"]},"rulePackVersion":{"type":"string","enum":["rules-au-pay/1.0.0"]},"taxablePay":{"$ref":"#/components/schemas/MoneyEncoded"},"trace":{"$ref":"#/components/schemas/Objects_"},"withholdings":{"$ref":"#/components/schemas/PayWithholdingsLedgerEncoded"},"withholdingsTotal":{"$ref":"#/components/schemas/MoneyEncoded"}},"required":["_tag","grossPay","netPay","period","rulePackVersion","taxablePay","trace","withholdings","withholdingsTotal"],"additionalProperties":false},"CalculationDiagnosticsEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["CalculationDiagnostics"]},"graphIssues":{"type":"array","items":{"$ref":"#/components/schemas/GraphValidationIssueEncoded"}}},"required":["_tag","graphIssues"],"additionalProperties":false},"GraphValidationIssueEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["GraphValidationIssue"]},"kind":{"type":"string","enum":["duplicate-provider","missing-provider","missing-source","parameter-overlap","parameter-source-mismatch","cycle"]},"message":{"type":"string"}},"required":["_tag","kind","message"],"additionalProperties":false},"GrossPayEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["GrossPay"]},"amount":{"$ref":"#/components/schemas/MoneyEncoded"},"period":{"type":"string","enum":["weekly","fortnightly","monthly"]}},"required":["_tag","amount","period"],"additionalProperties":false}},"securitySchemes":{}},"security":[],"tags":[{"name":"Health"},{"name":"Calculator API"},{"name":"Public documentation"}]}