{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/certifyos/main/json-schema/certifyos-bulk-withdraw-shared-workflows-request-schema.json",
  "title": "BulkWithdrawSharedWorkflowsRequest",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/certifyos-sharedcredentialingworkflow-api-openapi.yml#/components/schemas/BulkWithdrawSharedWorkflowsRequest",
  "type": "object",
  "properties": {
    "sharedCredentialingWorkflowIds": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The selected groups; mutually exclusive with selectAll."
    },
    "selectAll": {
      "type": "boolean",
      "description": "Act on everything the filters match, rather than a listed selection."
    },
    "filters": {
      "$ref": "#/$defs/SharedWorkflowFilters",
      "type": "object",
      "description": "The listing's filter block; only read when selectAll is true."
    },
    "reason": {
      "type": "string",
      "description": "Free text; the reason for every tenant that has no entry in reasonsByTenantId."
    },
    "reasonsByTenantId": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Optional reason per tenant id. A tenant with a withdrawable member needs a non-blank reason here or in reason when dryRun is false; a key that is not a member tenant of the selected groups is refused. At most 500 entries, each at most 1000 characters."
    }
  },
  "$defs": {
    "LocalDate": {
      "type": "string",
      "format": "date"
    },
    "SharedWorkflowFilters": {
      "type": "object",
      "properties": {
        "firstNameContains": {
          "type": "string"
        },
        "lastNameContains": {
          "type": "string"
        },
        "npi": {
          "type": "string"
        },
        "practitionerTypesToCredential": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "statesToCredential": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "credentialingCycles": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "credentialingStatuses": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "linesOfBusiness": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "analystIds": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "credentialingDueDateFrom": {
          "$ref": "#/$defs/LocalDate"
        },
        "credentialingDueDateTo": {
          "$ref": "#/$defs/LocalDate"
        },
        "createdAtFrom": {
          "$ref": "#/$defs/LocalDate"
        },
        "createdAtTo": {
          "$ref": "#/$defs/LocalDate"
        },
        "psvCompletedFrom": {
          "$ref": "#/$defs/LocalDate"
        },
        "psvCompletedTo": {
          "$ref": "#/$defs/LocalDate"
        },
        "psvReadyFrom": {
          "$ref": "#/$defs/LocalDate"
        },
        "psvReadyTo": {
          "$ref": "#/$defs/LocalDate"
        },
        "credStatusLastUpdatedFrom": {
          "$ref": "#/$defs/LocalDate"
        },
        "credStatusLastUpdatedTo": {
          "$ref": "#/$defs/LocalDate"
        },
        "analystType": {
          "type": "string"
        }
      }
    }
  }
}