allegro / allegro/allegro-api

[NEWS] Kampanie - zmieniamy sposób działania oraz dodamy nowe możliwości / Campaigns - we will make changes and add new features

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

説明

**24 sierpnia 2021** udostępnimy nowe operacje na zasobach do zarządzania zgłoszeniami ofert do kampanii, programów specjalnych oraz oznaczeń Allegro:

- **PATCH /sale/badges/offers/{offerId}/campaigns/{campaignId}** - zleć operację **zmiany ceny** lub **zakończenia oznaczenia** oferty w kampanii:

**Przykładowy request dla zmiany ceny:**

```
curl -X PATCH
‘https://api.allegro.pl/sale/badges/offers/12345678/campaigns/BARGAIN’
-H ‘Authorization: Bearer {token}’
-H ‘Content-Type: application/vnd.allegro.beta.v1+json‘
-d ‘{
“prices”: {
“bargain”: {
“value”: {
“amount”: “9.99”,
“currency”: “PLN”
}
}
}
}'
```
**Przykładowy request dla zakończenia oznaczenia:**

```
curl -X PATCH
‘https://api.allegro.pl/sale/badges/offers/12345678/campaigns/BARGAIN’
-H ‘Authorization: Bearer {token}’
-H ‘Content-Type: application/vnd.allegro.beta.v1+json‘
-d ‘{
“process”: {
“status”: “FINISHED”
}
}’
```
**Przykładowy response:**

```
{
“id”: “154179f0-ed4c-4b84-9260-302d2dec3801” – identyfikator operacji
}
```

- **GET ​/sale​/badge-operations​/{operationId}** - sprawdź status wykonania operacji zmiany ceny lub zakończenia oznaczenia:

**Przykładowy request:**

```
curl -X GET
‘https://api.allegro.pl/sale​/badge-operations​/154179f0-ed4c-4b84-9260-302d2dec3801’
-H ‘Authorization: Bearer {token}’
-H Accept: application/vnd.allegro.beta.v1+json‘
```

**Przykładowy response:**

```
{
“id”: “154179f0-ed4c-4b84-9260-302d2dec3801”,
“type”: “FINISH”,
“createdAt”: “2021-08-09T12:49:17.347Z”,
“updatedAt”: “2021-08-09T12:49:17.530Z”,
“campaign”: {
“id”: “BARGAIN”
},
“offer”: {
“id”: “12345678”
},
“process”: {
“status”: “REQUESTED”,
“rejectionReasons”: []
}
}
```

**24 sierpnia** rozpoczniemy także migrację wszystkich kampanii na mechanizm, w którym [funkcjonuje już program Allegro Ceny](https://developer.allegro.pl/news/#allegro-prices-badges).

**Jak to działa aktualnie?**

Wraz z zakwalifikowaniem oferty do kampanii (prócz programu **Allegro Ceny**), aktualizujemy również cenę w jej strukturze. Zmiana ta jest widoczna w polu **sellingMode.price.amount** na zasobach:

- **/sale/offers**,
- **/sale/product-offers**.

W przypadku zmiany bazowej ceny w strukturze oferty będącej w kampanii - oznaczenie jest usuwane, a oferta wykluczana z kampanii.

**Jakie zmiany wprowadzimy?**

Od **24 sierpnia 2021** jeżeli oferta zostanie zakwalifikowana do kampanii:

- nie zaktualizujemy ceny w jej strukturze - bazowa cena, którą zwrócimy w polu **sellingMode.price.amount** pozostanie **bez zmiany**,
- jeżeli dojdzie do zmiany ceny bazowej w ofercie w polu **sellingMode.price.amount** w trakcie trwania kampanii - nie zostanie ona z niej wykluczona,
- w odpowiedzi na [GET /sale/offer-events](https://developer.allegro.pl/documentation/#operation/getOfferEvents) nie zwrócimy zdarzenia o zmianie ceny w ofercie w wyniku jej zakwalifikowania do kampanii.

Zmiana ceny w ofercie, która jest w trakcie kampanii lub jej usunięcie z kampanii będzie możliwe dzięki **PATCH /sale/badges/offers/{offerId}/campaigns/{campaignId}**.

**Dlaczego wprowadzamy zmianę?**

Chcemy ułatwić zarządzanie kampaniami i programami. Dzięki zmianie sprzedający będą mogli ustawić nową cenę, która będzie obowiązywać tylko na czas trwania kampanii lub programu i będzie niezależna od ceny bazowej oferty.

Więcej informacji o kampaniach i oznaczeniach przeczytasz w [pomocy Allegro](https://allegro.pl/pomoc/dla-sprzedajacych/promowanie-ofert/specjalne-oznaczenia-ofert-na-listach-YL8zKmBRktz).

---------

**On August 24th, 2021**, we will add new resource operations for processing offers submitted to campaigns, special programs, and Allegro badges:

- **PATCH /sale/badges/offers/{offerId}/campaigns/{campaignId}** - command change of the price or end of the offer designation in the campaign:

**Sample request for price change:**

```
curl -X PATCH
‘https://api.allegro.pl/sale/badges/offers/12345678/campaigns/BARGAIN’
-H ‘Authorization: Bearer {token}’
-H ‘Content-Type: application/vnd.allegro.beta.v1+json‘
-d ‘{
“prices”: {
“bargain”: {
“value”: {
“amount”: “9.99”,
“currency”: “PLN”
}
}
}
}'
```
**Sample request for ending of the offer designation in the campaign:**

```
curl -X PATCH
‘https://api.allegro.pl/sale/badges/offers/12345678/campaigns/BARGAIN’
-H ‘Authorization: Bearer {token}’
-H ‘Content-Type: application/vnd.allegro.beta.v1+json‘
-d ‘{
“process”: {
“status”: “FINISHED”
}
}’
```
**Sample response:**

```
{
“id”: “154179f0-ed4c-4b84-9260-302d2dec3801” -- id of the operation
}
```

- **GET ​/sale​/badge-operations​/{operationId}** - check status of the price change or end of the offer designation in the campaign:

**Sample request:**

```
curl -X GET
‘https://api.allegro.pl/sale​/badge-operations​/154179f0-ed4c-4b84-9260-302d2dec3801’
-H ‘Authorization: Bearer {token}’
-H Accept: application/vnd.allegro.beta.v1+json‘
```

**Sample response:**

```
{
“id”: “154179f0-ed4c-4b84-9260-302d2dec3801”,
“type”: “FINISH”,
“createdAt”: “2021-08-09T12:49:17.347Z”,
“updatedAt”: “2021-08-09T12:49:17.530Z”,
“campaign”: {
“id”: “BARGAIN”
},
“offer”: {
“id”: “12345678”
},
“process”: {
“status”: “REQUESTED”,
“rejectionReasons”: []
}
}
```

**On August 24th**, we will also start migrating all campaigns to the mechanism in [which the Allegro Prices program already operates](https://developer.allegro.pl/en/news/#allegro-prices-badges).

**How does it work now?**

When an offer is qualified for a campaign (apart from the **Allegro Prices** program), we also update the price in its structure. This change is visible in the **sellingMode.price.amount** field on the resource:

- **/sale/offers**,
- **/sale/product-offers**.

If the base price changes in the structure of an offer that is in a campaign - the badge is removed and the offer is excluded from the campaign.

**What changes will we make?**

From **August 24th, 2021**, if the offer is qualified for the campaign:

- we will not update the price in its structure - the base price which we return in the **sellingMode.price.amount** field will remain **unchanged**,
- if there is a change in the base price in the offer in the **sellingMode.price.amount** field during the campaign - offer will not be excluded from campaign,
- [GET /sale/offer-events](https://developer.allegro.pl/en/documentation/#operation/getOfferEvents) response will also not return an event about a price change in an offer as a result of qualifying it for campaign.

Changing the price of an offer that is in a campaign or removing it from a campaign will be possible via **PATCH /sale/badges/offers/{offerId}/campaigns/{campaignId}**.

**Why do we make the change?**

We want to make it easier to manage offers in the campaigns and programs. With the change, sellers will be able to set a new price that will be valid only for the duration of the campaign or program and will be independent from the base offer price.

You can read more about campaigns and badges in the [Allegro Help Center](https://allegro.pl/help/for-sellers/promoting-offers/special-badges-on-the-offer-lists-B89Ggog2afb).

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

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

評価

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

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

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