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

Aberta
#3,764 20 comentários 1 reação 1 responsável Reivindicada por @AureliuszBrussy Ver no GitHub
News
Linguagem predominante
Sem dados de linguagem
Estrelas
244
Forks
40
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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).

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.