A
A
Anton2020-05-07 22:09:45
API
Anton, 2020-05-07 22:09:45

How do you fill in attributes in features when adding products via the Ozon API?

I am adding products to Ozone via API
To add a color or a manufacturer or dimensions and other characteristics of a product, I have to use such a thing that negates all automation and is more like manual labor:
On the left, I select a category, in the middle I fill in the attributes, on the right I get ID codes characteristics
5eb45acf8f06a457645635.png
Even in their own documentation an example:

spoiler
"attributes": [
      {
        "id": 8229,              //ЧТО ЭТО ВООБЩЕ?
        "value": "4747"
      },
      {
        "id": 9048,         //Дай угадаю? Модель?
        "value": "Samsung Galaxy S9"
      },
      {
        "id": 4742,
        "value": "512 ГБ"
      },
      {
        "id": 4413,
        "collection": ["1", "2", "13"]
      },
      {
        "id": 4018,
        "complex_collection": [
          {
            "collection": [
              {
                "id": 4068,
                "value": "Additional video"
              },
              {
                "id": 4074,
                "value": "5_-NKRVn7IQ"
              }
            ]
          },
          {
            "collection": [
              {
                "id": 4068,
                "value": "Another one video"
              },
              {
                "id": 4074,
                "value": "5_-NKRVn7IQ"
              }
            ]
          }
        ]
      }
  ]

The question is: And where to get the descriptions of these characteristics, why can't you add a color simply by indicating - "Blue"?
Maybe I'm doing something wrong? It's unrealistic to look for an ID of characteristics.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Gnevyshev, 2020-09-21
@iResource

Maybe I'm doing something wrong?

So) Well, or Almost so.
In any case, they need to pass exactly the id of the characteristic values ​​(for characteristics without free input).
Unless it's better to get these values ​​through the same API, and not through this Characteristic Constructor.
But if you wish, you can wind up the interface in order to actually enter Blue, and it was his id that was transmitted.
The most interesting thing about them is getting possible values ​​for the characteristic Brand :) There are
almost 100 thousand brands. And for 1 request you can get only 50 values ​​of the characteristic.
It turns out that only TWO THOUSAND times you need to request values ​​​​through the API in order to get a list of options for filling the brand :))))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question