{"openapi":"3.1.0","info":{"title":"Clarivy Partner API","version":"1.1.0","description":"Open and retrieve purpose-bound legal-entity cases, attach cited findings or documents, request missing documents, and export verifiable lineage. Clarivy derives tenant and actor authority from a scoped service credential. Material review decisions remain on the authenticated human-review surface.","contact":{"name":"Clarivy integration support","url":"https://clarivy.pro/contact"}},"servers":[{"url":"https://app.clarivy.pro/api","description":"Clarivy API"}],"tags":[{"name":"Partner case intake","description":"Create governed legal-entity cases. The service credential must include case.create and the requested use-case scope."},{"name":"Partner case retrieval","description":"Retrieve tenant-scoped cases and their current controlled record."},{"name":"Partner documents and findings","description":"Attach source-cited findings or case documents for human review."},{"name":"Partner document requests","description":"Resolve policy-bound document options and create secure requests."},{"name":"Partner verification","description":"Export lineage and a signed portable verification bundle."}],"paths":{"/integrations/v1/cases/{case_id}/documents":{"post":{"tags":["Partner documents and findings"],"summary":"Upload a case document","description":"Stores a private, case-scoped quarantined document, calculates its artifact hash, and queues governed security processing. Durable extraction starts only after a current eligible security result and remains subject to named human review.","operationId":"uploadCaseDocument","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_uploadCaseDocument"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidenceRecord"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/v1/cases/{case_id}/document-requests":{"get":{"tags":["Partner document requests"],"summary":"List secure document requests","operationId":"listDocumentRequests","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EvidenceRequestRecord"},"title":"Response Listdocumentrequests"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Partner document requests"],"summary":"Create and queue a secure document request","description":"Creates a policy-resolved request, secure upload portal, and initial email delivery. A truthful delivery status is returned.","operationId":"createDocumentRequest","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidenceRequestCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidenceRequestRecord"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/v1/cases/{case_id}/document-request-options":{"get":{"tags":["Partner document requests"],"summary":"List policy-bound document options","description":"Returns the published policy document catalogue available for this case.","operationId":"listDocumentRequestOptions","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/v1/cases/{case_id}/evidence":{"post":{"tags":["Partner documents and findings"],"summary":"Add a source-cited finding","description":"Adds a structured finding from an approved source system. Clarivy replaces the client-supplied collector with the authenticated integration identity.","operationId":"addCaseFinding","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalEvidenceCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidenceRecord"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/v1/cases/{case_id}/lineage":{"get":{"tags":["Partner verification"],"summary":"Get case lineage","operationId":"getCaseLineage","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidenceLineageGraph"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/v1/cases/{case_id}":{"get":{"tags":["Partner case retrieval"],"summary":"Get a governed case","description":"Returns the case, findings, reviews, loop outcomes, and append-only audit events.","operationId":"getGovernedCase","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaseDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/v1/cases":{"post":{"tags":["Partner case intake"],"summary":"Create a governed case","description":"Creates one purpose-bound legal-entity case using the tenant and actor authority attached to the service credential. Send a unique Idempotency-Key for every logical request; replaying the same key and payload returns the original case without creating a duplicate.","operationId":"createGovernedCase","security":[{"HTTPBearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":8,"maxLength":255},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalCaseCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalCaseCreateResponse"}}}},"400":{"description":"The required Idempotency-Key header is missing."},"401":{"description":"The service credential is invalid, expired, or revoked."},"403":{"description":"The credential lacks the required scope."},"409":{"description":"The idempotency key conflicts or is still processing."},"422":{"description":"The request body failed contract validation."}}},"get":{"tags":["Partner case retrieval"],"summary":"List governed cases","description":"Lists cases for the credential tenant and filters them to the credential's approved workflow scopes. Evidence payloads are not included.","operationId":"listGovernedCases","security":[{"HTTPBearer":[]}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CaseRecord"},"title":"Response Listgovernedcases"}}}}}}},"/integrations/v1/cases/{case_id}/verification-bundle":{"get":{"tags":["Partner verification"],"summary":"Export a signed verification bundle","operationId":"exportVerificationBundle","security":[{"HTTPBearer":[]}],"parameters":[{"name":"case_id","in":"path","required":true,"schema":{"type":"string","title":"Case Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationBundle"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ApplicationChannel":{"type":"string","enum":["internal","direct","partner","api"],"title":"ApplicationChannel"},"ApplicationContext":{"properties":{"merchant_reference":{"anyOf":[{"type":"string","maxLength":120,"minLength":3},{"type":"null"}],"title":"Merchant Reference"},"application_type":{"$ref":"#/components/schemas/ApplicationType","default":"onboarding"},"product_references":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Product References"},"requested_change":{"anyOf":[{"type":"string","maxLength":600},{"type":"null"}],"title":"Requested Change"},"source_channel":{"$ref":"#/components/schemas/ApplicationChannel","default":"internal"},"communication_locale":{"$ref":"#/components/schemas/CommunicationLocale","default":"en"},"contact_name":{"anyOf":[{"type":"string","maxLength":160,"minLength":2},{"type":"null"}],"title":"Contact Name"},"contact_email":{"anyOf":[{"type":"string","maxLength":254,"minLength":5},{"type":"null"}],"title":"Contact Email"},"contact_phone":{"anyOf":[{"type":"string","maxLength":40,"minLength":5},{"type":"null"}],"title":"Contact Phone"},"identifiers":{"additionalProperties":{"type":"string"},"type":"object","title":"Identifiers"}},"type":"object","title":"ApplicationContext","description":"Application facts kept separate from the reusable legal-entity profile."},"ApplicationType":{"type":"string","enum":["onboarding","product_addition","limit_change","material_change","periodic_review","due_diligence","recovery","investigation"],"title":"ApplicationType","description":"The business change being reviewed in one independent application."},"AuditEvent":{"properties":{"id":{"type":"string","title":"Id"},"case_id":{"type":"string","title":"Case Id"},"actor":{"type":"string","title":"Actor"},"action":{"type":"string","title":"Action"},"target_type":{"type":"string","title":"Target Type"},"target_id":{"type":"string","title":"Target Id"},"details":{"additionalProperties":true,"type":"object","title":"Details"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"sequence":{"type":"integer","title":"Sequence","default":0},"previous_hash":{"type":"string","title":"Previous Hash","default":""},"event_hash":{"type":"string","title":"Event Hash","default":""}},"type":"object","required":["id","case_id","actor","action","target_type","target_id","details","created_at"],"title":"AuditEvent"},"Body_uploadCaseDocument":{"properties":{"title":{"type":"string","maxLength":240,"minLength":3,"title":"Title"},"claim":{"type":"string","maxLength":1200,"minLength":5,"title":"Claim"},"gate":{"type":"string","maxLength":80,"minLength":2,"title":"Gate"},"document_type":{"type":"string","maxLength":120,"title":"Document Type","default":""},"confidence":{"type":"number","maximum":1,"minimum":0,"title":"Confidence","default":0.7},"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["title","claim","gate","file"],"title":"Body_uploadCaseDocument"},"CaseDetail":{"properties":{"case":{"$ref":"#/components/schemas/CaseRecord"},"evidence":{"items":{"$ref":"#/components/schemas/EvidenceRecord"},"type":"array","title":"Evidence"},"reviews":{"items":{"$ref":"#/components/schemas/EvidenceReviewRecord"},"type":"array","title":"Reviews"},"audit":{"items":{"$ref":"#/components/schemas/AuditEvent"},"type":"array","title":"Audit"},"loops":{"anyOf":[{"items":{"$ref":"#/components/schemas/LoopResolutionRecord"},"type":"array"},{"type":"null"}],"title":"Loops"}},"type":"object","required":["case","evidence","reviews","audit"],"title":"CaseDetail"},"CaseRecord":{"properties":{"reference":{"type":"string","maxLength":80,"minLength":3,"title":"Reference"},"title":{"type":"string","maxLength":160,"minLength":3,"title":"Title"},"purpose":{"type":"string","maxLength":600,"minLength":10,"title":"Purpose"},"use_case":{"$ref":"#/components/schemas/InvestigationUseCase"},"subject_name":{"type":"string","maxLength":200,"minLength":2,"title":"Subject Name"},"subject_type":{"type":"string","title":"Subject Type","default":"legal_entity"},"legal_basis":{"$ref":"#/components/schemas/LegalBasis"},"jurisdiction":{"type":"string","maxLength":10,"minLength":2,"title":"Jurisdiction","default":"AE"},"owner":{"type":"string","maxLength":120,"minLength":2,"title":"Owner"},"retention_days":{"type":"integer","maximum":2555,"minimum":30,"title":"Retention Days","default":180},"application":{"$ref":"#/components/schemas/ApplicationContext"},"id":{"type":"string","title":"Id"},"status":{"$ref":"#/components/schemas/CaseStatus"},"policy_configuration_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Policy Configuration Id"},"policy_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Policy Name"},"policy_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Policy Version"},"policy_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Policy Hash"},"policy_status_at_open":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Policy Status At Open"},"processing_restricted":{"type":"boolean","title":"Processing Restricted","default":false},"restriction_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Restriction Reason"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["reference","title","purpose","use_case","subject_name","legal_basis","owner","id","status","created_at","updated_at","expires_at"],"title":"CaseRecord"},"CaseStatus":{"type":"string","enum":["draft","active","in_review","closed"],"title":"CaseStatus"},"CommunicationLocale":{"type":"string","enum":["en","zh-Hans","fr","es","de"],"title":"CommunicationLocale"},"EvidenceClassification":{"type":"string","enum":["public_business_source","client_provided","regulatory_source"],"title":"EvidenceClassification"},"EvidenceLineageGraph":{"properties":{"case_id":{"type":"string","title":"Case Id"},"nodes":{"items":{"$ref":"#/components/schemas/LineageNode"},"type":"array","title":"Nodes"},"edges":{"items":{"$ref":"#/components/schemas/LineageEdge"},"type":"array","title":"Edges"},"graph_root_hash":{"type":"string","title":"Graph Root Hash"},"audit_chain_valid":{"type":"boolean","title":"Audit Chain Valid"},"audit_event_count":{"type":"integer","title":"Audit Event Count"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"}},"type":"object","required":["case_id","nodes","edges","graph_root_hash","audit_chain_valid","audit_event_count","generated_at"],"title":"EvidenceLineageGraph"},"EvidenceRecord":{"properties":{"title":{"type":"string","maxLength":240,"minLength":3,"title":"Title"},"claim":{"type":"string","maxLength":1200,"minLength":5,"title":"Claim"},"classification":{"$ref":"#/components/schemas/EvidenceClassification"},"source_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Source Url"},"source_type":{"type":"string","maxLength":80,"minLength":2,"title":"Source Type"},"excerpt":{"type":"string","maxLength":5000,"title":"Excerpt","default":""},"observed_at":{"type":"string","format":"date-time","title":"Observed At"},"collected_by":{"type":"string","maxLength":120,"minLength":2,"title":"Collected By"},"confidence":{"type":"number","maximum":1,"minimum":0,"title":"Confidence","default":0.5},"attributes":{"additionalProperties":true,"type":"object","title":"Attributes"},"id":{"type":"string","title":"Id"},"case_id":{"type":"string","title":"Case Id"},"content_hash":{"type":"string","title":"Content Hash"},"review_status":{"anyOf":[{"$ref":"#/components/schemas/ReviewStatus"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["title","claim","classification","source_type","collected_by","id","case_id","content_hash","created_at"],"title":"EvidenceRecord"},"EvidenceRequestCreate":{"properties":{"recipient_name":{"type":"string","maxLength":160,"minLength":2,"title":"Recipient Name"},"recipient_email":{"type":"string","maxLength":254,"minLength":5,"title":"Recipient Email"},"merchant_message":{"type":"string","maxLength":2000,"minLength":10,"title":"Merchant Message"},"document_type_ids":{"items":{"type":"string"},"type":"array","maxItems":30,"minItems":1,"title":"Document Type Ids"},"locale":{"$ref":"#/components/schemas/CommunicationLocale","default":"en"},"expires_hours":{"type":"integer","maximum":720,"minimum":1,"title":"Expires Hours","default":168}},"type":"object","required":["recipient_name","recipient_email","merchant_message","document_type_ids"],"title":"EvidenceRequestCreate"},"EvidenceRequestItemRecord":{"properties":{"document_type":{"type":"string","title":"Document Type"},"label":{"type":"string","title":"Label"},"reason":{"type":"string","title":"Reason"},"accepted_formats":{"items":{"type":"string"},"type":"array","title":"Accepted Formats"},"max_size_mb":{"type":"integer","maximum":100,"minimum":1,"title":"Max Size Mb"},"id":{"type":"string","title":"Id"},"request_id":{"type":"string","title":"Request Id"},"status":{"type":"string","enum":["requested","received","accepted","rejected"],"title":"Status"},"submission_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Submission Id"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["document_type","label","reason","accepted_formats","max_size_mb","id","request_id","status","updated_at"],"title":"EvidenceRequestItemRecord"},"EvidenceRequestRecord":{"properties":{"id":{"type":"string","title":"Id"},"tenant_id":{"type":"string","title":"Tenant Id"},"case_id":{"type":"string","title":"Case Id"},"reference":{"type":"string","title":"Reference"},"recipient_name":{"type":"string","title":"Recipient Name"},"recipient_email":{"type":"string","title":"Recipient Email"},"merchant_message":{"type":"string","title":"Merchant Message"},"locale":{"$ref":"#/components/schemas/CommunicationLocale"},"status":{"type":"string","enum":["open","partially_received","submitted","completed","cancelled","expired"],"title":"Status"},"portal_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Portal Token"},"policy_configuration_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Policy Configuration Id"},"policy_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Policy Version"},"policy_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Policy Hash"},"created_by":{"type":"string","title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"delivery_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivery Id"},"delivery_status":{"anyOf":[{"type":"string","enum":["pending","processing","sent","failed","cancelled"]},{"type":"null"}],"title":"Delivery Status"},"delivery_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivery Error"},"items":{"items":{"$ref":"#/components/schemas/EvidenceRequestItemRecord"},"type":"array","title":"Items"},"submissions":{"items":{"$ref":"#/components/schemas/EvidenceSubmissionRecord"},"type":"array","title":"Submissions"}},"type":"object","required":["id","tenant_id","case_id","reference","recipient_name","recipient_email","merchant_message","locale","status","created_by","created_at","updated_at","expires_at"],"title":"EvidenceRequestRecord"},"EvidenceReviewRecord":{"properties":{"status":{"$ref":"#/components/schemas/ReviewStatus"},"note":{"type":"string","maxLength":1200,"minLength":3,"title":"Note"},"reviewer":{"type":"string","maxLength":120,"minLength":2,"title":"Reviewer"},"id":{"type":"string","title":"Id"},"evidence_id":{"type":"string","title":"Evidence Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["status","note","reviewer","id","evidence_id","created_at"],"title":"EvidenceReviewRecord"},"EvidenceSubmissionRecord":{"properties":{"id":{"type":"string","title":"Id"},"request_id":{"type":"string","title":"Request Id"},"item_id":{"type":"string","title":"Item Id"},"original_filename":{"type":"string","title":"Original Filename"},"mime_type":{"type":"string","title":"Mime Type"},"size_bytes":{"type":"integer","title":"Size Bytes"},"content_hash":{"type":"string","title":"Content Hash"},"submitted_by":{"type":"string","title":"Submitted By"},"note":{"type":"string","title":"Note"},"status":{"type":"string","enum":["pending_review","accepted","rejected"],"title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"reviewed_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewed By"},"review_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review Note"},"reviewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reviewed At"}},"type":"object","required":["id","request_id","item_id","original_filename","mime_type","size_bytes","content_hash","submitted_by","note","status","created_at"],"title":"EvidenceSubmissionRecord"},"ExternalCaseCreate":{"properties":{"reference":{"type":"string","maxLength":80,"minLength":3,"title":"Reference","description":"Stable case reference from the calling system.","examples":["LOS-2026-00184"]},"title":{"type":"string","maxLength":160,"minLength":3,"title":"Title","description":"Short human-readable case title.","examples":["Merchant eligibility review"]},"purpose":{"type":"string","maxLength":600,"minLength":10,"title":"Purpose","description":"Approved business purpose for opening the evidence case.","examples":["Assess this merchant against the approved SME lending policy."]},"use_case":{"$ref":"#/components/schemas/InvestigationUseCase","description":"Clarivy workflow family that controls the applicable policy."},"subject_name":{"type":"string","maxLength":200,"minLength":2,"title":"Subject Name","description":"Registered or supplied legal-entity name.","examples":["Example Trading LLC"]},"subject_type":{"type":"string","title":"Subject Type","description":"Only legal_entity is accepted by the Partner API.","default":"legal_entity","examples":["legal_entity"]},"legal_basis":{"$ref":"#/components/schemas/LegalBasis","description":"Approved legal basis recorded with the case."},"jurisdiction":{"type":"string","maxLength":10,"minLength":2,"title":"Jurisdiction","description":"ISO country or approved jurisdiction code.","default":"AE","examples":["AE"]},"retention_days":{"type":"integer","maximum":2555,"minimum":30,"title":"Retention Days","description":"Requested retention period, subject to tenant policy.","default":180,"examples":[180]},"application":{"$ref":"#/components/schemas/ApplicationContext","description":"Application-specific context such as product references and requested change. Clarivy keeps this separate from reusable merchant facts."}},"type":"object","required":["reference","title","purpose","use_case","subject_name","legal_basis"],"title":"ExternalCaseCreate","description":"Public case intake contract; authority fields are server-derived."},"ExternalCaseCreateResponse":{"properties":{"request_id":{"type":"string","title":"Request Id","description":"Clarivy correlation identifier returned in the response header."},"idempotent_replay":{"type":"boolean","title":"Idempotent Replay","description":"True when the response is a safe replay of an earlier request."},"case":{"$ref":"#/components/schemas/CaseRecord","description":"The governed case created by Clarivy."}},"type":"object","required":["request_id","idempotent_replay","case"],"title":"ExternalCaseCreateResponse"},"ExternalEvidenceCreate":{"properties":{"title":{"type":"string","maxLength":240,"minLength":3,"title":"Title"},"claim":{"type":"string","maxLength":1200,"minLength":5,"title":"Claim"},"classification":{"$ref":"#/components/schemas/EvidenceClassification"},"source_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Source Url"},"source_type":{"type":"string","maxLength":80,"minLength":2,"title":"Source Type"},"excerpt":{"type":"string","maxLength":5000,"title":"Excerpt","default":""},"observed_at":{"type":"string","format":"date-time","title":"Observed At"},"confidence":{"type":"number","maximum":1,"minimum":0,"title":"Confidence","default":0.5},"attributes":{"additionalProperties":true,"type":"object","title":"Attributes"}},"type":"object","required":["title","claim","classification","source_type"],"title":"ExternalEvidenceCreate","description":"Public finding contract; the authenticated integration owns authorship."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InvestigationUseCase":{"type":"string","enum":["corporate_recovery","corporate_due_diligence","merchant_eligibility","aml_cft","payment_fraud"],"title":"InvestigationUseCase"},"LegalBasis":{"type":"string","enum":["contract_performance","legal_claim","regulatory_obligation","legitimate_interest_reviewed"],"title":"LegalBasis"},"LineageEdge":{"properties":{"id":{"type":"string","title":"Id"},"case_id":{"type":"string","title":"Case Id"},"source_type":{"type":"string","enum":["case","policy","claim","evidence","source","review","loop_decision"],"title":"Source Type"},"source_id":{"type":"string","title":"Source Id"},"relationship":{"type":"string","enum":["part_of","supported_by","derived_from","satisfies_policy_gate","reviewed_by","verified_by","rejected_by","needs_follow_up_from","influenced_by","governed_by"],"title":"Relationship"},"target_type":{"type":"string","enum":["case","policy","claim","evidence","source","review","loop_decision"],"title":"Target Type"},"target_id":{"type":"string","title":"Target Id"},"content_hash":{"type":"string","title":"Content Hash"},"attributes":{"additionalProperties":true,"type":"object","title":"Attributes"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","case_id","source_type","source_id","relationship","target_type","target_id","content_hash","created_at"],"title":"LineageEdge"},"LineageNode":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","enum":["case","policy","claim","evidence","source","review","loop_decision"],"title":"Type"},"label":{"type":"string","title":"Label"},"content_hash":{"type":"string","title":"Content Hash"},"attributes":{"additionalProperties":true,"type":"object","title":"Attributes"}},"type":"object","required":["id","type","label","content_hash"],"title":"LineageNode"},"LoopDecision":{"type":"string","enum":["required_action","accepted","escalate_to_review"],"title":"LoopDecision"},"LoopGateStatus":{"type":"string","enum":["pending","pass","fail","conflict","under_review"],"title":"LoopGateStatus"},"LoopResolutionRecord":{"properties":{"id":{"type":"string","title":"Id"},"case_id":{"type":"string","title":"Case Id"},"gate":{"type":"string","title":"Gate"},"status":{"$ref":"#/components/schemas/LoopGateStatus"},"decision":{"$ref":"#/components/schemas/LoopDecision"},"note":{"type":"string","title":"Note"},"actor":{"type":"string","title":"Actor"},"actor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Id"},"evidence_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evidence Id"},"requested_status":{"anyOf":[{"$ref":"#/components/schemas/LoopGateStatus"},{"type":"null"}]},"requested_decision":{"anyOf":[{"$ref":"#/components/schemas/LoopDecision"},{"type":"null"}]},"policy_configuration_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Policy Configuration Id"},"policy_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Policy Version"},"policy_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Policy Hash"},"authorization_role_ids":{"items":{"type":"string"},"type":"array","title":"Authorization Role Ids"},"authorization_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization Reason"},"approval_count":{"type":"integer","title":"Approval Count","default":1},"required_approvals":{"type":"integer","title":"Required Approvals","default":1},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","case_id","gate","status","decision","note","actor","evidence_id","created_at"],"title":"LoopResolutionRecord"},"ReviewStatus":{"type":"string","enum":["verified","rejected","needs_follow_up"],"title":"ReviewStatus"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerificationBundle":{"properties":{"bundle_version":{"type":"string","title":"Bundle Version","default":"clarivio.evidence-bundle.v1"},"algorithm":{"type":"string","title":"Algorithm","default":"Ed25519"},"key_id":{"type":"string","title":"Key Id"},"public_key":{"type":"string","title":"Public Key"},"case_id":{"type":"string","title":"Case Id"},"case_reference":{"type":"string","title":"Case Reference"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"graph_root_hash":{"type":"string","title":"Graph Root Hash"},"audit_chain_valid":{"type":"boolean","title":"Audit Chain Valid"},"payload_hash":{"type":"string","title":"Payload Hash"},"signature":{"type":"string","title":"Signature"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"}},"type":"object","required":["key_id","public_key","case_id","case_reference","generated_at","graph_root_hash","audit_chain_valid","payload_hash","signature","payload"],"title":"VerificationBundle"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}