File size: 5,462 Bytes
a793e22 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | openapi: 3.0.3
info:
title: BELEL-LEX API
version: 0.1.0
paths:
/v1/legal/qa:
post:
summary: Legal Q&A with authorities and Legal Evidence Contract
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/LegalQARequest'
responses:
'200':
description: Answer with authorities and policy
content:
application/json:
schema:
$ref: '#/components/schemas/LegalQAResponse'
/v1/citation/validate:
post:
summary: Validate legal citations and return normalized table + status
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CitationValidateRequest'
responses:
'200':
description: Validation result
content:
application/json:
schema:
$ref: '#/components/schemas/CitationValidateResponse'
/v1/filings/draft:
post:
summary: Draft filings/skeletons/forms with embedded disclosure placeholder
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/FilingsDraftRequest'
responses:
'200':
description: Drafted document (for sign-off) with provenance
content:
application/json:
schema:
$ref: '#/components/schemas/FilingsDraftResponse'
/v1/policy/check:
post:
summary: Check document for jurisdiction-specific AI/PD compliance
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PolicyCheckRequest'
responses:
'200':
description: Compliance report
content:
application/json:
schema:
$ref: '#/components/schemas/PolicyCheckResponse'
/v1/practice-direction/watch:
post:
summary: Trigger practice-direction watchers for configured jurisdictions
responses:
'200':
description: Watch report with diffs and policy updates
content:
application/json:
schema:
type: object
properties:
updated:
type: array
items: { type: string }
components:
schemas:
LegalQARequest:
type: object
properties:
question: { type: string }
jurisdiction: { type: string }
scope:
type: object
properties:
courts: { type: array, items: { type: string } }
last_years: { type: integer }
AuthorityItem:
type: object
properties:
cite: { type: string }
court: { type: string }
year: { type: integer }
weight: { type: string, enum: [binding, persuasive, commentary] }
url: { type: string }
LegalQAResponse:
type: object
properties:
summary: { type: string }
authorities:
type: array
items: { $ref: '#/components/schemas/AuthorityItem' }
policy_profile: { type: string }
uncertainty:
type: object
properties:
reasoning: { type: number }
source_gap: { type: number }
disclosure:
type: object
properties:
genai_used: { type: boolean }
certificate: { type: string }
audit:
type: object
properties:
sha256: { type: string }
kg_version: { type: string }
CitationValidateRequest:
type: object
properties:
citations:
type: array
items: { type: string }
jurisdiction: { type: string }
CitationRow:
type: object
properties:
input: { type: string }
normalized: { type: string }
exists: { type: boolean }
court: { type: string }
year: { type: integer }
precedential_status: { type: string }
CitationValidateResponse:
type: object
properties:
table:
type: array
items: { $ref: '#/components/schemas/CitationRow' }
bad_citations:
type: array
items: { type: string }
FilingsDraftRequest:
type: object
properties:
doc_type: { type: string, enum: [skeleton, claim_form, defence, factum, affidavit, bundle_index] }
facts: { type: string }
issues: { type: array, items: { type: string } }
jurisdiction: { type: string }
require_disclosure: { type: boolean }
FilingsDraftResponse:
type: object
properties:
draft: { type: string }
disclosure_placeholder: { type: string }
authorities:
type: array
items: { $ref: '#/components/schemas/AuthorityItem' }
audit_sha256: { type: string }
PolicyCheckRequest:
type: object
properties:
text: { type: string }
jurisdiction: { type: string }
PolicyCheckResponse:
type: object
properties:
compliant: { type: boolean }
reasons:
type: array
items: { type: string }
required_actions:
type: array
items: { type: string }
|