{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "eventId": {
      "type": "string"
    },
    "dateTime": {
       "type": "string",
      "format": "yyyy-MM-dd'T'HH:mm:ss.SSSZ"
    },
    "organizationId": {
      "type": "string"
    },
    "correlationId": {
      "type": "string"
    },
    "tenantId": {
      "type": "string"
    },
    "userId": {
      "type": "string"
    },
    "priority": {
      "type": "integer"
    },
    "status": {
      "type": "string"
    },
    "eventSourceId": {
      "type": "string"
    },
    "businessObjects": {
      "type": "object"
    },
    "eventType": {
      "type": "string"
    },
    "operationInstanceId": {
      "type": "string"
    },
    "payload": {
      "type": "object",
      "properties": {
        "commandId": {
          "type": "string"
        },
        "operationInstanceId": {
          "type": "string"
        },
        "sequenceInstanceId": {
          "type": "string"
        },
        "eventType": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "businessObject": {
          "type": "object",
          "properties": {
            "status": {
              "type": "integer"
            },
            "failureMessages": {
              "type": "array",
              "items": [
                {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "message",
                    "code"
                  ]
                }
              ]
            },
            "body": {
              "type": "string"
            },
            "success": {
              "type": "boolean"
            }
          },
          "required": [
            "status",
            "failureMessages",
            "body",
            "success"
          ]
        }
      },
      "required": [
        "commandId",
        "operationInstanceId",
        "sequenceInstanceId",
        "eventType",
        "status",
        "businessObject"
      ]
    },
    "sequenceInstanceId": {
      "type": "null"
    }
  },
  "required": [
   "eventId",
    "organizationId",
    "tenantId",
    "userId",
    "priority",
    "status",
    "eventType",
    "payload"
  ]
}