{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://vinquery.com/schemas/decisioq/7.6.3/business-decision-request.schema.json",
  "title": "DecisioQ Business Decision Request",
  "type": "object",
  "required": ["businessData"],
  "properties": {
    "industry": { "type": "string" },
    "decisionType": { "type": "string" },
    "decisionVersion": { "type": "string" },
    "decisionId": { "type": "string" },
    "businessData": { "type": "object" },
    "runSensitivity": {
      "type": "boolean",
      "default": false,
      "description": "Optional execution flag supported in Business Data Mode and Prepared Criteria Mode. When true, the response includes sensitivity analysis for the prepared criteria."
    },
    "responseOptions": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "includeDecisionMetadata": { "type": "boolean", "default": false },
        "includeDiagnostics": { "type": "boolean", "default": false }
      }
    },
    "requestContext": {
      "type": "object",
      "properties": {
        "correlationId": { "type": "string", "maxLength": 200 },
        "locale": { "type": "string" },
        "measurementSystem": { "type": "string" },
        "currency": { "type": "string" },
        "timeZone": { "type": "string" },
        "jurisdiction": {
          "type": "object",
          "properties": {
            "countryCode": { "type": "string" },
            "regionCode": { "type": "string" }
          }
        },
        "attributes": { "type": "object" }
      }
    }
  },
  "anyOf": [
    { "required": ["decisionId"] },
    { "required": ["decisionType"] }
  ]
}
