Skip to content

Send tax_benefit_model_name instead of country_id for parameter tree endpoints#775

Closed
anth-volk wants to merge 3 commits intomove-to-api-v2from
fix/version-filter
Closed

Send tax_benefit_model_name instead of country_id for parameter tree endpoints#775
anth-volk wants to merge 3 commits intomove-to-api-v2from
fix/version-filter

Conversation

@anth-volk
Copy link
Collaborator

Summary

  • Update fetchParameterChildren to send tax_benefit_model_name query param instead of country_id
  • Update fetchParametersByName to send tax_benefit_model_name in POST body instead of country_id
  • Function signatures unchanged — conversion from countryId to model name happens internally via getModelName()
  • Update test fixtures and assertions to match

Test plan

  • All 9 parameterTree tests pass
  • TypeScript typecheck clean (no new errors)

Blocked by: PolicyEngine/policyengine-api-v2-alpha#98
Closes #774

🤖 Generated with Claude Code

… tree endpoints

Update fetchParameterChildren and fetchParametersByName to send
tax_benefit_model_name instead of country_id, aligning with API changes
that unify all metadata endpoints to use tax_benefit_model_name.

Closes #774

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Mar 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
policyengine-app-v2 Ready Ready Preview, Comment Mar 4, 2026 9:10pm
policyengine-calculator Ready Ready Preview, Comment Mar 4, 2026 9:10pm

Request Review

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@anth-volk
Copy link
Collaborator Author

Superseded by the country_id standardization work on feat/v1-v2-migration-script. The frontend now sends country_id everywhere (including parameter tree endpoints) and the API resolves it to the latest model version server-side, eliminating the need for the frontend to know about tax_benefit_model_name at all.

@anth-volk anth-volk closed this Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant