Closed natt-eyre closed 7 years ago
DocumentDate - это сроки, оборачивайте их в двойные кавычки.
@atytsky, поменяла на двойные, не помогло.
Вышлите JSON, который отправляете на сервер в теле запроса.
"{\"UniversalTransferDocumentSellerTitleInfo\":{\"Function\":\"2\",\"DocumentName\":\"\\u0423\\u043d\\u0438\\u0432\\u0435\\u0440\\u0441\\u0430\\u043b\\u044c\\u043d\\u044b\\u0439 \\u043f\\u0435\\u0440\\u0435\\u0434\\u0430\\u0442\\u043e\\u0447\\u043d\\u044b\\u0439 \\u0434\\u043e\\u043a\\u0443\\u043c\\u0435\\u043d\\u0442\",\"DocumentDate\":\"26.03.2017\",\"DocumentNumber\":\"\\u041f-5571/1084\",\"Seller\":{\"BoxId\":\"0577fe52e00b4aeebe1f19d412e51f35@diadoc.ru\",\"OrgName\":\"\\u041e\\u041e\\u041e '\\u0418\\u043d\\u0441\\u0435\\u0439\\u043b\\u0441 \\u0420\\u0443\\u0441'\",\"Inn\":\"9693394875\",\"Kpp\":\"969301000\",\"Address\":{\"RussianAddress\":{\"ZipCode\":\"125319\",\"Region\":\"77\",\"City\":\"\\u041c\\u043e\\u0441\\u043a\\u0432\\u0430\",\"Street\":\"\\u0410\\u043a\\u0430\\u0434\\u0435\\u043c\\u0438\\u043a\\u0430 \\u0418\\u043b\\u044c\\u044e\\u0448\\u0438\\u043d\\u0430\",\"Building\":\"4\",\"Block\":\"1\",\"Apartment\":\"11\"}},\"FnsParticipantId\":\"2BM-9693394875-969301000-201703231039329785209\",\"OrgType\":\"1\",\"Okopf\":\"12300\",\"Okdp\":\"62.01\",\"Phone\":\"(495) 649-83-14\",\"Email\":\"support@insales.ru\",\"CorrespondentAccount\":\"30101810500000000222\",\"BankAccountNumber\":\"40702810600001004854\",\"BankName\":\"\\u0418\\u041d\\u0413 \\u0411\\u0410\\u041d\\u041a (\\u0415\\u0412\\u0420\\u0410\\u0417\\u0418\\u042f) \\u0410\\u041e\",\"BankId\":\"044525222\"},\"Buyer\":{\"BoxId\":\"a887c1091d0947fba49b5c5b199048f2@diadoc.ru\",\"OrgName\":\"\\u041e\\u041e\\u041e 'DDDD \\u0420\\u0443\\u0441'\",\"Inn\":\"9649161913\",\"Kpp\":\"964901000\",\"Address\":{\"RussianAddress\":{\"ZipCode\":\"125319\",\"Region\":\"77\",\"City\":\"\\u041c\\u043e\\u0441\\u043a\\u0432\\u0430\",\"Street\":\"\\u0410\\u043a\\u0430\\u0434\\u0435\\u043c\\u0438\\u043a\\u0430 \\u0418\\u043b\\u044c\\u044e\\u0448\\u0438\\u043d\\u0430\",\"Building\":\"5\",\"Block\":\"2\",\"Apartment\":\"21\"}},\"FnsParticipantId\":\"2BM-9649161913-964901000-201703280416439274086\",\"OrgType\":\"1\",\"Okopf\":\"12300\",\"Okdp\":\"62.01\",\"Phone\":\"(495) 649-84-14\",\"Email\":\"support@insadddles.ru\",\"CorrespondentAccount\":\"30101810500000000222\",\"BankAccountNumber\":\"40702810600001004854\",\"BankName\":\"\\u0418\\u041d\\u0413 \\u0411\\u0410\\u041d\\u041a (\\u0415\\u0412\\u0420\\u0410\\u0417\\u0418\\u042f) \\u0410\\u041e\",\"BankId\":\"044525222\"},\"Shipper\":{\"SameAsSeller\":true},\"Consignee\":{\"BoxId\":\"a887c1091d0947fba49b5c5b199048f2@diadoc.ru\",\"OrgName\":\"\\u041e\\u041e\\u041e 'DDDD \\u0420\\u0443\\u0441'\",\"Inn\":\"9649161913\",\"Kpp\":\"964901000\",\"Address\":{\"RussianAddress\":{\"ZipCode\":\"125319\",\"Region\":\"77\",\"City\":\"\\u041c\\u043e\\u0441\\u043a\\u0432\\u0430\",\"Street\":\"\\u0410\\u043a\\u0430\\u0434\\u0435\\u043c\\u0438\\u043a\\u0430 \\u0418\\u043b\\u044c\\u044e\\u0448\\u0438\\u043d\\u0430\",\"Building\":\"5\",\"Block\":\"2\",\"Apartment\":\"21\"}},\"FnsParticipantId\":\"2BM-9649161913-964901000-201703280416439274086\",\"OrgType\":\"1\",\"Okopf\":\"12300\",\"Okdp\":\"62.01\",\"Phone\":\"(495) 649-84-14\",\"Email\":\"support@insadddles.ru\",\"CorrespondentAccount\":\"30101810500000000222\",\"BankAccountNumber\":\"40702810600001004854\",\"BankName\":\"\\u0418\\u041d\\u0413 \\u0411\\u0410\\u041d\\u041a (\\u0415\\u0412\\u0420\\u0410\\u0417\\u0418\\u042f) \\u0410\\u041e\",\"BankId\":\"044525222\"},\"Signers\":[{\"BoxId\":\"0577fe52e00b4aeebe1f19d412e51f35@diadoc.ru\",\"SignerDetails\":{\"Surname\":\"\\u0413\\u043e\\u0440\\u0448\\u043a\\u043e\\u0432\",\"FirstName\":\"\\u0422\\u0438\\u043c\\u043e\\u0444\\u0435\\u0439\",\"JobTitle\":\"\\u0413\\u0435\\u043d\\u0435\\u0440\\u0430\\u043b\\u044c\\u043d\\u044b\\u0439 \\u0434\\u0438\\u0440\\u0435\\u043a\\u0442\\u043e\\u0440\",\"SignerType\":\"1\",\"SignerOrganizationName\":\"\\u041e\\u041e\\u041e '\\u0418\\u043d\\u0441\\u0435\\u0439\\u043b\\u0441 \\u0420\\u0443\\u0441'\",\"SignerPowers\":\"0\",\"SignerStatus\":\"1\"}}],\"PaymentDocuments\":[{\"DocumentDate\":\"28.02.2017\",\"DocumentNumber\":\"999\"}],\"InvoiceTable\":{\"Items\":[{\"Product\":\"\\u041d\\u0435\\u0438\\u0441\\u043a\\u043b\\u044e\\u0447\\u0438\\u0442\\u0435\\u043b\\u044c\\u043d\\u044b\\u0435 \\u043f\\u0440\\u0430\\u0432\\u0430 \\u043d\\u0430 \\u041f\\u0440\\u043e\\u0433\\u0440\\u0430\\u043c\\u043c\\u0443 \\u0434\\u043b\\u044f \\u042d\\u0412\\u041c \\\"\\u041f\\u043b\\u0430\\u0442\\u0444\\u043e\\u0440\\u043c\\u0430 InSales\\\" \\u0442\\u0430\\u0440\\u0438\\u0444 \\\"\\u041f\\u0440\\u043e\\u0434\\u0432\\u0438\\u0433\\u0430\\u044e\\u0449\\u0438\\u0439 OLD\\\"\",\"TaxRate\":\"0\",\"SubtotalWithVatExcluded\":\"100.34\",\"Subtotal\":\"100.34\"}],\"Vat\":\"0.00\",\"Total\":\"100.34\"},\"Currency\":\"643\",\"TransferInfo\":{\"OperationInfo\":\"\\u0421\\u043e\\u0433\\u043b\\u0430\\u0441\\u043d\\u043e \\u041b\\u0438\\u0446\\u0435\\u043d\\u0437\\u0438\\u043e\\u043d\\u043d\\u043e\\u043c\\u0443 \\u0434\\u043e\\u0433\\u043e\\u0432\\u043e\\u0440\\u0443 \\u043f\\u0440\\u0430\\u0432\\u0430 \\u043f\\u0435\\u0440\\u0435\\u0434\\u0430\\u043d\\u044b \\u043d\\u0430 \\u0443\\u043a\\u0430\\u0437\\u0430\\u043d\\u043d\\u044b\\u0439 \\u0441\\u0440\\u043e\\u043a \\u0438 \\u0432 \\u0443\\u043a\\u0430\\u0437\\u0430\\u043d\\u043d\\u043e\\u043c \\u043e\\u0431\\u044a\\u0451\\u043c\\u0435\",\"TransferDate\":\"01.03.2017\",\"TransferBase\":[{\"BaseDocumentName\":\"\\u0414\\u043e\\u0433\\u043e\\u0432\\u043e\\u0440\",\"BaseDocumentNumber\":\"108499\",\"BaseDocumentDate\":\"28.02.2017\"}],\"Waybill\":[{\"TransferDocumentNumber\":\"100\",\"TransferDocumentDate\":\"28.02.2017\"}]},\"DocumentCreator\":\"\\u041e\\u041e\\u041e '\\u0418\\u043d\\u0441\\u0435\\u0439\\u043b\\u0441 \\u0420\\u0443\\u0441'\"}}"
У вас снова лишняя вложенность, как и в прошлый раз. Вот здесь приведен пример, как надо формировать тела запроса для JSON.
Уберите верхнюю структуру UniversalTransferDocumentSellerTitleInfo.
@atytsky, спасибо, помогло. Хочется больше примеров для JSON.
Здравствуйте, подскажите, пожалуйста, о каком обязательном поле идет речь в ошибке при генерации УПД "Info.DocumentDate is required" ? В списке полей несколько дат и вроде бы я все какие есть передаю, непонятно почему такая ошибка.