[NEWS] Udostępniliśmy wersję beta.v3 zasobów /sale/product-offers / We have introduced beta.v3 version of the /sale/product-offers resources
- 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ả
Udostępniliśmy dziś wersję **beta.v3** zasobów [/sale/product-offers](https://developer.allegro.pl/product_offers/) i wprowadziliśmy przy tym następujące zmiany:
- dla [POST /sale/product-offers](https://developer.allegro.pl/documentation/#operation/createProductOffers) i [GET /sale/product-offers/{offerId}](https://developer.allegro.pl/documentation/#operation/getProductOffer) - pole **“product”** zastąpiliśmy polem **“productSet”**, które jest tablicą obiektów. Aktualnie możesz w nim przekazać dane wyłącznie jednego produktu.
**Przykładowa struktura requestu:**
```
{
"productSet":[{
“product”:
{
“id”: “bca3791d-a9f8-43e6-885f-c563b7fb30ee”
}
}],
"sellingMode": {
"price": {
"amount": "220.85",
"currency": "PLN"
}
},
"stock": {
"available": 10
}
}
```
- dla [PATCH /sale/product-offers/{offerId}](https://developer.allegro.pl/documentation/#operation/editProductOffers) - jeśli oferta jest zakończona i zaktualizujesz dla niej liczbę przedmiotów na większą niż 0, nie aktywujemy oferty - w tej sytuacji pozostanie w statusie “ENDED”.
Aby skorzystać z wersji **beta.v3**, przekaż w nagłówkach **Content-Type** oraz **Accept** wartość **“application/vnd.allegro.beta.v3+json”**.
**Dlaczego udostępniliśmy nową wersję zasobów?**
W najbliższych miesiącach planujemy udostępnić możliwość definiowania zestawów produktowych, czyli ofert złożonych z wielu produktów. Przykładem takiego zestawu może być oferta, w której przedmiotem sprzedaży jest konsola oraz dodatkowa gra. W takim przypadku, za pomocą POST /sale/product-offers, zdefiniujesz dwa różne produkty w ramach jednej oferty.
Zmianę w PATCH /sale/product-offers/{offerId} wdrożyliśmy w odpowiedzi na Wasze sugestie, tak aby ułatwić zarządzanie ofertami.
**Ważne! Możliwość definiowania zestawów planujemy udostępnić wyłącznie w zasobach /sale/product-offers.** W momencie wdrożenia funkcjonalności w strukturze requestu dodamy także możliwość określenia liczby sztuk każdego z produktów, który wchodzi w skład zestawu.
Dzięki zasobom /sale/product-offers możesz w łatwy sposób:
- [wystawić ofertę powiązaną z produktem](https://developer.allegro.pl/documentation/#operation/createProductOffers) - wystarczy, że w requeście wskażesz nam identyfikator produktu z naszej bazy lub numer EAN, cenę oraz liczbę sztuk. Możesz również stworzyć swój własny produkt. Jeśli na podstawie przekazanych danych rozpoznamy, że produkt istnieje w naszej bazie, to weźmiemy jego dane i uwzględnimy w ofercie, a pozostałe pola uzupełnimy wartościami domyślnymi.
- [zaktualizować dane w ofercie](https://developer.allegro.pl/documentation/#operation/editProductOffers) - nie musisz przy tym przekazywać całej jej struktury, wystarczy pole, które chcesz edytować.
Więcej informacji o obsłudze zasobów znajdziesz w [naszym poradniku](https://developer.allegro.pl/product_offers/).
-----
Today we have released a **beta.v3** version of the [/sale/product-offers](https://developer.allegro.pl/en/product_offers/) resources and introduced the following changes:
- for [POST /sale/product-offers](https://developer.allegro.pl/en/documentation/#operation/createProductOffers) and [GET /sale/product-offers/{offerId}](https://developer.allegro.pl/en/documentation/#operation/getProductOffer) - **“product”** field has been replaced with the **“productSet”** field, which is an array of objects. Currently, you can provide data only for one product in it.
**Sample request structure:**
```
{
"productSet":[{
“product”:
{
“id”: “bca3791d-a9f8-43e6-885f-c563b7fb30ee”
}
}],
"sellingMode": {
"price": {
"amount": "220.85",
"currency": "PLN"
}
},
"stock": {
"available": 10
}
}
```
- for [PATCH /sale/product-offers/{offerId}](https://developer.allegro.pl/en/documentation/#operation/editProductOffers) - if the offer is ended and you will update the quantity for it to more than 0, we will not activate the offer - in this case, offer will remain in “ENDED” status.
To start using **beta.v3**, change the data in **Content-Type** and **Accept** headers to **“application/vnd.allegro.beta.v3+json”**.
**Why did we release a new version of resources?**
In the coming months we plan to introduce the possibility to define product sets, i.e. offers composed of few products. An example of such a set can be an offer that contains two items: a game console and an additional game. In this case, you will be able to define via POST /sale/product-offers two different products within one offer.
The change in PATCH /sale/product-offers we introduced in response to your suggestions - to make it easier to manage offers.
**Note! We plan to introduce the opportunity to define product sets only in /sale/product-offers resources.** At the moment of implementing the feature, we will also add in the request structure the possibility of specifying the quantity of each product included in the set.
Owing to /sale/product-offers resources you can easily:
- [list a new offer connected with a product](https://developer.allegro.pl/en/documentation/#operation/createProductOffers) - all you have to do is provide an identifier of the product from our database or its EAN, price and quantity. You can also create your own product. If, based on the data provided, we recognize that the product is in our database, we will take its data and include it in your offer, other fields we will fill with default values.
- [update data in the offer](https://developer.allegro.pl/en/documentation/#operation/editProductOffers) - you do not have to send the whole offer structure, it is enough to provide only the field you want to change.
You can find more information about /sale/product-offers resources in our [tutorial](https://developer.allegro.pl/en/product_offers/).
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á.