Compliance API
Rules and their sign-off, violations, overrides, packages, the rule register and reports.
Objects
- Rule: one version of a compliance rule: a rule type (25 types, e.g.
max_issuer_pct,restricted_list,wash_sale,udf_condition), parameters, a scope (firm, groups, packages or accounts), a severity (block,warn,info) and run points (pretrade,intrade,posttrade). Versions of one rule share alineage_id. Therestatementis written by code from the definition;definition_hashfingerprints the exact version. - Violation: a breach with an owner, a due date and a history. Override: a request to proceed past a soft warning. Package: rules plus a mandate, assigned to groups or accounts. Register: every rule with its versions, sign-offs and violations. Report: a periodic report.
Rule life cycle
draft ─(test bench, submit)→ pending_approval ─(sign-off by a person)→ active ─(new version signed)→ superseded
←────────(reject: sent back)────────────┘ └─(retire, signed)→ retiredPOST /compliance/rulesdrafts (or{"change_of": id}drafts a new version).POST /compliance/rules/{id}/test-bench(202, a job) runs it against today's holdings and recent orders. Required.POST /compliance/rules/{id}/submit.- A person with approve compliance rules, never the author:
GET /compliance/rules/{id}/sign-off(what you sign, and aconfirm_token), thenPOST /compliance/rules/{id}/sign-offwithX-Vestoris-Confirmand a reason. Client-credentials tokens are refused (user_token_required).
Violation life cycle
open → acknowledged → resolved | waived (note required) | escalated with POST /compliance/violations/{id}/transition. Post-trade breaches resolve themselves when the holding is fixed.
Overrides
POST /orders/{id}/override with a reason; above the firm's threshold Compliance decides with POST /overrides/{id}/decision (four eyes).
Endpoints
| Call | What it does | Scope |
|---|---|---|
GET/overrides | Override requests | compliance:read |
POST/overrides/{id}/decision | Approve or reject an override (Compliance; four eyes) | orders:approve |
GET/compliance/rules | Rules (every version) | compliance:read |
GET/compliance/rules/{id} | One rule version with restatement and test bench | compliance:read |
GET/compliance/rules/{id}/versions | Every version of the rule's lineage | compliance:read |
POST/compliance/rules | Draft a rule (structured definition) | compliance:rules:write |
PATCH/compliance/rules/{id} | Change a draft (If-Match) | compliance:rules:write |
POST/compliance/rules/{id}/test-bench | Run the test bench (202: a job) | compliance:rules:write |
POST/compliance/rules/{id}/submit | Submit for sign-off | compliance:rules:write |
GET/compliance/rules/{id}/sign-off | What you would sign off, with a confirmation token for X-Vestoris-Confirm | compliance:rules:approve |
POST/compliance/rules/{id}/sign-off | Sign off (a person, never client credentials; X-Vestoris-Confirm) | compliance:rules:approve |
POST/compliance/rules/{id}/reject | Send back to the author with comments | compliance:rules:approve |
POST/compliance/rules/{id}/retire | Ask for an active rule to be retired (signed off like a change) | compliance:rules:write |
GET/compliance/violations | Violations | compliance:read |
GET/compliance/violations/{id} | One violation | compliance:read |
POST/compliance/violations/{id}/transition | Acknowledge, resolve, waive (with a reason) or escalate | compliance:violations:write |
GET/compliance/packages | Rule packages and their assignments | compliance:read |
GET/compliance/register | The rule register (JSON, or ?format=pdf) | compliance:reports:read |
GET/compliance/reports | Periodic compliance reports | compliance:reports:read |
POST/compliance/reports | Generate a report for a period (202: a job) | compliance:reports:read |