{
  "$schema": "http://json-schema.org/schema#",
  "title": "WE, Reply",
  "description": "Подтверждение приёма УПД",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "PACKAGE": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": "string"
        },
        "REPLY": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "description": {
                  "type": "string"
              },
              "ID": {
                "type": "string"
              },
              "EDOID": {
                "type": "string"
              },
              "CREATEDAT": {
                "type": "string",
                "format": "date-time"
              },
              "RESULT": {
                "type": "integer"
              },
              "SUPPLIERDOC": {
                "type": "string"
              },
              "SUPPLIERINVOICE": {
                "type": "string"
              },
              "SUPPLINVOICECREATE": {
                "type": "string",
                "format": "date-time"
              },
              "ACCEPTED": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "DOCWI": {
                    "type": "string"
                  },
                  "ITEMS": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "SUPPLIERARTICLE": {
                          "type": "string"
                        },
                        "QUANTITY": {
                          "type": "number"
                        },
                        "MARKS": {
                          "type": "array",
                          "items": {
                            "type": "string"
                        }
                      }
                    },
                    "required": [
                       "SUPPLIERARTICLE",
                       "QUANTITY",
                       "MARKS"
                    ]
                  }
                }
              }
            }
          },
          "required": [
            "ID",
            "EDOID",
            "CREATEDAT",
            "RESULT",
            "SUPPLIERDOC",
            "SUPPLIERINVOICE",
            "SUPPLINVOICECREATE"
          ]}
        }
      }
    }
  }
}
