allegro / allegro-api

Issue tracker and wiki for Allegro REST API
https://developer.allegro.pl/
213 stars 39 forks source link

[NEWS] Parametr GTIN w ofertach oraz produktach / GTIN parameter in offers and products #3264

Open MaciejFrackowiak opened 4 years ago

MaciejFrackowiak commented 4 years ago

Od 29.06.2020 udostępnimy parametr globalny numer jednostki handlowej tzw. GTIN. W większości kategorii oznaczymy go jako parametr podstawowy, czyli taki, który identyfikuje produkt w ofercie. Jeżeli chcesz określić lub zmienić GTIN, w zależności od kategorii, skorzystaj z dostępnych parametrów:

Pamiętaj, że parametry dostępne w danej kategorii sprawdzisz za pomocą GET /sale/categories/{categoryId}/parameters.

GTIN w ofertach W ofertach parametr GTIN będzie nadrzędny wobec pola “ean”, którego wartości automatycznie przeniesiemy do nowego parametru. Wartość EAN, ISBN lub ISSN możesz uzupełnić jedynie w parametrze GTIN, aby to zrobić pobierz aktualny stan oferty poprzez GET /sale/offers/{offerId}, a następnie edytuj poprzez PUT /sale/offers/{offerId}. Jeśli spróbujesz zmienić wartość pola “ean” w ofercie, otrzymasz komunikat błędu: “Pole ean jest tylko do odczytu. Wartość z pola ean podaj w parametrze o id: {id}.”

Jeżeli dotychczas w integracji używasz pola “ean” by rozpoznać swoje oferty (jako sygnaturę), wykorzystaj w tym celu dedykowane dla sygnatury pole “external.id”.

GTIN w produktach Nowy parametr GTIN dla produktów będzie funkcjonować równolegle z dotychczasową tablicą “eans”. Aktualne wartości “eans” przeniesiemy do nowego parametru. Zgłaszając propozycję produktu przez POST /sale/product-proposals możesz przekazać wartość EAN, ISBN lub ISSN tylko w parametrze GTIN.

Parametr GTIN zyska flagę “isGTIN” w strukturze “options” parametrów produktu. Dzięki temu podczas dodawania oferty na podstawie produktu rozpoznasz, że jeśli parametr ma wiele wartości, to możesz przekazać tylko jedną z nich.

Ważne! W przyszłości pole “ean” w ofercie oraz tablicę “eans” w produkcie usuniemy. Wartość GTIN (czyli EAN, ISBN, ISSN) zmienisz tylko korzystając z parametru, dlatego już dzisiaj rozpocznij prace nad ich poprawną obsługą w swojej aplikacji.

Tydzień przed wdrożeniem zmiany udostępnimy na Sandbox kategorię oraz produkt z nowym parametrem GTIN, co pozwoli Wam przetestować jego działanie. O szczegółach poinformujemy w komunikacie na naszym forum.


On June 29th, 2020 we will introduce the Global Trade Item Number (GTIN) parameter. In most categories, we will mark it as a basic parameter, which identifies the product in an offer. If you want to add or change GTIN parameter use the available parameters (depending on category):

You can check parameters available in a given category by GET /sale/categories/{categoryId}/parameters.

GTIN in offers In offers, GTIN parameter will override “ean” field, whose values will be automatically transferred to the new parameter. You can only fill in the EAN, ISBN, ISSN value in the GTIN parameter. To do so retrieve an offer via GET /sale/offers/{offerId} and then edit it by PUT /sale/offers/{offerId}. If you try to change the value of the "ean" field in the offer, you will receive an error message: "Ean field is read-only. Set this value in parameter with id: {id}."

If you use in your integration the "ean" to recognize your offers (as so-called signature), switch to the "external.id" field, which is dedicated to the signature.

GTIN in products The new GTIN parameter for products will function in parallel with the existing "eans" array. We will transfer the current values of "eans" to the new parameter. If you propose a product via POST /sale/product-proposals you can submit EAN, ISBN or ISSN value only in the GTIN parameter.

The GTIN parameter will receive the "isGTIN" flag in the "options" structure of the product parameters. Owing to it, when you will add an offer based on a product, you will recognize if a parameter has many values, you can only use one of them.

Note! In the future, we will remove the "ean" field in the offer and the "eans" array in the product. You will change the GTIN value (i.e. EAN, ISBN, ISSN) only using the parameter, so start working on their correct implementation in your application today.

A week before the introduction we will make the category and product available on Sandbox with the new GTIN parameter. It will allow you to test the new feature. We will inform you about the details on our forum.

tomylee0 commented 4 years ago

Czy od 29 czerwca wystawiając nową ofertę wciąż będzie można ustawiać tradycyjne pole "ean"?

MaciejFrackowiak commented 4 years ago

@tomylee0 Nie, pole "ean" będzie polem tylko do odczytu. Parametr GTIN (EAN, ISBN, ISSN) określisz tylko poprzez odpowiedni parametr (jeden z podanej listy dla każdej kategorii).

tomylee0 commented 4 years ago

Jak zachowa się Allegro REST API jeśli wciąż w poniedziałek "ean" podczas wystawiania oferty będzie wypełniany? Otrzymam błąd i nie będę mógł opublikować oferty czy może "ean" w wysłanym drafcie będzie ignorowany i będę mógł opublikować ofertę?

P.S. Zakładam, że nowy parametr GTIN (EAN lub ISBN lub ISSN) nie będzie obowiązkowy.

MaciejFrackowiak commented 4 years ago

@tomylee0 W komunikacie zamieściłem info dot. takiego przypadku:

Jeśli spróbujesz zmienić wartość pola “ean” w ofercie, otrzymasz komunikat błędu: “Pole ean jest tylko do odczytu. Wartość z pola ean podaj w parametrze o id: {id}.”

I tak, obecnie parametr GTIN nie będzie obowiązkowy.

rafalandryanczyk commented 4 years ago

Czy istnieje możliwość dodania odpowiedniego GTIN parametru do metody GET /sale/products ? Metoda ta zwraca wszystkie wymagane parametry dla danego produktu po za parametrem GTIN.

MaciejFrackowiak commented 4 years ago

@rafalandryanczyk Wartość tego parametru nie jest zwracana, podobnie jak sama wartość pola "eans". Dopiero po odpytaniu o konkretny produkt przez GET /sale/products/{productId} dane te uzyskasz.