openapi: 3.0.3
info:
  title: Nexus supervisory evaluation API
  version: 0.1.0
  description: |
    Evaluation specification for the Nexus ISO 20022 inspection surface.
    This is not a public production endpoint and not a live central-bank
    integration. Request a sandbox tenancy from Inject Group Ltd
    (https://www.injectgroup.com/nexus/sandbox/).
  contact:
    name: Inject Group Ltd
    email: team@injectgroup.com
    url: https://www.injectgroup.com/company/
servers:
  - url: https://sandbox.example.invalid/v1
    description: Placeholder. A real sandbox URL is issued under NDA.
paths:
  /messages/inspect:
    post:
      summary: Inspect a native ISO 20022 message
      description: Accepts pacs.008, pacs.009, camt.053, or pain.001 XML and returns field completeness plus risk flags.
      operationId: inspectMessage
      requestBody:
        required: true
        content:
          application/xml:
            schema:
              type: string
      responses:
        '200':
          description: Inspection result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InspectionResult'
  /alerts:
    get:
      summary: List supervisory alerts
      operationId: listAlerts
      parameters:
        - in: query
          name: since
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: Alert page
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Alert'
  /imtos/{imtoId}:
    get:
      summary: IMTO supervisory profile
      operationId: getImtoProfile
      parameters:
        - in: path
          name: imtoId
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Profile
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImtoProfile'
components:
  schemas:
    InspectionResult:
      type: object
      properties:
        messageType:
          type: string
          example: pacs.008
        fatfR16Complete:
          type: boolean
        holdRecommended:
          type: boolean
        notes:
          type: string
    Alert:
      type: object
      properties:
        id:
          type: string
        latencyClass:
          type: string
          description: Design target is seconds-scale alerting, not month-end packs.
        corridor:
          type: string
    ImtoProfile:
      type: object
      properties:
        id:
          type: string
        licenceStatus:
          type: string
        onboardingState:
          type: string
)
