{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "/schemas/3.1.0-rc.4/media-buy/provide-performance-feedback-response.json",
  "title": "Provide Performance Feedback Response",
  "description": "Response payload for provide_performance_feedback task. Returns either success confirmation OR error information, never both.",
  "type": "object",
  "allOf": [
    {
      "$ref": "/schemas/3.1.0-rc.4/core/version-envelope.json"
    },
    {
      "$ref": "/schemas/3.1.0-rc.4/core/protocol-envelope.json"
    }
  ],
  "oneOf": [
    {
      "title": "ProvidePerformanceFeedbackSuccess",
      "description": "Success response - feedback received and processed",
      "type": "object",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "Whether the performance feedback was successfully received",
          "const": true
        },
        "sandbox": {
          "type": "boolean",
          "description": "When true, this response contains simulated data from sandbox mode."
        },
        "context": {
          "$ref": "/schemas/3.1.0-rc.4/core/context.json"
        },
        "ext": {
          "$ref": "/schemas/3.1.0-rc.4/core/ext.json"
        }
      },
      "required": [
        "success"
      ],
      "additionalProperties": true,
      "not": {
        "required": [
          "errors"
        ]
      }
    },
    {
      "title": "ProvidePerformanceFeedbackError",
      "description": "Error response - feedback rejected or could not be processed",
      "type": "object",
      "properties": {
        "errors": {
          "type": "array",
          "description": "Array of errors explaining why feedback was rejected (e.g., invalid measurement period, missing campaign data)",
          "items": {
            "$ref": "/schemas/3.1.0-rc.4/core/error.json"
          },
          "minItems": 1
        },
        "context": {
          "$ref": "/schemas/3.1.0-rc.4/core/context.json"
        },
        "ext": {
          "$ref": "/schemas/3.1.0-rc.4/core/ext.json"
        }
      },
      "required": [
        "errors"
      ],
      "additionalProperties": true,
      "not": {
        "anyOf": [
          {
            "required": [
              "success"
            ]
          },
          {
            "required": [
              "sandbox"
            ]
          }
        ]
      }
    }
  ],
  "properties": {}
}
