[NEWS] Produktyzacja - w danych produktów dodaliśmy nowe kategorie, w których możesz wystawić ofertę połączoną z Katalogiem produktów / Productization - we have added new categories in the product data, in which you can list an offer assigned to a Product Catalog
- 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ả
Od dziś, w przypadku gdy produkt pasuje do wielu podobnych do siebie kategorii, możesz wystawić ofertę powiązaną z tym produktem w innej, zdefiniowanej przez nas podobnej kategorii.
W odpowiedzi na [GET /sale/products/{productId}](https://developer.allegro.pl/documentation/#operation/getSaleProduct) zwrócimy nową listę:
- **category.similar**
w której wskazujemy **id** kategorii podobnych. Skorzystaj z wybranego identyfikatora, aby wystawić ofertę sprzedaży produktu w jednej ze zwróconych kategorii.
**Przykładowy request:**
```
curl -X GET
‘https://api.allegro.pl/sale/products/b2b61e23-b580-4471-b653-6ed25fd179f7’
-H ‘Authorization: Bearer {token}’
-H ‘accept: application/vnd.allegro.public.v1+json’
```
**Przykładowy response:**
```
{
“id”: “b2b61e23-b580-4471-b653-6ed25fd179f7”,
“name”: “BIO Pochodnia”,
“category”: {
“id”: “261573”,
“similar”: [
{
“id”: “110914”
},
{
“id”: “305121”
}
]
}
…
}
```
**Ważne!** Zbiory kategorii podobnych są definiowane przez nas - zwracamy je w odpowiedzi na[ GET /sale/products/{productId}](https://developer.allegro.pl/documentation/#operation/getSaleProduct) - nie możesz tworzyć ich samodzielnie. Zbiór kategorii podobnych jest aktualnie ograniczony, jednak będziemy go systematycznie rozszerzać.
Kategorie mogą różnić się dostępnymi w nich parametrami, dlatego część uzupełnionych w produkcie parametrów może nie być zgodna z tymi możliwymi do użycia w kategorii podobnej.
Użyj [GET /sale/products/{productId}?category.id={similarCategoryId}](https://developer.allegro.pl/documentation/#operation/getSaleProduct), a w parametrze **category.id** podaj **id** ze zwróconego przez nas zbioru kategorii podobnych, aby filtrować uzupełnione w produkcie parametry dla wybranej kategorii podobnej. W odpowiedzi otrzymasz parametry produktu, które możesz wykorzystać podczas wystawiania oferty we wskazanej kategorii podobnej.
Jednocześnie rozszerzyliśmy strukturę żądania w części ofertowej w:
- [POST /sale/product-offers](https://developer.allegro.pl/documentation/#operation/createProductOffers),
- [PATCH /sale/product-offers/{offerId}](https://developer.allegro.pl/documentation/#operation/editProductOffers)
o nowe pole - **category.id**. Uzupełnij to pole o wartość **id**, którą zwracamy w danych produktu dla jednej z kategorii podobnych. Dzięki temu wystawisz ofertę powiązaną z produktem w wybranej kategorii podobnej.
Jeżeli w odpowiedzi otrzymasz informację, aby uzupełnić brakujące parametry obowiązkowe, przekaż je w obiekcie **product**. Identyfikator parametru wraz z wartością sprawdzisz za pomocą [GET /sale/{categoryId}/parameters](https://developer.allegro.pl/documentation/#operation/getFlatParametersUsingGET_2).
Identyfikatory kategorii podobnych możesz użyć również, gdy wiążesz ofertę z produktem używając:
- [POST /sale/offers](https://developer.allegro.pl/documentation/#operation/createOfferUsingPOST),
- [PUT /sale/offers/{offerId}](https://developer.allegro.pl/documentation/#operation/updateOfferUsingPUT).
Aktualnie, w polu **category.id** zamiast id kategorii głównej, możesz przekazać jedną z wartości dostępnych w produkcie w polu **category.similar.id**.
Więcej informacji, jak wystawić ofertę powiązaną z produktem, znajdziesz w naszych poradnikach:
- [Jak jednym requestem wystawić ofertę powiązaną z produktem](https://developer.allegro.pl/product_offers/),
- [Jak powiązać ofertę z produktem](https://developer.allegro.pl/productization/).
-----------------
From now on, if the product fits into a few similar categories, you can list an offer assigned to this product, but in another, similar category defined by us.
In response to [GET /sale/products/{productId}](https://developer.allegro.pl/en/documentation/#operation/getSaleProduct) we will return a new list:
- **category.similar**
in which we indicate the **ID** of similar categories. Use the selected **ID** to list the product in one of the returned categories.
**Sample request:**
```
curl -X GET
‘https://api.allegro.pl/sale/products/b2b61e23-b580-4471-b653-6ed25fd179f7’
-H ‘Authorization: Bearer {token}’
-H ‘accept: application/vnd.allegro.public.v1+json’
```
**Sample response:**
```
{
“id”: “b2b61e23-b580-4471-b653-6ed25fd179f7”,
“name”: “BIO Torch”,
“category”: {
“id”: “261573”,
“similar”: [
{
“id”: “110914”
},
{
“id”: “305121”
}
]
}
…
}
```
**Note!** Sets of similar categories are defined by us - we return them in response to [GET /sale/products/{productId}](https://developer.allegro.pl/en/documentation/#operation/getSaleProduct) and you cannot create them by yourself. The set of similar categories is currently limited, but we will systematically expand it.
The parameters within the categories may differ, therefore some parameters in the product may not be consistent with those that can be used in a similar category.
Use [GET /sale/products/{productId}?category.id={similarCategoryId}](https://developer.allegro.pl/en/documentation/#operation/getSaleProduct) and in the **category.id** parameter put the **id** from the set of similar categories returned by us to filter the parameters for the selected similar category. In response, you will receive product parameters that you can use when listing an offer in a similar category.
At the same time, we expanded the request structure in the offer part in:
- [POST /sale/product-offers](https://developer.allegro.pl/en/documentation/#operation/createProductOffers),
- [PATCH /sale/product-offers/{offerId}](https://developer.allegro.pl/en/documentation/#operation/editProductOffers)
by a new field - **category.id**. Enter in this field one of the **id** value that we return in the product data in **category.similar** list. You will list an offer assigned to the product in a similar category.
If in response you receive information about missing required parameters, provide them in the **product** object. You can check parameter ID with its value via [GET /sale/{categoryId}/parameters](https://developer.allegro.pl/en/documentation/#operation/getFlatParametersUsingGET_2).
You can also use similar category IDs when you assign an offer to a product via:
- [POST /sale/offers](https://developer.allegro.pl/en/documentation/#operation/createOfferUsingPOST),
- [PUT /sale/offers/{offerId}](https://developer.allegro.pl/en/documentation/#operation/updateOfferUsingPUT).
Currently, in the **category.id** field, instead of the main category ID, you can enter one of the values available in the product in the **category.similar.id** field.
You can find more information on how to list offer assigned to a product in our guides:
- [How to list an offer assigned to a product with one request](https://developer.allegro.pl/en/product_offers/),
- [Assigning offers to a products](https://developer.allegro.pl/en/productization/).
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á.