{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/certifyos/main/json-schema/certifyos-shared-credentialing-run-response-schema.json",
  "title": "SharedCredentialingRunResponse",
  "description": "One shared credentialing run.",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/certifyos-sharedcredentialingworkflow-api-openapi.yml#/components/schemas/SharedCredentialingRunResponse",
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "anchorGroupId": {
      "type": "string"
    },
    "anchorGroupPractitionerId": {
      "type": "string",
      "description": "The anchor group practitioner this run belongs to."
    },
    "status": {
      "type": "string",
      "description": "The derived shared status. Seven persisted values; Closed is display-only."
    },
    "active": {
      "type": "boolean",
      "description": "Whether the run is still open to new joins."
    },
    "credentialingCycle": {
      "type": "string"
    },
    "mixedComposition": {
      "type": "boolean",
      "description": "True when the members disagree about the cycle."
    },
    "statesToCredential": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "practitionerTypesToCredential": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "linesOfBusiness": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "credentialingDueDate": {
      "$ref": "#/$defs/LocalDate",
      "type": "string",
      "description": "Earliest recredentialing date across the non-terminal members."
    },
    "openMemberCount": {
      "type": "integer",
      "format": "int64",
      "description": "Members still open, as the rollup counted them."
    },
    "firstPsvCompleteAt": {
      "$ref": "#/$defs/Instant",
      "type": "string",
      "description": "When the first member reached PSV Complete. Write-once: it latches on the first member to get there and is never moved by a later one."
    },
    "nextCredentialingDate": {
      "$ref": "#/$defs/LocalDate",
      "type": "string",
      "description": "The next credentialing date for the run."
    },
    "previousCredentialingDate": {
      "$ref": "#/$defs/LocalDate",
      "type": "string",
      "description": "The previous credentialing date for the run."
    },
    "syncedAt": {
      "$ref": "#/$defs/Instant",
      "type": "string",
      "description": "When the rollups were last derived."
    }
  },
  "$defs": {
    "Instant": {
      "type": "string",
      "format": "date-time"
    },
    "LocalDate": {
      "type": "string",
      "format": "date"
    }
  }
}