allegro / allegro/allegro-api

[NEWS] POST /sale/product-offers - dodaliśmy nowe pole ‘status’ / POST /sale/product-offers - we added new field ‘status’

Abierto
#3,257 0 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

[POST /sale/product-offers](https://developer.allegro.pl/documentation/#operation/createProductOffers) to nowy zasób, **dzięki któremu za pomocą jednego żądania wystawisz aktywną ofertę powiązaną z produktem**:
- **który istnieje już w naszej bazie**. Wystarczy, że w żądaniu przekażesz numer EAN (lub identyfikator produktu) oraz cenę i liczbę sztuk,
- **którego nie ma w naszej bazie**. W strukturze żądania za pomocą kompletu danych opiszesz sprzedawany produkt oraz przekażesz informacje o cenie i liczbie sztuk.

Więcej informacji o tym zasobie znajdziesz w [naszym poradniku](https://developer.allegro.pl/product_offers/).

W strukturze odpowiedzi, w ramach **danych produktowych**, w sekcji **publication** dodaliśmy nowe pole **status**, w którym informujemy, czy na podstawie danych z żądania:

- utworzyliśmy nową propozycję produktu i powiązaliśmy z nią ofertę (**PROPOSED**),
```
{
"product":{
"id": “0cb89863-9bd0-4f92-x364-16ec3908201x”, -- id zgłoszonego produktu
"publication": {
“status”: “PROPOSED”
},
}
…}
```
- zidentyfikowaliśmy produkt w naszej bazie i powiązaliśmy z nim ofertę (**LISTED**),
```
{
"product":{
"id": “0cb89863-9xd0-4f92-x364-16ec3908201x”, -- id produktu z naszej bazy
"publication": {
“status”: “LISTED”
},
}
…}
```

- nie utworzyliśmy nowej propozycji produktu i nie powiązaliśmy oferty z żadnym produktem z naszej bazy (**NOT_LISTED**), jednak wystawiliśmy samą ofertę. Taka sytuacja może nastąpić np. gdy próbujesz utworzyć ofertę i produkt w kategorii, w której nie możesz dodać propozycji nowego produktu,
```
{
"product":{
"id": null
"publication": {
“status”: “NOT_LISTED”
},
}
…}
```

-----

[POST /sale/product-offers](https://developer.allegro.pl/documentation/#operation/createProductOffers) is a new resource, which allows you to **list an offer assigned to a product with one request**:
- **if the product already exists in our database**, all you need to do is provide EAN code (or product ID), price and quantity,
- **if the product is not in our database**, you need to provide product data, price and quantity.
You can find more information about this resource in [our guide](https://developer.allegro.pl/en/product_offers/).

In the response structure, as part of **product data**, we added new field **status** in **publication** section, in which we inform that:

- we created new product proposal and assigned it to an offer (**PROPOSED**),
```
{
"product":{
"id": “0cb89863-9bd0-4f92-x364-16ec3908201x”, -- submitted product ID
"publication": {
“status”: “PROPOSED”
},
}
…}
```
- we identified the product in our database and assigned it to an offer (**LISTED**),
```
{
"product":{
"id": “0cb89863-9xd0-4f92-x364-16ec3908201x”, -- product ID from our database
"publication": {
“status”: “LISTED”
},
}
…}
```

- we didn’t create a new product proposal and didn’t assign any product from our database to an offer (**NOT_LISTED**), but we listed an offer itself. This can happen e.g. when you try to create an offer and product in category, in which you can’t add new product proposal.
```
{
"product":{
"id": null
"publication": {
“status”: “NOT_LISTED”
},
}
…}
```

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.