V
V
Viktor0912020-09-16 15:56:04
API
Viktor091, 2020-09-16 15:56:04

Therefore, does not add the product to the OK group via the API?

Good afternoon!
I had such a problem: when sending the "market.add" method, it does not return any result. I began to understand, apparently the problem is in the length of the request itself (which exceeds 4500 characters). Product photos, description and extras. information, nothing more. I split the request into two parts, in the first I send photos, the name of the product, and additional. information (delivery, address, status), everything works, the product is added, the photos are unloaded (in general, like a watch), I send the second part following the “market.edit” method in order to add a description to an already existing product by passing the ID from the result of the first request to the method, but this method completely changes the product, that is, the photos and everything that was in the first request is deleted.
I send both POST and GET - zero emotions!
Below is an example of an Attachment field:
PHP array:

Array
(
    [media] => Array
        (
            [0] => Array
                (
                    [type] => text
                    [text] => Кран манипулятор KATO KS36/4H
                )

            [1] => Array
                (
                    [type] => text
                    [text] => 
        КМУ в наличии! Кран манипулятор KATO KS36/4H. Без эксплуатации по территории РФ. Снят с рабочего грузовика. Бесплатная проверка на стенде.
        Технические характеристики КМУ:
        Тип крана манипулятора: Тросовой
        Тип аутригеров: Эвакуаторные перекрестные
        Количество секций стрелы: 4
        Профиль стрелы: Квадратная (четырехугольная)
        Вылет стрелы: 10.0 м.
        Высота максимального подъема груза: 13.0 м.
        Грузоподъемность манипулятора: 3.0 т.
        Грузовой момент: 7.5 тонн/м.
        Грузоподъемность на максимальном вылете стрелы (в горизонте): 400 кг.
        Цену уточняйте по телефону: 8 (903) 504-97-79. Подготовим документы для переоборудования в ГИБДД. Гарантия. Монтаж. Техобслуживание. Звоните!
      
                )

            [2] => Array
                (
                    [type] => photo
                    [list] => Array
                        (
                            [0] => Array
                                (
                                    [id] => 0pn4b7Oes/aM0qE93odcOOyIHYV2CY7Ws3PmH8xj3CbJVdZXcxf2WhhFoicZIEzGcV0PoBlqRszQ1/y5YRKzDxfUnGZbwokty2IYMQKdXPy4bp6RJa7O863LgCo+gxFxxMz+BW78j+ockqt2QxiJ0jWrzWGhyoI9SAVOHd2kGGE=
                                )

                            [1] => Array
                                (
                                    [id] => hhDwPj4l6IUvvxkV7GRlvAe73Kz9i0XYg443O510foltO2lozsfUZVmAuUJQAc7MGtIJPEEfocwqaboRbqWicOJHBCwECAkId8jdxWCiRMHVjpbQFeAtt6nbbNcdom16Vfc18PkD2OGKaaeeGEYSFbV2Fu0NhsHmgm7QBu4n2Lk=
                                )

                            [2] => Array
                                (
                                    [id] => 4L37v+2tw9HvoJO5jys+F02T14ir0n3m+egcxKdpdZwypghG8WYvAoMj1CNTDRPbXwv1FBr9gC1iXKRkTD1TuXbNXjLjtOpPN1WMkLXEqlUwgR5XQ0gPStRtOlXTHHaFtLgg7IRCJUAthuajDk/nVr36k5UHk8Wz1Bq0FZQJD24=
                                )

                        )

                )

            [3] => Array
                (
                    [type] => product
                    [price] => 0
                    [currency] => RUB
                    [delivery] => Array
                        (
                            [0] => SELF
                            [1] => MAIL
                        )

                    [status] => ACTIVE
                    [lifetime] => 0
                )

        )

    [place] => Array
        (
            [category] => company_office
            [city] => Реутов
            [city_town_id] => 28981216360685
            [country_code] => RU
            [house_number] => 3
            [lat] => 55.7726023601
            [lng] => 37.876650989056
            [phone] => +74959795210
            [place_name] => г. Реутов, ул. Транспортная, д. 3
            [street] => Транспортная
            [website] => gidrokran.ru
        )

)

json format:
{
    "media": [
        {
            "type": "text",
            "text": "\u041a\u0440\u0430\u043d \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0442\u043e\u0440 KATO KS36\/4H"
        },
        {
            "type": "text",
            "text": "\r\n\t\t\t\t\u041a\u041c\u0423 \u0432 \u043d\u0430\u043b\u0438\u0447\u0438\u0438! \u041a\u0440\u0430\u043d \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0442\u043e\u0440 KATO KS36\/4H. \u0411\u0435\u0437 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438 \u043f\u043e \u0442\u0435\u0440\u0440\u0438\u0442\u043e\u0440\u0438\u0438 \u0420\u0424. \u0421\u043d\u044f\u0442 \u0441 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u0433\u0440\u0443\u0437\u043e\u0432\u0438\u043a\u0430. \u0411\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u0441\u0442\u0435\u043d\u0434\u0435.\r\n\t\t\t\t\u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u041a\u041c\u0423:\r\n\t\t\t\t\u0422\u0438\u043f \u043a\u0440\u0430\u043d\u0430 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0442\u043e\u0440\u0430: \u0422\u0440\u043e\u0441\u043e\u0432\u043e\u0439\r\n\t\t\t\t\u0422\u0438\u043f \u0430\u0443\u0442\u0440\u0438\u0433\u0435\u0440\u043e\u0432: \u042d\u0432\u0430\u043a\u0443\u0430\u0442\u043e\u0440\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043a\u0440\u0435\u0441\u0442\u043d\u044b\u0435\r\n\t\t\t\t\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0435\u043a\u0446\u0438\u0439 \u0441\u0442\u0440\u0435\u043b\u044b: 4\r\n\t\t\t\t\u041f\u0440\u043e\u0444\u0438\u043b\u044c \u0441\u0442\u0440\u0435\u043b\u044b: \u041a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u0430\u044f (\u0447\u0435\u0442\u044b\u0440\u0435\u0445\u0443\u0433\u043e\u043b\u044c\u043d\u0430\u044f)\r\n\t\t\t\t\u0412\u044b\u043b\u0435\u0442 \u0441\u0442\u0440\u0435\u043b\u044b: 10.0 \u043c.\r\n\t\t\t\t\u0412\u044b\u0441\u043e\u0442\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u044a\u0435\u043c\u0430 \u0433\u0440\u0443\u0437\u0430: 13.0 \u043c.\r\n\t\t\t\t\u0413\u0440\u0443\u0437\u043e\u043f\u043e\u0434\u044a\u0435\u043c\u043d\u043e\u0441\u0442\u044c \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0442\u043e\u0440\u0430: 3.0 \u0442.\r\n\t\t\t\t\u0413\u0440\u0443\u0437\u043e\u0432\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442: 7.5 \u0442\u043e\u043d\u043d\/\u043c.\r\n\t\t\t\t\u0413\u0440\u0443\u0437\u043e\u043f\u043e\u0434\u044a\u0435\u043c\u043d\u043e\u0441\u0442\u044c \u043d\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u044b\u043b\u0435\u0442\u0435 \u0441\u0442\u0440\u0435\u043b\u044b (\u0432 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0435): 400 \u043a\u0433.\r\n\t\t\t\t\u0426\u0435\u043d\u0443 \u0443\u0442\u043e\u0447\u043d\u044f\u0439\u0442\u0435 \u043f\u043e \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0443: 8 (903) 504-97-79. \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0413\u0418\u0411\u0414\u0414. \u0413\u0430\u0440\u0430\u043d\u0442\u0438\u044f. \u041c\u043e\u043d\u0442\u0430\u0436. \u0422\u0435\u0445\u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u0435. \u0417\u0432\u043e\u043d\u0438\u0442\u0435!\r\n\t\t\t"
        },
        {
            "type": "photo",
            "list": [
                {
                    "id": "3nqEunjhGmERWdgoVxuuOz2sKRSFVNFb\/N2yqpSwGkM4TvgkXqzGm87JaEq5t+VyyDff8EJAc\/z3pJlFAIe\/tAaRulevLH4iWsUv929D3f0Qs1NFBQKqlXVPv65kZsjQSTC8f+h0XnMkNTAeKd8CEs7YtCYei7mumDfIInJ42oA="
                },
                {
                    "id": "CojlAV70okhi3+WicKy9Qx1stiY1Rc9i2sgRRBW8P9c0xFRPSFjVJLuQk\/zK9lmPOvcWDq7CS0eFenk+dndulCotsAA0EsagoCUA7ssr86p\/yXVkvS9+zWTx0HtiL2F3bJ1o5rhdC47hGKFKSFkTOQATy176D1yF6vCnTjnXazA="
                },
                {
                    "id": "SeEhVUlx4ERMphjROh1MdQm8ZNAHlwZm1bkNS2lTM2bQq\/hGOHFkv0eTenKAloIuVXPyyXgVDpuNmH58ktj0ErvSV8Se4h7WE8OVObikEphVKmMNe1+ddj5qIDjNLY7HihzqyO2F1WyGYYleZc4ugrC1xkHB0bEAImesSDPJlXw="
                }
            ]
        },
        {
            "type": "product",
            "price": 0,
            "currency": "RUB",
            "delivery": [
                "SELF",
                "MAIL"
            ],
            "status": "ACTIVE",
            "lifetime": 0
        }
    ],
    "place": {
        "category": "company_office",
        "city": "\u0420\u0435\u0443\u0442\u043e\u0432",
        "city_town_id": 28981216360685,
        "country_code": "RU",
        "house_number": 3,
        "lat": 55.77260236010029,
        "lng": 37.87665098905563,
        "phone": "+74959795210",
        "place_name": "\u0433. \u0420\u0435\u0443\u0442\u043e\u0432, \u0443\u043b. \u0422\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442\u043d\u0430\u044f, \u0434. 3",
        "street": "\u0422\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442\u043d\u0430\u044f",
        "website": "gidrokran.ru"
    }
}

The support service has been silent for a week already!!!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor091, 2020-10-06
@Viktor091

Decided! We send a request to the API using the POST method (I send via cURL), and drag the parameters into the request body - everything works.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question