allegro / allegro/allegro-api

[NEWS] Kategorie i parametry - nowe pole ‘ambiguousValueId’ dla parametrów z wartością niejednoznaczną / Categories and parameters - new field ‘ambiguousValueId’ for parameters with ambiguous value

Abierto
#2,968 0 comentarios 1 reacción 1 asignado Reclamado por @PrzemyslawLukanowski Ver en GitHub
News
Lenguaje dominante
Sin datos de lenguaje
Estrellas
244
Forks
40
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Udostępniliśmy nowe pole ‘**ambiguousValueId**’ w sekcji **options** w odpowiedzi dla [GET /sale/categories/{categoryId}/parameters](https://developer.allegro.pl/documentation/#operation/getFlatParametersUsingGET_2). Zwracamy w nim informację o identyfikatorze wartości niejednoznacznej dla parametru. Wartością niejednoznaczną nazywamy wartość typu: “inne”, “pozostałe”, “inny wzór”, etc. np. “inna” w parametrze “Marka”. W takiej sytuacji odpowiedź będzie wyglądała jak poniżej:

```
{
"parameters": [
{
"id": "2929",
"name": "Marka",
"type": “dictionary”,
"required":true,
"unit": null,
"options": {
"variantsAllowed": false,
"variantsEqual": false,
"ambiguousValueId": "25929_41" -- id wartości niejednoznacznej, w tym
przypadku jest to wartość “inna”
},
"dictionary": [
{"id": "25929_416381", "value": "2skin"},
{"id": "25929_31", "value": "4F"},
...
{"id": "25929_41", "value": "inna"}
],
"restrictions": {"multipleChoices": false}
}
]
}
```

Wartość w nowym polu zwracamy tylko dla parametrów słownikowych, dla których możesz wybrać wartość niejednoznaczną. W pozostałych sytuacjach otrzymasz null.

**Ważne!** W przyszłości będziesz mógł zdefiniować nowe wartości dla wartości niejednoznacznych. O szczegółach poinformujemy w osobnym komunikacie.

-----

We have introduced a new field ‘**ambiguousValueId**’ in options **section** in response to [GET /sale/categories/{categoryId}/parameters](https://developer.allegro.pl/documentation/#operation/getFlatParametersUsingGET_2). In this field we inform about identifier for ambiguous value for parameter. Ambiguous value can be value such as ”other”, “different pattern”, etc. e.g. “other” in the parameter “Brand”. In this case the response will look like below:

```
{
"parameters": [
{
"id": "2929",
"name": "Marka",
"type": “dictionary”,
"required":true,
"unit": null,
"options": {
"variantsAllowed": false,
"variantsEqual": false,
"ambiguousValueId": "25929_41" -- identifier for ambiguous value,
in this case it is “inna” (other)
},
"dictionary": [
{"id": "25929_416381", "value": "2skin"},
{"id": "25929_31", "value": "4F"},
...
{"id": "25929_41", "value": "inna"}
],
"restrictions": {"multipleChoices": false}
}
]
}
```

We return value in the new field only for dictionary parameters, for which you can choose an ambiguous value. In other cases you will receive null.

**Note!** In the future you will be able to define new values for ambiguous values. We will inform you about the details in a separate news.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.