L
L
lightalex2018-09-25 17:30:35
1C
lightalex, 2018-09-25 17:30:35

How to add contact details to the Counterparty through the order creation api in 1C?

Good afternoon!
I'm trying to create an order in 1C Management of our company through their SoapClient API. I'm passing
an array to LoadOrders:

[
    "ВерсияСхемы" => "2.05",
    "ДатаФормирования" => "2018-09-18T11:56:10",
    "Документ" => [
        "Ид" => "0",
        "Номер" => "80",
        "Дата" => "2018-09-18",
        "ХозОперация" => "Заказ товара",
        "Роль" => "Продавец",
        "Валюта" => "руб",
        "Курс" => "1",
        "Сумма" => null,
        "Контрагенты" => [
            "Контрагент" => [
                "Ид" => null,
                "Наименование" => "Тестеров Т.Т.",
                "Роль" => "Покупатель",
                "Адрес" => [
                    "Представление" => "Тест"
                ],
                "Контакт" => [
                    "КонтактВид" => "Почта",
                    "Значение" => "[email protected]"
                ]
            ]
        ],
        "Товары" => 
    ]
]

Only now the mail is not entered. No idea why. I have a name, but no email.
It seems that I am doing everything according to the documentation ...
It is necessary to enter the marked fields:
5baa45fbe3cfc906861711.png
Can anyone tell me how to correctly transfer this data?
I will be very grateful

Answer the question

In order to leave comments, you need to log in

3 answer(s)
L
lightalex, 2018-09-25
@lightalex

In short, if suddenly someone needs it ...
The documentation says that you need to transfer the "Contact" array. In short, not a fig. There should be an array of arrays called "Contacts". With a beech Y ... Documentation is cool at 1C. Thanks guys from 1C. Like.
The correct piece of the Counterparty in order creation:

"Контрагенты" => [
    "Контрагент" => [
        "Ид" => null,
        "Наименование" => "Тестеров Т.Т.",
        "Роль" => "Покупатель",
        "Адрес" => [
            "Представление" => "Тест"
        ],
        "Контакты" => [
            [
                "Тип" => "Телефон мобильный",
                "Значение" => "(095) 737-92-57"
            ]
        ]
    ]
]

D
Dmitry Kinash, 2018-09-25
@Dementor

The most obvious way is to ask a question to the support service, which you pay for answering such questions. The probability that you will quickly find on the Internet a person who knows the nuances of SoapClient in UNF, who will agree to advise you for free, tends to zero.

D
Dimonchik, 2018-09-25
@dimonchik2013

a normal api should support CRUD
your task is to execute R with the parameters that you are trying to send to C

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question