{
  "$schema": "https://abhcr.github.io/comcom-protocol/releases/v0.2.0/schemas/comcom-meta.schema.json",
  "$id": "https://abhcr.github.io/comcom-protocol/releases/v0.2.0/profiles/v0.2/transactions.support/comcom-support-case-create/schemas/input.schema.json",
  "title": "Support Case Create input",
  "description": "Create support case using an exact, schema-validated Comcom interaction.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "capability",
    "parameters"
  ],
  "properties": {
    "capability": {
      "const": "comcom.support.case.create"
    },
    "parameters": {
      "type": "object",
      "description": "Support Case Create parameters.",
      "additionalProperties": false,
      "required": [
        "supportCase"
      ],
      "properties": {
        "supportCase": {
          "type": "object",
          "description": "Typed SupportCase data.",
          "additionalProperties": false,
          "required": [
            "customerId",
            "itemId",
            "categoryCode"
          ],
          "properties": {
            "statusCode": {
              "type": "string",
              "description": "Profile-defined business state.",
              "pattern": "^[a-z][a-zA-Z0-9.-]{0,63}$"
            },
            "customerId": {
              "type": "string",
              "description": "Customer URI.",
              "format": "uri-reference"
            },
            "itemId": {
              "type": "string",
              "description": "Affected product, order, or service URI.",
              "format": "uri-reference"
            },
            "categoryCode": {
              "type": "string",
              "description": "Case category code.",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
            },
            "reasonCode": {
              "type": "string",
              "description": "Reason code.",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
            },
            "summary": {
              "type": "string",
              "description": "Case summary.",
              "maxLength": 1000
            },
            "requestedResolutionCode": {
              "type": "string",
              "description": "Requested resolution code.",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
            },
            "openedAt": {
              "type": "string",
              "description": "Case creation instant.",
              "format": "date-time"
            }
          }
        },
        "requestedAt": {
          "type": "string",
          "description": "Requested effective instant.",
          "format": "date-time"
        }
      }
    }
  }
}
