{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/parallel-ai/json-schema/parallel-ai-find-all-candidate-match-status-event-schema.json",
  "title": "FindAllCandidateMatchStatusEvent",
  "description": "Event containing a candidate whose match status has changed.",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/parallel-ai-findall-api-openapi.yml#/components/schemas/FindAllCandidateMatchStatusEvent",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "findall.candidate.generated",
        "findall.candidate.matched",
        "findall.candidate.unmatched",
        "findall.candidate.discarded",
        "findall.candidate.enriched"
      ],
      "title": "Type",
      "description": "Event type; one of findall.candidate.generated, findall.candidate.matched, findall.candidate.unmatched, findall.candidate.discarded, findall.candidate.enriched."
    },
    "timestamp": {
      "type": "string",
      "format": "date-time",
      "title": "Timestamp",
      "description": "Timestamp of the event."
    },
    "event_id": {
      "type": "string",
      "title": "Event Id",
      "description": "Unique event identifier for the event."
    },
    "data": {
      "$ref": "#/$defs/FindAllCandidate",
      "description": "The candidate whose match status has been updated."
    }
  },
  "type": "object",
  "required": [
    "type",
    "timestamp",
    "event_id",
    "data"
  ],
  "$defs": {
    "Citation": {
      "description": "A citation for a task output.",
      "properties": {
        "title": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Title of the citation.",
          "title": "Title"
        },
        "url": {
          "description": "URL of the citation.",
          "title": "Url",
          "type": "string"
        },
        "excerpts": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Excerpts from the citation supporting the output. Only certain processors provide excerpts.",
          "title": "Excerpts"
        }
      },
      "required": [
        "url"
      ],
      "title": "Citation",
      "type": "object"
    },
    "FieldBasis": {
      "description": "Citations and reasoning supporting one field of a task output.",
      "properties": {
        "field": {
          "description": "Name of the output field.",
          "title": "Field",
          "type": "string"
        },
        "citations": {
          "default": [],
          "description": "List of citations supporting the output field.",
          "items": {
            "$ref": "#/$defs/Citation"
          },
          "title": "Citations",
          "type": "array"
        },
        "reasoning": {
          "description": "Reasoning for the output field.",
          "title": "Reasoning",
          "type": "string"
        },
        "confidence": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Confidence level for the output field. Only certain processors provide confidence levels.",
          "title": "Confidence"
        }
      },
      "required": [
        "field",
        "reasoning"
      ],
      "title": "FieldBasis",
      "type": "object"
    },
    "FindAllCandidate": {
      "properties": {
        "candidate_id": {
          "type": "string",
          "title": "Candidate ID",
          "description": "ID of the candidate."
        },
        "name": {
          "type": "string",
          "title": "Name",
          "description": "Name of the candidate."
        },
        "url": {
          "type": "string",
          "title": "Url",
          "description": "URL that provides context or details of the entity for disambiguation."
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Description",
          "description": "Brief description of the entity that can help answer whether entity satisfies the query."
        },
        "match_status": {
          "type": "string",
          "enum": [
            "generated",
            "matched",
            "unmatched",
            "discarded"
          ],
          "title": "Match Status",
          "description": "Status of the candidate. One of generated, matched, unmatched, discarded."
        },
        "output": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Output",
          "description": "Results of the match condition evaluations for this candidate. This object contains the structured output that determines whether the candidate matches the overall FindAll objective."
        },
        "basis": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/FieldBasis"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Basis",
          "description": "List of FieldBasis objects supporting the output."
        }
      },
      "type": "object",
      "required": [
        "candidate_id",
        "name",
        "url",
        "match_status"
      ],
      "title": "FindAllCandidate",
      "description": "Candidate for a find all run that may end up as a match.\n\nContains all the candidate's metadata and the output of the match conditions.\nA candidate is a match if all match conditions are satisfied."
    }
  }
}