{
  "openapi": "3.1.0",
  "info": {
    "title": "OHN-06 Health Worker Registry",
    "version": "1.1.0",
    "description": "Base path /api/ohn/v1. Every POST requires Idempotency-Key; mutations use expected_version. Routes default-deny on role AND purpose (practitioner_registry for staff, practitioner_standing for the standing_reader service role). Deployment note: in the Java registries-trust service this module is served under the alias prefix /api/ohn/x/ohn-06 (OHN-05 owns /api/ohn/v1/registry/*), as the TypeScript platform did. Manual licence confirmation (1.1.0, owner decision 2026-11-30, mirroring OHN-05 1.4.0): while no professional-council (issuer) integration is configured, a credential_reviewer records the council's confirmation_reference on the licence decision; the licence is recorded as confirmation unconfirmed_manual (\"manually confirmed\") and the licence and practitioner views carry license_confirmation {method issuer|manual|none, label, reference, confirmed_by, confirmed_at}."
  },
  "servers": [
    {
      "url": "/api/ohn/v1"
    }
  ],
  "paths": {
    "/practitioners": {
      "post": {
        "operationId": "enrollPractitioner",
        "summary": "Enroll a practitioner (API-001; F001)",
        "tags": [
          "OHN-06"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request / missing Idempotency-Key"
          },
          "401": {
            "description": "Unauthenticated"
          },
          "403": {
            "description": "Role/purpose denied (default deny) or domain denial (separation of duties, role required)"
          },
          "404": {
            "description": "Not found / out of scope (non-disclosing)"
          },
          "409": {
            "description": "Version conflict, illegal transition or idempotency mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation or domain refusal (code list not configured, issuer match required, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Dependency unavailable; nothing stored"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Enroll"
              }
            }
          }
        }
      },
      "get": {
        "operationId": "listPractitioners",
        "summary": "get /practitioners",
        "tags": [
          "OHN-06"
        ],
        "parameters": [
          {
            "name": "profession",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 64
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 32
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "facility",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "open",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 64
            }
          }
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request / missing Idempotency-Key"
          },
          "401": {
            "description": "Unauthenticated"
          },
          "403": {
            "description": "Role/purpose denied (default deny) or domain denial (separation of duties, role required)"
          },
          "404": {
            "description": "Not found / out of scope (non-disclosing)"
          },
          "409": {
            "description": "Version conflict, illegal transition or idempotency mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation or domain refusal (code list not configured, issuer match required, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Dependency unavailable; nothing stored"
          }
        }
      }
    },
    "/practitioners/{id}": {
      "get": {
        "operationId": "getPractitioner",
        "summary": "Read a practitioner with licences, affiliations, suspensions, checks and history (API-002)",
        "tags": [
          "OHN-06"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request / missing Idempotency-Key"
          },
          "401": {
            "description": "Unauthenticated"
          },
          "403": {
            "description": "Role/purpose denied (default deny) or domain denial (separation of duties, role required)"
          },
          "404": {
            "description": "Not found / out of scope (non-disclosing)"
          },
          "409": {
            "description": "Version conflict, illegal transition or idempotency mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation or domain refusal (code list not configured, issuer match required, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Dependency unavailable; nothing stored"
          }
        }
      }
    },
    "/practitioners/{id}/issuer-check": {
      "post": {
        "operationId": "issuerCheck",
        "summary": "post /practitioners/{id}/issuer-check",
        "tags": [
          "OHN-06"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request / missing Idempotency-Key"
          },
          "401": {
            "description": "Unauthenticated"
          },
          "403": {
            "description": "Role/purpose denied (default deny) or domain denial (separation of duties, role required)"
          },
          "404": {
            "description": "Not found / out of scope (non-disclosing)"
          },
          "409": {
            "description": "Version conflict, illegal transition or idempotency mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation or domain refusal (code list not configured, issuer match required, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Dependency unavailable; nothing stored"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExpectedVersion"
              }
            }
          }
        }
      }
    },
    "/practitioners/{id}/licenses": {
      "post": {
        "operationId": "decideLicense",
        "summary": "Record a licence verification decision (API-003; F002)",
        "tags": [
          "OHN-06"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request / missing Idempotency-Key"
          },
          "401": {
            "description": "Unauthenticated"
          },
          "403": {
            "description": "Role/purpose denied (default deny) or domain denial (separation of duties, role required)"
          },
          "404": {
            "description": "Not found / out of scope (non-disclosing)"
          },
          "409": {
            "description": "Version conflict, illegal transition or idempotency mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation or domain refusal (code list not configured, issuer match required, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Dependency unavailable; nothing stored"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LicenseDecision"
              }
            }
          }
        },
        "description": "1.1.0: manual licence confirmation (confirmation_reference) while no issuer integration exists; the licence view carries confirmation and license_confirmation {method issuer|manual|none, label, reference, confirmed_by, confirmed_at}, and the practitioner view carries the license_confirmation of its latest licence decision."
      }
    },
    "/practitioners/{id}/affiliations": {
      "post": {
        "operationId": "requestAffiliation",
        "summary": "Request an affiliation (F003)",
        "tags": [
          "OHN-06"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request / missing Idempotency-Key"
          },
          "401": {
            "description": "Unauthenticated"
          },
          "403": {
            "description": "Role/purpose denied (default deny) or domain denial (separation of duties, role required)"
          },
          "404": {
            "description": "Not found / out of scope (non-disclosing)"
          },
          "409": {
            "description": "Version conflict, illegal transition or idempotency mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation or domain refusal (code list not configured, issuer match required, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Dependency unavailable; nothing stored"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AffiliationRequest"
              }
            }
          }
        }
      }
    },
    "/practitioners/{id}/suspensions": {
      "post": {
        "operationId": "imposeSuspension",
        "summary": "Suspend a practitioner (F004; W003)",
        "tags": [
          "OHN-06"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request / missing Idempotency-Key"
          },
          "401": {
            "description": "Unauthenticated"
          },
          "403": {
            "description": "Role/purpose denied (default deny) or domain denial (separation of duties, role required)"
          },
          "404": {
            "description": "Not found / out of scope (non-disclosing)"
          },
          "409": {
            "description": "Version conflict, illegal transition or idempotency mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation or domain refusal (code list not configured, issuer match required, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Dependency unavailable; nothing stored"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Suspension"
              }
            }
          }
        }
      }
    },
    "/affiliations": {
      "get": {
        "operationId": "listAffiliations",
        "summary": "get /affiliations",
        "tags": [
          "OHN-06"
        ],
        "parameters": [
          {
            "name": "profession",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 64
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 32
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "facility",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "open",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 64
            }
          }
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request / missing Idempotency-Key"
          },
          "401": {
            "description": "Unauthenticated"
          },
          "403": {
            "description": "Role/purpose denied (default deny) or domain denial (separation of duties, role required)"
          },
          "404": {
            "description": "Not found / out of scope (non-disclosing)"
          },
          "409": {
            "description": "Version conflict, illegal transition or idempotency mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation or domain refusal (code list not configured, issuer match required, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Dependency unavailable; nothing stored"
          }
        }
      }
    },
    "/affiliations/{id}/approve": {
      "post": {
        "operationId": "approveAffiliation",
        "summary": "Approve or activate an affiliation (API-004; F003 second half)",
        "tags": [
          "OHN-06"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request / missing Idempotency-Key"
          },
          "401": {
            "description": "Unauthenticated"
          },
          "403": {
            "description": "Role/purpose denied (default deny) or domain denial (separation of duties, role required)"
          },
          "404": {
            "description": "Not found / out of scope (non-disclosing)"
          },
          "409": {
            "description": "Version conflict, illegal transition or idempotency mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation or domain refusal (code list not configured, issuer match required, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Dependency unavailable; nothing stored"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OptionalReasonStep"
              }
            }
          }
        }
      }
    },
    "/affiliations/{id}/end": {
      "post": {
        "operationId": "endAffiliation",
        "summary": "post /affiliations/{id}/end",
        "tags": [
          "OHN-06"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request / missing Idempotency-Key"
          },
          "401": {
            "description": "Unauthenticated"
          },
          "403": {
            "description": "Role/purpose denied (default deny) or domain denial (separation of duties, role required)"
          },
          "404": {
            "description": "Not found / out of scope (non-disclosing)"
          },
          "409": {
            "description": "Version conflict, illegal transition or idempotency mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation or domain refusal (code list not configured, issuer match required, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Dependency unavailable; nothing stored"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReasonedStep"
              }
            }
          }
        }
      }
    },
    "/suspensions": {
      "get": {
        "operationId": "listSuspensions",
        "summary": "get /suspensions",
        "tags": [
          "OHN-06"
        ],
        "parameters": [
          {
            "name": "profession",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 64
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 32
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "facility",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "open",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 64
            }
          }
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request / missing Idempotency-Key"
          },
          "401": {
            "description": "Unauthenticated"
          },
          "403": {
            "description": "Role/purpose denied (default deny) or domain denial (separation of duties, role required)"
          },
          "404": {
            "description": "Not found / out of scope (non-disclosing)"
          },
          "409": {
            "description": "Version conflict, illegal transition or idempotency mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation or domain refusal (code list not configured, issuer match required, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Dependency unavailable; nothing stored"
          }
        }
      }
    },
    "/suspensions/{id}/acknowledge": {
      "post": {
        "operationId": "acknowledgeSuspension",
        "summary": "post /suspensions/{id}/acknowledge",
        "tags": [
          "OHN-06"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request / missing Idempotency-Key"
          },
          "401": {
            "description": "Unauthenticated"
          },
          "403": {
            "description": "Role/purpose denied (default deny) or domain denial (separation of duties, role required)"
          },
          "404": {
            "description": "Not found / out of scope (non-disclosing)"
          },
          "409": {
            "description": "Version conflict, illegal transition or idempotency mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation or domain refusal (code list not configured, issuer match required, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Dependency unavailable; nothing stored"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OptionalReasonStep"
              }
            }
          }
        }
      }
    },
    "/suspensions/{id}/lift": {
      "post": {
        "operationId": "liftSuspension",
        "summary": "post /suspensions/{id}/lift",
        "tags": [
          "OHN-06"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request / missing Idempotency-Key"
          },
          "401": {
            "description": "Unauthenticated"
          },
          "403": {
            "description": "Role/purpose denied (default deny) or domain denial (separation of duties, role required)"
          },
          "404": {
            "description": "Not found / out of scope (non-disclosing)"
          },
          "409": {
            "description": "Version conflict, illegal transition or idempotency mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation or domain refusal (code list not configured, issuer match required, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Dependency unavailable; nothing stored"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReasonedStep"
              }
            }
          }
        }
      }
    },
    "/suspensions/{id}/revoke-sessions": {
      "post": {
        "operationId": "revokeSessions",
        "summary": "post /suspensions/{id}/revoke-sessions",
        "tags": [
          "OHN-06"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request / missing Idempotency-Key"
          },
          "401": {
            "description": "Unauthenticated"
          },
          "403": {
            "description": "Role/purpose denied (default deny) or domain denial (separation of duties, role required)"
          },
          "404": {
            "description": "Not found / out of scope (non-disclosing)"
          },
          "409": {
            "description": "Version conflict, illegal transition or idempotency mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation or domain refusal (code list not configured, issuer match required, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Dependency unavailable; nothing stored"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OptionalReasonStep"
              }
            }
          }
        }
      }
    },
    "/health-workers/{id}/standing": {
      "get": {
        "operationId": "standing",
        "summary": "Standing contract for OHN-17 / OHN-32: licence, membership and affiliation, computed live; non-disclosing 404",
        "tags": [
          "OHN-06"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jurisdiction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "facility",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "See components.schemas.Standing for the documented shape."
                }
              }
            }
          },
          "400": {
            "description": "Malformed request / missing Idempotency-Key"
          },
          "401": {
            "description": "Unauthenticated"
          },
          "403": {
            "description": "Role/purpose denied (default deny) or domain denial (separation of duties, role required)"
          },
          "404": {
            "description": "Not found / out of scope (non-disclosing)"
          },
          "409": {
            "description": "Version conflict, illegal transition or idempotency mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation or domain refusal (code list not configured, issuer match required, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Dependency unavailable; nothing stored"
          }
        }
      }
    },
    "/registry/policy": {
      "get": {
        "operationId": "readPolicy",
        "summary": "get /registry/policy",
        "tags": [
          "OHN-06"
        ],
        "parameters": [],
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request / missing Idempotency-Key"
          },
          "401": {
            "description": "Unauthenticated"
          },
          "403": {
            "description": "Role/purpose denied (default deny) or domain denial (separation of duties, role required)"
          },
          "404": {
            "description": "Not found / out of scope (non-disclosing)"
          },
          "409": {
            "description": "Version conflict, illegal transition or idempotency mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation or domain refusal (code list not configured, issuer match required, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Dependency unavailable; nothing stored"
          }
        }
      },
      "post": {
        "operationId": "writePolicy",
        "summary": "post /registry/policy",
        "tags": [
          "OHN-06"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request / missing Idempotency-Key"
          },
          "401": {
            "description": "Unauthenticated"
          },
          "403": {
            "description": "Role/purpose denied (default deny) or domain denial (separation of duties, role required)"
          },
          "404": {
            "description": "Not found / out of scope (non-disclosing)"
          },
          "409": {
            "description": "Version conflict, illegal transition or idempotency mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation or domain refusal (code list not configured, issuer match required, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Dependency unavailable; nothing stored"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Policy"
              }
            }
          }
        }
      }
    },
    "/registry/code-lists": {
      "get": {
        "operationId": "readCodeLists",
        "summary": "get /registry/code-lists",
        "tags": [
          "OHN-06"
        ],
        "parameters": [],
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request / missing Idempotency-Key"
          },
          "401": {
            "description": "Unauthenticated"
          },
          "403": {
            "description": "Role/purpose denied (default deny) or domain denial (separation of duties, role required)"
          },
          "404": {
            "description": "Not found / out of scope (non-disclosing)"
          },
          "409": {
            "description": "Version conflict, illegal transition or idempotency mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation or domain refusal (code list not configured, issuer match required, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Dependency unavailable; nothing stored"
          }
        }
      }
    },
    "/registry/code-lists/{list}": {
      "post": {
        "operationId": "writeCodeList",
        "summary": "post /registry/code-lists/{list}",
        "tags": [
          "OHN-06"
        ],
        "parameters": [
          {
            "name": "list",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request / missing Idempotency-Key"
          },
          "401": {
            "description": "Unauthenticated"
          },
          "403": {
            "description": "Role/purpose denied (default deny) or domain denial (separation of duties, role required)"
          },
          "404": {
            "description": "Not found / out of scope (non-disclosing)"
          },
          "409": {
            "description": "Version conflict, illegal transition or idempotency mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation or domain refusal (code list not configured, issuer match required, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Dependency unavailable; nothing stored"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CodeList"
              }
            }
          }
        }
      }
    },
    "/registry/expiry-alerts": {
      "get": {
        "operationId": "expiryAlerts",
        "summary": "get /registry/expiry-alerts",
        "tags": [
          "OHN-06"
        ],
        "parameters": [
          {
            "name": "window_days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 365
            }
          }
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request / missing Idempotency-Key"
          },
          "401": {
            "description": "Unauthenticated"
          },
          "403": {
            "description": "Role/purpose denied (default deny) or domain denial (separation of duties, role required)"
          },
          "404": {
            "description": "Not found / out of scope (non-disclosing)"
          },
          "409": {
            "description": "Version conflict, illegal transition or idempotency mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation or domain refusal (code list not configured, issuer match required, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Dependency unavailable; nothing stored"
          }
        }
      }
    },
    "/registry/issuer-health": {
      "get": {
        "operationId": "issuerHealth",
        "summary": "get /registry/issuer-health",
        "tags": [
          "OHN-06"
        ],
        "parameters": [],
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request / missing Idempotency-Key"
          },
          "401": {
            "description": "Unauthenticated"
          },
          "403": {
            "description": "Role/purpose denied (default deny) or domain denial (separation of duties, role required)"
          },
          "404": {
            "description": "Not found / out of scope (non-disclosing)"
          },
          "409": {
            "description": "Version conflict, illegal transition or idempotency mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation or domain refusal (code list not configured, issuer match required, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Dependency unavailable; nothing stored"
          }
        }
      }
    },
    "/registry/maintenance/expire-sweep": {
      "post": {
        "operationId": "expireSweep",
        "summary": "post /registry/maintenance/expire-sweep",
        "tags": [
          "OHN-06"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request / missing Idempotency-Key"
          },
          "401": {
            "description": "Unauthenticated"
          },
          "403": {
            "description": "Role/purpose denied (default deny) or domain denial (separation of duties, role required)"
          },
          "404": {
            "description": "Not found / out of scope (non-disclosing)"
          },
          "409": {
            "description": "Version conflict, illegal transition or idempotency mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation or domain refusal (code list not configured, issuer match required, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Dependency unavailable; nothing stored"
          }
        }
      }
    },
    "/registry/maintenance/drain-outbox": {
      "post": {
        "operationId": "drainOutbox",
        "summary": "post /registry/maintenance/drain-outbox",
        "tags": [
          "OHN-06"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request / missing Idempotency-Key"
          },
          "401": {
            "description": "Unauthenticated"
          },
          "403": {
            "description": "Role/purpose denied (default deny) or domain denial (separation of duties, role required)"
          },
          "404": {
            "description": "Not found / out of scope (non-disclosing)"
          },
          "409": {
            "description": "Version conflict, illegal transition or idempotency mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation or domain refusal (code list not configured, issuer match required, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Dependency unavailable; nothing stored"
          }
        }
      }
    },
    "/registry/report-catalog": {
      "get": {
        "operationId": "reportCatalog",
        "summary": "get /registry/report-catalog",
        "tags": [
          "OHN-06"
        ],
        "parameters": [],
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request / missing Idempotency-Key"
          },
          "401": {
            "description": "Unauthenticated"
          },
          "403": {
            "description": "Role/purpose denied (default deny) or domain denial (separation of duties, role required)"
          },
          "404": {
            "description": "Not found / out of scope (non-disclosing)"
          },
          "409": {
            "description": "Version conflict, illegal transition or idempotency mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation or domain refusal (code list not configured, issuer match required, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Dependency unavailable; nothing stored"
          }
        }
      }
    },
    "/registry/reports/{reportId}": {
      "get": {
        "operationId": "runReport",
        "summary": "get /registry/reports/{reportId}",
        "tags": [
          "OHN-06"
        ],
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "profession",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "facility",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expiry_window",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request / missing Idempotency-Key"
          },
          "401": {
            "description": "Unauthenticated"
          },
          "403": {
            "description": "Role/purpose denied (default deny) or domain denial (separation of duties, role required)"
          },
          "404": {
            "description": "Not found / out of scope (non-disclosing)"
          },
          "409": {
            "description": "Version conflict, illegal transition or idempotency mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation or domain refusal (code list not configured, issuer match required, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Dependency unavailable; nothing stored"
          }
        }
      }
    },
    "/registry/reports/{reportId}/export": {
      "post": {
        "operationId": "createExport",
        "summary": "post /registry/reports/{reportId}/export",
        "tags": [
          "OHN-06"
        ],
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request / missing Idempotency-Key"
          },
          "401": {
            "description": "Unauthenticated"
          },
          "403": {
            "description": "Role/purpose denied (default deny) or domain denial (separation of duties, role required)"
          },
          "404": {
            "description": "Not found / out of scope (non-disclosing)"
          },
          "409": {
            "description": "Version conflict, illegal transition or idempotency mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation or domain refusal (code list not configured, issuer match required, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Dependency unavailable; nothing stored"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExportCommand"
              }
            }
          }
        }
      }
    },
    "/registry/exports/{token}": {
      "get": {
        "operationId": "fetchExport",
        "summary": "get /registry/exports/{token}",
        "tags": [
          "OHN-06"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request / missing Idempotency-Key"
          },
          "401": {
            "description": "Unauthenticated"
          },
          "403": {
            "description": "Role/purpose denied (default deny) or domain denial (separation of duties, role required)"
          },
          "404": {
            "description": "Not found / out of scope (non-disclosing)"
          },
          "409": {
            "description": "Version conflict, illegal transition or idempotency mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation or domain refusal (code list not configured, issuer match required, ...)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Dependency unavailable; nothing stored"
          },
          "410": {
            "description": "Export expired or already downloaded (single use)"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "details": {}
        }
      },
      "Receipt": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "receipt_id"
        ],
        "properties": {
          "receipt_id": {
            "type": "string",
            "format": "uuid"
          },
          "committed_at": {
            "type": "string",
            "format": "date-time"
          },
          "aggregate_id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer"
          },
          "status": {
            "enum": [
              "committed",
              "denied"
            ]
          }
        }
      },
      "Enroll": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "legal_name",
          "profession",
          "license_number",
          "licensing_body",
          "expiry_date",
          "evidence"
        ],
        "properties": {
          "legal_name": {
            "type": "string",
            "maxLength": 512
          },
          "profession": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_]{0,63}$"
          },
          "license_number": {
            "type": "string",
            "maxLength": 512
          },
          "licensing_body": {
            "type": "string",
            "format": "uuid"
          },
          "expiry_date": {
            "type": "string",
            "format": "date"
          },
          "evidence": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "ExpectedVersion": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "expected_version"
        ],
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 1
          }
        }
      },
      "LicenseDecision": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "credential_ref",
          "issuer_response",
          "verification_method",
          "decision",
          "reviewer",
          "expected_version"
        ],
        "properties": {
          "credential_ref": {
            "type": "string",
            "format": "uuid"
          },
          "issuer_response": {
            "type": "string",
            "maxLength": 8192
          },
          "verification_method": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_]{0,63}$"
          },
          "decision": {
            "enum": [
              "verified",
              "rejected"
            ]
          },
          "reviewer": {
            "type": "string",
            "format": "uuid"
          },
          "expected_version": {
            "type": "integer",
            "minimum": 1
          },
          "confirmation_reference": {
            "type": "string",
            "minLength": 3,
            "maxLength": 128,
            "description": "1.1.0 (owner decision 2026-11-30): the professional council's confirmation reference an OHN-06 credential reviewer obtained. While no issuer integration is configured, it stands for the issuer check: the decision may be made from license_state submitted or issuer_pending, the licence is recorded as confirmation unconfirmed_manual (\"manually confirmed\") with the reviewer and the time, and audited. Only a credential_reviewer may give it (403 manual_confirmation_reviewer_only), never the person who enrolled the practitioner nor anyone of the enrolling organisation (403 separation_of_duties). Without it, and no issuer integration, the request answers 503 dependency_unavailable. Once an issuer integration is configured, the issuer decides and a reference is no substitute."
          }
        }
      },
      "AffiliationRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "facility_id",
          "role",
          "start_date",
          "approval_evidence"
        ],
        "properties": {
          "facility_id": {
            "type": "string",
            "format": "uuid"
          },
          "role": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_]{0,63}$"
          },
          "start_date": {
            "type": "string",
            "format": "date"
          },
          "end_date": {
            "type": "string",
            "format": "date"
          },
          "approval_evidence": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "ReasonedStep": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "expected_version",
          "reason"
        ],
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 1
          },
          "reason": {
            "type": "string",
            "minLength": 10,
            "maxLength": 4096
          }
        }
      },
      "Suspension": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "reason",
          "effective_at",
          "issuing_authority",
          "reviewer"
        ],
        "properties": {
          "reason": {
            "type": "string",
            "minLength": 10,
            "maxLength": 4096
          },
          "effective_at": {
            "type": "string",
            "format": "date-time"
          },
          "issuing_authority": {
            "type": "string",
            "format": "uuid"
          },
          "reviewer": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "Policy": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "approval_reference"
        ],
        "properties": {
          "expiry_warning_days": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "maximum": 365
          },
          "issuer_stale_hours": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1
          },
          "approval_reference": {
            "type": "string",
            "minLength": 3
          }
        }
      },
      "CodeList": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "entries"
        ],
        "properties": {
          "entries": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "code",
                "label_en",
                "label_fr"
              ],
              "properties": {
                "code": {
                  "type": "string",
                  "pattern": "^[a-z][a-z0-9_]{0,63}$"
                },
                "label_en": {
                  "type": "string"
                },
                "label_fr": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "ExportCommand": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "format"
        ],
        "properties": {
          "format": {
            "enum": [
              "csv",
              "pdf"
            ]
          },
          "filters": {
            "type": "object"
          }
        }
      },
      "Standing": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "license_active",
          "membership_active",
          "affiliated"
        ],
        "properties": {
          "practitioner_id": {
            "type": "string",
            "format": "uuid"
          },
          "license_active": {
            "type": "boolean"
          },
          "membership_active": {
            "type": "boolean"
          },
          "affiliated": {
            "type": "boolean"
          },
          "suspended": {
            "type": "boolean"
          },
          "expiry_date": {
            "type": "string",
            "format": "date"
          },
          "profession": {
            "type": "string"
          },
          "reason_codes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "as_of": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "OptionalReasonStep": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "expected_version"
        ],
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 1
          },
          "reason": {
            "type": "string",
            "minLength": 10,
            "maxLength": 4096
          }
        }
      }
    }
  }
}
