{
  "type": "object",
  "properties": {
    "schema_version": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "planned_eligible_samples": {
      "type": "integer",
      "minimum": 0
    },
    "completed_response_count": {
      "type": "integer",
      "minimum": 0
    },
    "captured_legacy_samples": {
      "type": "integer",
      "minimum": 0
    },
    "provisional_eligible_legacy_samples": {
      "type": "integer",
      "minimum": 0
    },
    "metric_usable_entity_sample_count": {
      "type": "integer",
      "minimum": 0
    },
    "metric_usable_citation_sample_count": {
      "type": "integer",
      "minimum": 0
    },
    "customer_deliverable_complete_sample_count": {
      "type": "integer",
      "minimum": 0
    },
    "new_samples_this_revision": {
      "type": "integer",
      "minimum": 0
    },
    "target_cohort_verified": {
      "type": "boolean"
    },
    "full_english_translations": {
      "type": "integer",
      "minimum": 0
    },
    "pending_english_translations": {
      "type": "integer",
      "minimum": 0
    },
    "full_redacted_snapshots": {
      "type": "integer",
      "minimum": 0
    },
    "blocker": {
      "type": "string"
    },
    "schema_reference": {
      "type": "string",
      "format": "uri",
      "pattern": "^https://"
    },
    "schema_note": {
      "type": "string"
    },
    "methodology_reference": {
      "type": "string",
      "format": "uri",
      "pattern": "^https://"
    },
    "canonicalization_notes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "observations": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "platform": {
            "type": "string"
          },
          "prompt": {
            "type": "string"
          },
          "samples": {
            "type": "integer",
            "minimum": 0
          },
          "sample_target": {
            "type": "integer",
            "minimum": 0
          },
          "status": {
            "type": "string"
          },
          "prompt_group": {
            "type": "string"
          },
          "aggregate": {
            "type": "object",
            "properties": {
              "entities": {
                "type": "array",
                "items": {},
                "maxItems": 0
              },
              "citation_domains": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "maxItems": 0
              },
              "citation_denominator": {
                "type": "integer",
                "minimum": 0
              },
              "volatility": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "volatility_valid_sample_count": {
                "type": "integer",
                "minimum": 0
              },
              "volatility_pair_count": {
                "type": "integer",
                "minimum": 0
              },
              "empty_set_pair_count": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "entities",
              "citation_domains",
              "citation_denominator",
              "volatility",
              "volatility_valid_sample_count",
              "volatility_pair_count",
              "empty_set_pair_count"
            ],
            "additionalProperties": false
          },
          "aggregate_status": {
            "type": "string"
          },
          "answer_translated": {
            "type": "string"
          },
          "answer_translation_sample_id": {
            "type": "string"
          },
          "snapshot_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "sample_details": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "sample_id": {
                  "type": "string"
                },
                "platform": {
                  "type": "string"
                },
                "prompt": {
                  "type": "string"
                },
                "prompt_id": {
                  "type": "string"
                },
                "prompt_group": {
                  "type": "string"
                },
                "cohort": {
                  "type": "string"
                },
                "eligible_for_target_cohort": {
                  "type": "boolean"
                },
                "exclusion_reason": {
                  "type": "string"
                },
                "captured_at_utc": {
                  "type": "string",
                  "format": "date-time"
                },
                "submitted_at_utc": {
                  "anyOf": [
                    {
                      "const": ""
                    },
                    {
                      "type": "string",
                      "format": "date-time"
                    }
                  ]
                },
                "account_state": {
                  "type": "string"
                },
                "model_ui": {
                  "type": "string"
                },
                "search_ui": {
                  "type": "string"
                },
                "condition_comparability": {
                  "type": "string"
                },
                "network_geography_verified": {
                  "type": "boolean"
                },
                "network_geography": {
                  "type": "object",
                  "properties": {
                    "public_ip": {
                      "type": "string"
                    },
                    "country": {
                      "type": "string"
                    },
                    "region": {
                      "type": "string"
                    },
                    "city": {
                      "type": "string"
                    },
                    "district": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "isp": {
                      "type": "string"
                    },
                    "location_text": {
                      "type": "string"
                    },
                    "street_address": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "source_url": {
                      "type": "string",
                      "format": "uri",
                      "pattern": "^https://"
                    },
                    "measured_at_utc": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "evidence_saved_at_utc": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "time_basis": {
                      "type": "string"
                    },
                    "observation_scope": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "public_ip",
                    "country",
                    "region",
                    "city",
                    "district",
                    "isp",
                    "location_text",
                    "street_address",
                    "source_url",
                    "measured_at_utc",
                    "evidence_saved_at_utc",
                    "time_basis",
                    "observation_scope"
                  ],
                  "additionalProperties": false
                },
                "conversation_url": {
                  "type": "string",
                  "format": "uri",
                  "pattern": "^https://"
                },
                "answer_original": {
                  "type": "string"
                },
                "answer_original_cleanup": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "answer_translated": {
                  "type": "string"
                },
                "translation_status": {
                  "type": "string"
                },
                "claims_status": {
                  "type": "string"
                },
                "entity_extraction_complete": {
                  "type": "boolean"
                },
                "entity_extraction_scope": {
                  "type": "string"
                },
                "canonical_entity_set": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "ranked_positions": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "entity_mentions": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "canonical": {
                        "type": "string"
                      },
                      "mentioned": {
                        "type": "boolean"
                      },
                      "position": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "position_basis": {
                        "type": "string"
                      },
                      "observed_aliases": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "entity_id": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Unknown until identity sources verified; null is explicit, not a fabricated ID."
                      },
                      "identity_verification": {
                        "type": "string",
                        "enum": [
                          "unverified",
                          "verified"
                        ]
                      },
                      "identity_sources": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "canonical",
                      "mentioned",
                      "position",
                      "position_basis",
                      "observed_aliases",
                      "entity_id",
                      "identity_verification",
                      "identity_sources"
                    ],
                    "additionalProperties": false
                  }
                },
                "target_brand": {
                  "type": "object",
                  "properties": {
                    "canonical": {
                      "type": "string"
                    },
                    "mentioned": {
                      "type": "boolean"
                    },
                    "position": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "excerpt": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "canonical",
                    "mentioned",
                    "position",
                    "excerpt"
                  ],
                  "additionalProperties": false
                },
                "citations": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "urls": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "domains": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "complete": {
                      "type": "boolean"
                    },
                    "scope_note": {
                      "type": "string"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "number": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "title": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string"
                          },
                          "excerpt": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "answer_links": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "start": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "end": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "quote": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "start",
                                "end",
                                "quote"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "number",
                          "title",
                          "url",
                          "excerpt",
                          "answer_links"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "status",
                    "urls",
                    "domains",
                    "complete",
                    "scope_note",
                    "items"
                  ],
                  "additionalProperties": false
                },
                "citation_check_complete": {
                  "type": "boolean"
                },
                "citation_domains": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "snapshot_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "evidence_status": {
                  "type": "string"
                },
                "deliverable_complete": {
                  "type": "boolean"
                },
                "source_record": {
                  "type": "object",
                  "properties": {
                    "legacy_raw_text": {
                      "type": "string"
                    },
                    "legacy_viewport_screenshot": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "legacy_raw_text",
                    "legacy_viewport_screenshot"
                  ],
                  "additionalProperties": false
                },
                "notes": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "screenshots": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "screenshot_id": {
                        "type": "string"
                      },
                      "sample_id": {
                        "type": "string"
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "answer",
                          "citations",
                          "login"
                        ]
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 1
                      },
                      "image_url": {
                        "type": "string",
                        "format": "uri",
                        "pattern": "^https://"
                      },
                      "url_expires_at": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      },
                      "review_status": {
                        "type": "string",
                        "enum": [
                          "reviewed_redacted"
                        ]
                      },
                      "captured_at_utc": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      },
                      "evidence_phase": {
                        "type": "string",
                        "enum": [
                          "collection_session",
                          "post_collection_supplement"
                        ]
                      },
                      "time_basis": {
                        "type": "string"
                      },
                      "saved_at_utc": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      },
                      "login_evidence_scope": {
                        "type": "string",
                        "enum": [
                          "not_a_login_proof",
                          "reopened_original_conversation_current_ui_only"
                        ]
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^[0-9a-f]{64}$"
                      }
                    },
                    "required": [
                      "screenshot_id",
                      "sample_id",
                      "kind",
                      "sequence",
                      "image_url",
                      "url_expires_at",
                      "review_status",
                      "captured_at_utc",
                      "evidence_phase",
                      "time_basis",
                      "saved_at_utc",
                      "login_evidence_scope",
                      "sha256"
                    ],
                    "additionalProperties": false
                  }
                },
                "collection_identity": {
                  "type": "object",
                  "properties": {
                    "logical_slot_id": {
                      "type": "string"
                    },
                    "prompt_version": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "prompt_sha256": {
                      "type": "string",
                      "pattern": "^[0-9a-f]{64}$"
                    },
                    "round_number": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 1
                    },
                    "attempt_id": {
                      "type": "string"
                    },
                    "attempt_number": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 1
                    },
                    "retry_of_attempt_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "outcome": {
                      "type": "string",
                      "enum": [
                        "response_captured",
                        "failed",
                        "pending",
                        "unknown"
                      ]
                    },
                    "failure_code": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        null,
                        "login_required",
                        "captcha",
                        "network_error",
                        "generation_error",
                        "extraction_error",
                        "unknown"
                      ]
                    },
                    "retry_link_status": {
                      "type": "string",
                      "enum": [
                        "historical_chain_not_recorded",
                        "first_attempt",
                        "linked_retry"
                      ]
                    }
                  },
                  "required": [
                    "logical_slot_id",
                    "prompt_version",
                    "prompt_sha256",
                    "round_number",
                    "attempt_id",
                    "attempt_number",
                    "retry_of_attempt_id",
                    "outcome",
                    "failure_code",
                    "retry_link_status"
                  ],
                  "additionalProperties": false
                },
                "acceptance": {
                  "type": "object",
                  "properties": {
                    "state": {
                      "type": "string",
                      "enum": [
                        "incomplete",
                        "accepted",
                        "rejected"
                      ]
                    },
                    "reason_codes": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "submission_time_not_recorded",
                          "legacy_cohort_mapping_unconfirmed",
                          "legacy_citation_status_mapping_unconfirmed",
                          "evidence_incomplete",
                          "rejected_by_review"
                        ]
                      }
                    },
                    "entity_metric_eligible": {
                      "type": "boolean"
                    },
                    "citation_metric_eligible": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "state",
                    "reason_codes",
                    "entity_metric_eligible",
                    "citation_metric_eligible"
                  ],
                  "additionalProperties": false
                },
                "answer_boundary": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "reviewed",
                        "unreviewed"
                      ]
                    },
                    "trailing_ui_excluded": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "note": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "trailing_ui_excluded",
                    "note"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "sample_id",
                "platform",
                "prompt",
                "prompt_id",
                "prompt_group",
                "cohort",
                "eligible_for_target_cohort",
                "exclusion_reason",
                "captured_at_utc",
                "submitted_at_utc",
                "account_state",
                "model_ui",
                "search_ui",
                "condition_comparability",
                "network_geography_verified",
                "network_geography",
                "conversation_url",
                "answer_original",
                "answer_original_cleanup",
                "answer_translated",
                "translation_status",
                "claims_status",
                "entity_extraction_complete",
                "entity_extraction_scope",
                "canonical_entity_set",
                "ranked_positions",
                "entity_mentions",
                "target_brand",
                "citations",
                "citation_check_complete",
                "citation_domains",
                "snapshot_id",
                "evidence_status",
                "deliverable_complete",
                "source_record",
                "notes",
                "screenshots",
                "collection_identity",
                "acceptance",
                "answer_boundary"
              ],
              "additionalProperties": false
            }
          },
          "excluded_exploratory_sample_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "remaining_target_samples": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "platform",
          "prompt",
          "samples",
          "sample_target",
          "status",
          "prompt_group",
          "aggregate",
          "aggregate_status",
          "answer_translated",
          "answer_translation_sample_id",
          "snapshot_id",
          "sample_details",
          "excluded_exploratory_sample_ids",
          "remaining_target_samples"
        ],
        "additionalProperties": false
      }
    },
    "delivery_contract_version": {
      "type": "string",
      "enum": [
        "1.0.0"
      ]
    },
    "delivery_context": {
      "type": "object",
      "properties": {
        "organization_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "batch_id": {
          "type": "string"
        },
        "collection_month": {
          "type": "string",
          "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])$"
        },
        "reporting_month": {
          "type": [
            "string",
            "null"
          ],
          "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])$"
        },
        "monthly_target_samples": {
          "type": "integer",
          "minimum": 0
        },
        "monthly_target_basis": {
          "type": "string",
          "enum": [
            "planning_requirement_not_this_batch_size"
          ]
        },
        "channel": {
          "type": "string",
          "enum": [
            "web"
          ]
        },
        "run_id": {
          "type": "string"
        },
        "retry_history_complete": {
          "type": "boolean"
        }
      },
      "required": [
        "organization_id",
        "batch_id",
        "collection_month",
        "reporting_month",
        "monthly_target_samples",
        "monthly_target_basis",
        "channel",
        "run_id",
        "retry_history_complete"
      ],
      "additionalProperties": false
    },
    "screenshot_access_policy": {
      "type": "object",
      "properties": {
        "access": {
          "type": "string",
          "enum": [
            "public_unauthenticated_https"
          ]
        },
        "automatic_expiry_configured": {
          "type": "boolean"
        },
        "retention_until_utc": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "minimum_retention_days": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0
        },
        "retention_commitment": {
          "type": "string",
          "enum": [
            "not_agreed"
          ]
        },
        "availability_guarantee": {
          "type": "string",
          "enum": [
            "not_agreed"
          ]
        }
      },
      "required": [
        "access",
        "automatic_expiry_configured",
        "retention_until_utc",
        "minimum_retention_days",
        "retention_commitment",
        "availability_guarantee"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "schema_version",
    "status",
    "planned_eligible_samples",
    "completed_response_count",
    "captured_legacy_samples",
    "provisional_eligible_legacy_samples",
    "metric_usable_entity_sample_count",
    "metric_usable_citation_sample_count",
    "customer_deliverable_complete_sample_count",
    "new_samples_this_revision",
    "target_cohort_verified",
    "full_english_translations",
    "pending_english_translations",
    "full_redacted_snapshots",
    "blocker",
    "schema_reference",
    "schema_note",
    "methodology_reference",
    "canonicalization_notes",
    "observations",
    "delivery_contract_version",
    "delivery_context",
    "screenshot_access_policy"
  ],
  "additionalProperties": false,
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.querentdata.com/schema/contract-1.0.0.json",
  "title": "Querent additive delivery profile 1.0.0",
  "description": "Current partial delivery profile. Legacy status mappings remain unresolved; structural validity is not acceptance. Aggregates disabled in this version."
}
