{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "/schemas/3.1.0-rc.4/brand/verify-brand-claim-response.json",
  "title": "Verify Brand Claim Response",
  "description": "The brand-agent's authoritative answer to a verification claim. Always returns claim_type + verification_status; richer per-claim-type fields ride on the `details` object (shape varies by claim_type — see the task page).",
  "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": "VerifyBrandClaimSuccess",
      "type": "object",
      "properties": {
        "claim_type": {
          "type": "string",
          "enum": [
            "subsidiary",
            "parent",
            "property",
            "trademark"
          ],
          "description": "Echoes the request's claim_type for caller-side routing."
        },
        "verification_status": {
          "$ref": "/schemas/3.1.0-rc.4/brand/verification-status.json",
          "description": "Verification status. Not every status applies to every claim_type — see the task page for the applicable subset. Renamed from `status` in 3.1 to free the top-level `status` key for the envelope task-status (TaskStatus) under MCP flat-on-the-wire serialization (#4878)."
        },
        "details": {
          "type": "object",
          "description": "Per-claim-type response fields. Shape varies — see the task page for each claim_type's expected fields. Examples: subsidiary returns brand_id + first_observed_by_house_at + expected_resolution_window_days; parent returns house_domain; property returns relationship + regions + use_case_authorization; trademark returns matched_registration + licensor_domain + countries + nice_classes + use_case_authorization.",
          "additionalProperties": true
        },
        "context_note": {
          "type": "string",
          "maxLength": 500,
          "description": "Public — free-text context the brand chooses to surface. For disputed/transferring, typically carries the rationale or transition details."
        },
        "context": {
          "$ref": "/schemas/3.1.0-rc.4/core/context.json"
        },
        "signed_response": {
          "$ref": "#/definitions/signed_response",
          "description": "Payload-envelope JWS attesting the canonical success response for verify_brand_claim. The signed payload response MUST match the unsigned task-body fields on this response, excluding signed_response and protocol/version envelope fields."
        },
        "ext": {
          "$ref": "/schemas/3.1.0-rc.4/core/ext.json"
        }
      },
      "required": [
        "claim_type",
        "verification_status",
        "signed_response"
      ],
      "additionalProperties": true,
      "not": {
        "anyOf": [
          {
            "required": [
              "errors"
            ]
          }
        ]
      }
    },
    {
      "title": "VerifyBrandClaimError",
      "type": "object",
      "properties": {
        "errors": {
          "type": "array",
          "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": [
              "verification_status"
            ]
          },
          {
            "required": [
              "claim_type"
            ]
          }
        ]
      }
    }
  ],
  "properties": {},
  "definitions": {
    "signed_response": {
      "allOf": [
        {
          "$ref": "/schemas/3.1.0-rc.4/core/response-payload-jws-envelope.json"
        },
        {
          "type": "object",
          "properties": {
            "payload": {
              "type": "object",
              "properties": {
                "task": {
                  "type": "string",
                  "const": "verify_brand_claim"
                },
                "response": {
                  "$ref": "#/definitions/signed_success_payload"
                }
              },
              "required": [
                "task",
                "response"
              ]
            }
          }
        }
      ]
    },
    "signed_success_payload": {
      "type": "object",
      "description": "Canonical task-body success payload signed inside signed_response.payload.response. Excludes protocol/version envelope fields and signed_response itself.",
      "properties": {
        "claim_type": {
          "type": "string",
          "enum": [
            "subsidiary",
            "parent",
            "property",
            "trademark"
          ]
        },
        "verification_status": {
          "$ref": "/schemas/3.1.0-rc.4/brand/verification-status.json"
        },
        "details": {
          "type": "object",
          "additionalProperties": true
        },
        "context_note": {
          "type": "string",
          "maxLength": 500
        },
        "context": {
          "$ref": "/schemas/3.1.0-rc.4/core/context.json"
        },
        "ext": {
          "$ref": "/schemas/3.1.0-rc.4/core/ext.json"
        }
      },
      "required": [
        "claim_type",
        "verification_status"
      ],
      "additionalProperties": true,
      "not": {
        "anyOf": [
          {
            "required": [
              "errors"
            ]
          },
          {
            "required": [
              "signed_response"
            ]
          }
        ]
      }
    }
  }
}
