Preview / Roadmap Endpoints¶
This page documents the contract-only scaffolds for three future endpoints (legal / accounting / calendar). These routes exist in code today but are not enabled by default. They ship behind a feature flag so we can:
- Publish a credible future contract that SDK codegen, MCP clients, and marketing pages can reference before the implementation is ready.
- Keep the public OpenAPI export (
docs/openapi/v1.json) clean — no unimplemented routes leaking into customer surface area. - Give W5-W8 ingest lanes a concrete data shape target to build toward.
Feature flag¶
# default (stable)
JPINTEL_ENABLE_PREVIEW_ENDPOINTS=false
# publish the contract
JPINTEL_ENABLE_PREVIEW_ENDPOINTS=true
Behavior:
| flag | calling a preview route | OpenAPI export |
|---|---|---|
| off | 404 Not Found (unmounted) |
excluded |
| on | 501 Not Implemented + body |
included (roadmap-as-contract) |
501 is the standards-compliant "planned, not yet implemented" code — a
clearer signal than 404 that the endpoint will exist.
Endpoints¶
1. GET /v1/legal/items — target W6 (2026-05-27)¶
Resolve a 法令名 + 条文 to the canonical 法律条文 text and its last revision date.
- Source (future): e-Gov 法令 API (https://elaws.e-gov.go.jp/api/1/)
- Query params:
law,article,subject(optional) - Response shape:
- 501 body:
{"detail": "endpoint under development, target W6", "eta": "2026-05-27"}
2. POST /v1/accounting/invoice-validate — target W7 (2026-06-10)¶
Validate an インボイス適格請求書発行事業者登録番号 against 国税庁's public Web-API.
- Source (future): 国税庁 Web-API (https://www.invoice-kohyo.nta.go.jp/web-api/)
- Body:
{"invoice_number": "T1234567890123"}(14 chars:T+ 13 digits) - Response shape:
- 501 body:
{"detail": "endpoint under development, target W7", "eta": "2026-06-10"}
3. GET /v1/calendar/deadlines — target W8 (2026-06-24)¶
Return upcoming submission deadlines for a given program.
- Source: existing
enriched.C_procedure.submission_deadlineif populated, plus a crawl of the program'ssource_urlfor 公募締切 detection. - Query params:
program_id,months_ahead(default 3, 1..12) - Response shape:
- 501 body:
{"detail": "endpoint under development, target W8", "eta": "2026-06-24"}
OpenAPI export¶
# stable (default — what ships to customers)
python scripts/export_openapi.py
# roadmap-as-contract (for prospects / partner previews)
python scripts/export_openapi.py --include-preview --out docs/openapi/v1_preview.json
See also: docs/GENERALIZATION_ROADMAP.md §1 row (c) — the W8 exit criterion
"legal / accounting / calendar の 3 endpoint が public".