allegro / allegro/allegro-api

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

Đang mở
#3,257 0 bình luận 0 reaction 1 người được giao Được @PrzemyslawLukanowski nhận Xem trên GitHub
News
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
244
Fork
40
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

[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”
},
}
…}
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.