allegro / allegro/allegro-api

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

Ouverte
#3,257 0 commentaires 0 réactions 1 personne assignée Réclamée par @PrzemyslawLukanowski Voir sur GitHub
News
Langage dominant
Aucune donnée de langage
Étoiles
244
Forks
40
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.