{
  "$schema": "http://json-schema.org/schema#",
  "title": "UI, 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"
              },
              "SUPPLIERCORRECTINVOICE": {
                "anyOf": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ]
			  },
              "LOCATIONGLN": {
                "type": "string",
              },
              "CREATEDATWI": {
                "type": "string",
                "format": "date-time"
              },
              "COMMENTARY": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
				]
              },
			  "INNSIGNATORY": {
				"anyOf": [
				{
					"type": "string"
				},
				{
					"type": "null"
				}
				]
			  },
			  "NAMESIGNATORY": {
				"anyOf": [
				{
					"type": "string"
				},
				{
					"type": "null"
				}
				]
			  },
              "ACCEPTED": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "DOCWI": {
                    "type": "string"
                  },
                  "ITEMS": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "SUPPLIERARTICLE": {
                          "type": "string"
                        },
                        "QUANTITY": {
                          "type": "number"
                        },
                        "SPECITEMUI": {
                          "anyOf": [
                            {
                              "type": "integer"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "MARKS": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "MARKCODE": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "PACKAGECODE": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "KITUCODES": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "OSUCODES": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "required": [
                      "SUPPLIERARTICLE",
                      "QUANTITY",
                      "MARKS",
                      "KITUCODES",
                      "OSUCODES"
                    ]
                  }
                }
              }
            }
          },
          "required": [
            "ID",
            "EDOID",
            "CREATEDAT",
            "RESULT",
            "SUPPLIERDOC",
            "SUPPLIERINVOICE",
            "SUPPLINVOICECREATE",
			"SUPPLIERCORRECTINVOICE"
          ]
        }
      }
    }
  }
}
