Skip to main content

Trace a Code Section

This workflow starts from a known code_section_id and builds trust context in four requests.
  1. Fetch section details
  2. Fetch official section sources
  3. Fetch legislative chain
  4. Fetch related ordinance records

1) Get the section

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

2) Get official sources

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

3) Get legislative chain

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