allegro / allegro/allegro-api

[NEWS] Sprawdź nieuzupełnione wymagane parametry w ofertach oraz przyszłe uobowiązkowienia / Check offers unfilled parameters and future requirements

Abierto
#3,895 7 comentarios 0 reacciones 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

W odpowiedzi na wasze sugestie dodaliśmy dzisiaj dwa nowe zasoby, które ułatwią sprzedającym zarządzanie ofertami:

- [GET /sale/offers/unfilled-parameters](https://developer.allegro.pl/documentation/#operation/getOffersUnfilledParametersUsingGET_1) - sprawdź brakujące parametry w ofertach. W odpowiedzi zwrócimy domyślnie listę stu ofert, w których nie są uzupełnione parametry obowiązkowe oraz te, które w ciągu najbliższych 3 miesięcy oznaczymy jako wymagane. Do końca roku planujemy dodać filtr, tak abyś mógł sprecyzować w żądaniu, które parametry chcesz otrzymać w odpowiedzi.
Jeżeli chcesz otrzymać dane tylko dla wybranych ofert, użyj parametru **offer.id**, np. GET /sale/offers/unfilled-parameters?offer.id=123456789&offer.id=98765432

**Przykładowy request:**

```
curl -X GET \
'https://api.allegro.pl/sale/offers/unfilled-parameters?offer.id=123456789 \
-H 'Authorization: Bearer {token}' \
-H 'Accept: application/vnd.allegro.public.v1+json'
```

**Przykładowy response:**

```
{
"offers": [
{
"id": "123456789", -- ID oferty
"parameters": [ -- informacje o nieuzupełnionych parametrach
{
"id": "14228" -- ID parametru
}
],
"category": {
"id": "257931" -- ID kategorii, w której występuje parametr
}
}
],
"count": 1, -- liczba wyświetlanych wyników
"totalCount": 1 -- łączna liczba wyników
}

```

- [GET /sale/categories/parameters/required-changes](https://developer.allegro.pl/documentation/#operation/getCategoriesParametersRequireChangesUsingGET_1) - sprawdź, które parametry w serwisie oznaczymy jako obowiązkowe w ciągu najbliższych 3 miesięcy . Aby zawęzić wyniki do konkretnego przedziału czasowego, użyj parametrów:
- **scheduledFor.gte** - najwcześniejsza data planowanego uobowiązkowienia,
- **scheduledFor.lte** - najpóźniejsza data planowanego uobowiązkowienia, nie może być większa niż 3 miesiące od bieżącej daty,
np. żeby sprawdzić, które parametry staną się obowiązkowe do końca grudnia, musisz sformułować żądanie GET /sale/categories/parameters/required-changes?scheduledFor.lte=2020-12-31T23:59:59Z.

**Przykładowy request:**

```
curl -X GET \
'https://api.allegro.pl/sale/categories/parameters/required-changes \
-H 'Authorization: Bearer {token}' \
-H 'Accept: application/vnd.allegro.public.v1+json'
```

**Przykładowy response:**

```
{
"changes": [
{
"category": {
"id": "1521" -- ID kategorii, w której włączymy
obowiązkowość parametru
},
"parameter": {
"id": "219809" -- ID parametru, który oznaczymy
jako obowiązkowy
},
"scheduledAt": "2021-02-19T23:00:00Z" -- data, kiedy parametr oznaczymy
jako obowiązkowy
},

]
"count": 10, -- liczba wyświetlanych wyników
"totalCount": 10 -- łączna liczba wyników
}

```

Dzięki wprowadzonym zasobom sprzedawca będzie mógł szybciej zareagować na zmiany w naszej platformie, dzięki czemu uniknie problemów związanych np. ze zmianą liczby sztuk w ofertach, w których nie są uzupełnione obowiązkowe parametry.

Informacje o nowych zasobach dodaliśmy także w [naszym poradniku](https://developer.allegro.pl/my_offers/#kategorie-i-parametry).

-----

In response to your suggestions, today we have introduced two new resources to help manage sellers their offers:

- [GET /sale/offers/unfilled-parameters](https://developer.allegro.pl/documentation/#operation/getOffersUnfilledParametersUsingGET_1) - check offers unfilled parameters. In response, we will return by default a list of 100 offers with unfilled required parameters and parameters that will be marked as mandatory in the next 3 months. Till the end of December we will introduce a filter, owing to which you will be able to choose which parameters you want to retrieve in response.
If you want to retrieve data only for specific offers, use **offer.id** parameter, e.g. GET /sale/offers/unfilled-parameters?offer.id=123456789&offer.id=98765432

**Sample request:**

```
curl -X GET \
'https://api.allegro.pl/sale/offers/unfilled-parameters?offer.id=123456789 \
-H 'Authorization: Bearer {token}' \
-H 'Accept: application/vnd.allegro.public.v1+json'
```

**Sample response:**

```
{
"offers": [
{
"id": "123456789", -- offer ID
"parameters": [ --information about unfilled parameters
{
"id": "14228" -- parameter ID
}
],
"category": {
"id": "257931" -- category ID in which the parameter occurs
}
}
],
"count": 1, -- number of returned elements
"totalCount": 1 -- total number of available elements
}

```

- [GET /sale/categories/parameters/required-changes](https://developer.allegro.pl/documentation/#operation/getCategoriesParametersRequireChangesUsingGET_1) - check which parameters will be marked as required in the next 3 months. To narrow the results to a specific time period, use the parameters:
- **scheduledFor.gte** - the earliest date on which the parameter will be marked as mandatory,
- **scheduledFor.lte** - the latest date, on which the parameter will be marked as mandatory. Should be less than 3 months from current date,
e.g. to check which parameters will become mandatory by the end of December, you need to make a following request GET /sale/categories/parameters/required-changes?scheduledFor.lte=2020-12-31T23:59:59Z

**Sample request:**

```
curl -X GET \
'https://api.allegro.pl/sale/categories/parameters/required-changes \
-H 'Authorization: Bearer {token}' \
-H 'Accept: application/vnd.allegro.public.v1+json'
```

**Sample response:**

```
{
"changes": [
{
"category": {
"id": "1521" -- category ID in which the
parameter will be mandatory

},
"parameter": {
"id": "219809" -- parameter ID that will be mandatory
},
"scheduledAt": "2021-02-19T23:00:00Z" -- date from which parameter will be
marked as mandatory
},

]
"count": 10, -- number of returned elements
"totalCount": 10 -- total number of available elements
}

```

Owing to the introduced resources, the seller will be able to react faster to changes on our platform, thanks to which he will avoid problems such as, for example, a stock change in offers in which the required parameters are not provided.

We have added information about new resources in [our guide](https://developer.allegro.pl/en/my_offers/#categories-and-parameters).

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.