allegro / allegro/allegro-api

[NEWS] Kategorie i parametry - dodaj własną wartość do parametru słownikowego z wartością niejednoznaczną / Categories and parameters - add your own value for dictionary parameter with ambiguous value

Open
#3,126 0 comments 0 reactions 1 assignee Claimed by @PrzemyslawLukanowski View on GitHub
News
Dominant language
No language data
Stars
244
Forks
40
PR merge metrics
No merged PRs in 30d

Description

Wartości niejednoznaczne parametru to wartości typu: “inne”, “pozostałe”, etc. np. “inna” w parametrze “Marka”. Identyfikator takiej wartości zwracamy w polu ‘**ambiguousValueId’** w sekcji **options** w odpowiedzi dla [GET /sale/categories/{categoryId}/parameters](https://developer.allegro.pl/documentation/#operation/getFlatParametersUsingGET_2). Informowaliśmy o tym we [wcześniejszym komunikacie](https://developer.allegro.pl/news/#ambiguousValueId).

**Od dziś w [wybranych kategoriach](https://allegro.pl/dla-sprzedajacych/na-api-mozesz-wprowadzic-wlasna-wartosc-parametru-marka-w-wybranych-kategoriach-z8EDxMZd0fa) w API możesz zdefiniować własną wartość dla parametru z wartością niejednoznaczną.** Możesz skorzystać z tej opcji, gdy wystawiasz bądź edytujesz ofertę i nie znajdziesz odpowiedniej wartości parametru. Dzięki temu zbierzemy propozycje brakujących wartości, zweryfikujemy je i uzupełnimy listę wartości danego parametru. **W przyszłości uzupełnienie wartości będzie obowiązkowe, jeśli wybierzesz wartość niejednoznaczną parametru.**

Na [stronie dla sprzedających](https://allegro.pl/dla-sprzedajacych/na-api-mozesz-wprowadzic-wlasna-wartosc-parametru-marka-w-wybranych-kategoriach-z8EDxMZd0fa) znajdziesz aktualną listę parametrów, do których możesz dodać własną wartość. **Własne wartości parametrów na tę chwilę możesz dodać tylko przez API.**

Aby dodać własną wartość, sprawdź wartość pola **ambiguousValueId** w wybranej kategorii za pomocą [GET /sale/categories/{categoryId}/parameters](https://developer.allegro.pl/documentation/#operation/getFlatParametersUsingGET_2):

```
{
"parameters": [
{
"id": "129033",
"name": "Marka",
"type": “dictionary”,
"required":true,
"unit": null,
"options": {
"variantsAllowed": false,
"variantsEqual": false,
"ambiguousValueId": "129033_13" -- id wartości niejednoznacznej,
w tym przypadku jest to wartość “inna”
},
...
}
```

Następnie, gdy [tworzysz draft](https://developer.allegro.pl/documentation/#operation/createOfferUsingPOST) lub [edytujesz ofertę](https://developer.allegro.pl/documentation/#operation/updateOfferUsingPUT), w sekcji parameters przekaż poniższą strukturę:
```

{
"id": "129033", -- id parametru
"valuesIds": [
"129033_13" -- id wartości niejednoznacznej
],
"values": [ "Nazwa brakującej marki" ], -- wartość, którą chcesz przekazać,
uzupełnij to pole.
"rangeValue": null
}

```
W przyszłości dodamy możliwość definiowania własnych wartości dla p[ropozycji produktów](https://developer.allegro.pl/documentation/#operation/proposeSaleProduct) - o wdrożeniu poinformujemy w osobnym komunikacie.

-----

Ambiguous value is for example “other” in the parameter “Brand”. You can retrieve its identifier [via GET /sale/categories/{categoryId}/parameters](https://developer.allegro.pl/documentation/#operation/getFlatParametersUsingGET_2) in **options** section - field ‘**ambiguousValueId**’. We informed about this in an [earlier announcement](https://developer.allegro.pl/news/#ambiguousValueId).

**As of today, you can define custom value for parameters with ambiguous value by API in [selected categories](https://allegro.pl/dla-sprzedajacych/na-api-mozesz-wprowadzic-wlasna-wartosc-parametru-marka-w-wybranych-kategoriach-z8EDxMZd0fa).** Use this option when you listing or editing an offers and you can’t find an appropriate value. Thanks to this, we will collect suggestions of missing values and after verification we will add them to the list of values. **In the future it will be necessary to provide custom value, if you choose an ambiguous parameter value.**

You can find a current list of parameters, to which you can add your own value, on our [sellers page](https://allegro.pl/dla-sprzedajacych/na-api-mozesz-wprowadzic-wlasna-wartosc-parametru-marka-w-wybranych-kategoriach-z8EDxMZd0fa). **For now, custom parameter values can be added only by API.**

To add a custom value, check the ambiguousValueId field in selected category via [GET /sale/categories/{categoryId}/parameters](https://developer.allegro.pl/documentation/#operation/getFlatParametersUsingGET_2):

```
{
"parameters": [
{
"id": "129033",
"name": "Brand",
"type": “dictionary”,
"required":true,
"unit": null,
"options": {
"variantsAllowed": false,
"variantsEqual": false,
"ambiguousValueId": "129033_13" -- identifier for ambiguous value,
in this case it is “other”

},
...
}
```

After that, when you [creating draft](https://developer.allegro.pl/documentation/#operation/createOfferUsingPOST) or [editing offer](https://developer.allegro.pl/documentation/#operation/updateOfferUsingPUT), provide following structure in the **parameters** section:

```
{
"id": "129033", -- parameter id
"valuesIds": [
"129033_13" -- ambiguous value id
],
"values": [ "Name of the missing brand" ], -- value, which you want to provide.
Complete this field.
"rangeValue": null
}
```

In the future you will be able to define custom values for [product proposals](https://developer.allegro.pl/documentation/#operation/proposeSaleProduct) - we will inform you about the implementation in a separate news.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.