Skip to main content

Retrieve Ordinance Lineage

Use this guide when you need the ordinance context around a section-level legal change.

Step 1: Start with section lineage

curl "https://api.localcode.ai/v1/code-sections/{code_section_id}/legislative-chain" \
  -H "Authorization: Bearer {LOCALCODE_API_KEY}"

Step 2: Resolve ordinances

For each linked ordinance node, call:
curl "https://api.localcode.ai/v1/ordinances/{ordinance_id}" \
  -H "Authorization: Bearer {LOCALCODE_API_KEY}"

Step 3: Interpret provenance fields

When reading chain edges, treat:
  • source_verification_status as legal/source trust state
  • analysis_confidence as extraction or matching confidence