allegro / allegro/allegro-api

[NEWS] PATCH /sale/product-offers/{offer-id} - nowa metoda edycji oferty / PATCH/sales/product-offers/{offer-id} - new resource for offer edition

オープン
#3,764 コメント 20 件 リアクション 1 件 担当者 1 名 @AureliuszBrussy が担当を希望しています GitHub で見る
News
主要言語
言語のデータがありません
スター
244
フォーク
40
PR マージ指標
30日以内にマージされた PR はありません

説明

W dniu dzisiejszym, obok wcześniej zaprezentowanego przez nas zasobu [POST /sale/product-offers](https://developer.allegro.pl/documentation/#operation/createProductOffers), udostępniliśmy nowy zasób [PATCH /sale/product-offers/{offer-id}](https://developer.allegro.pl/documentation/#operation/editProductOffers), dzięki któremu edytujesz swoją ofertę w prosty sposób - zmienisz dowolne pole oferty, a jednocześnie nie musisz przekazywać całego jej modelu.

Jeżeli skorzystasz z [PATCH /sale/product-offers/{offer-id}](https://developer.allegro.pl/documentation/#operation/editProductOffers) i nie podasz wartości pola - w ofercie pozostawimy dotychczasową jego wartość i zmienimy tylko te, w których przekażesz wartość inną niż dotychczas. Z kolei, gdy przekażesz wartość **null** - usuniemy z oferty wartość pola, o ile pole nie jest wymagane.

Dzięki takiemu podejściu edytujesz niezależnie dowolne pole w ofercie, m.in:

- zdjęcia,
- parametry,
- lokalizację,
- cenę,
- opis oferty.

Przy edycji chcieliśmy zapewnić te same udogodnienia, które przy tworzeniu ofert daje [POST /sale/product-offers](https://developer.allegro.pl/documentation/#operation/createProductOffers), dlatego dzięki [PATCH /sale/product-offers/{offer-id}](https://developer.allegro.pl/documentation/#operation/editProductOffers) m.in. możesz zmienić status oferty bez konieczności wywołania osobnej komendy publikacji, czy też dodać do oferty zdjęcia bezpośrednio z zewnętrznych serwerów.

Więcej informacji na temat [PATCH /sale/product-offers/{offer-id}](https://developer.allegro.pl/documentation/#operation/editProductOffers) znajdziesz w [naszym poradniku](https://developer.allegro.pl/product_offers/#jak-edytowa%C4%87-ofert%C4%99).

------

Today, in addition to the [POST /sale/product-offers](https://developer.allegro.pl/en/documentation/#operation/createProductOffers) resource previously provided by us, we have introduced a new resource [PATCH /sale/product-offers/{offer-id}](https://developer.allegro.pl/en/documentation/#operation/editProductOffers). Owing to it, you can easily edit your offer - you can change any field of the offer, and at the same time, you don't have to pass its entire structure.

If you use [PATCH /sale/product-offers/{offer-id}](https://developer.allegro.pl/en/documentation/#operation/editProductOffers) and do not provide a field value - we will keep the current value of this field in the offer and change only those in which you provide a value different than before. On the other hand, when you pass a **null** value - we will remove the current value of the field from the offer, unless the field is required.

Thanks to this approach, you can independently edit any field in the offer, including:

- photos,
- parameters,
- location,
- price,
- description of the offer.

We wanted to provide the same facilities as when creating offers by [POST /sale/product-offers](https://developer.allegro.pl/en/documentation/#operation/createProductOffers), resource, therefore [PATCH /sale/product-offers/{offer-id}](https://developer.allegro.pl/en/documentation/#operation/editProductOffers) for example, allows you to change the offer status without having to use a separate publication command, or to add images to the offer directly from external server.

You can find more information about [PATCH /sale/product-offers/{offer-id}](https://developer.allegro.pl/en/documentation/#operation/editProductOffers) in [our guide](https://developer.allegro.pl/en/product_offers/#how-to-edit-an-offer).

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。