allegro / allegro/allegro-api

[NEWS] 1 października 2025 dostosujemy Allegro API do rozporządzenia o systemie kaucyjnym / On October 1, 2025, we will adapt Allegro API to the deposit system regulation

Open
#12,013 2 comments 0 reactions 1 assignee Claimed by @Lukasz-Zurek View on GitHub
News
Dominant language
No language data
Stars
244
Forks
40
PR merge metrics
No merged PRs in 30d

Description

**1 października 2025 roku** w Polsce wejdzie w życie [nowe rozporządzenie UE](https://isap.sejm.gov.pl/isap.nsf/download.xsp/WDU20240001911/O/D20241911.pdf), które wprowadza ogólnopolski system [kaucji za opakowania](https://help.allegro.com/pl/sell/a/zmiany-i-nowosci-dla-sprzedajacych-w-sierpniu-wrzesniu-i-pazdzierniku-Rd7Gxly5Lce#dostosujemy-sprzedaz-na-allegro-do-wymogow-systemu-kaucyjnego) po napojach.

Nowe obowiązki obejmą wszystkich przedsiębiorców w Polsce, którzy sprzedają napoje w opakowaniach objętych kaucją. Będą to:

- jednorazowe butelki z tworzyw sztucznych do 3 litrów,
- puszki metalowe do 1 litra,
- szklane butelki wielorazowego użytku do 1,5 litra.

**Co zmienimy w publicznym API?**

1. Od dzisiaj skorzystasz z nowego zasobu [GET /deposit/types](https://developer.allegro.pl/documentation#tag/Deposits/operation/getDepositTypes), za pomocą którego pobierzesz wszystkie dostępne kaucje.

**Przykładowy request:**

```
curl -X GET \
'https://api.allegro.pl/deposit/types’ \
-H 'Authorization: Bearer {token}' \
-H 'Accept: application/vnd.allegro.public.v1+json' \
```

**Przykładowy fragment odpowiedzi:**

```
{
"deposits": [
{
"id": "5e8a9e73-7e55-4896-bd8a-9c430413e808", // identyfikator kaucji
"name": "Reusable glass bottles up to 1.5 liters", // nazwa kaucji
"marketplaceId": "allegro-pl", // serwis allegro, do którego przypisana jest kaucja
"price": {
"amount": "0.5", // wartość kaucji
"currency": "PLN" // waluta kaucji
}
}
]
}
```

2. **Od 1 października 2025** wprowadzimy następujące zmiany:

- dla [POST /sale/product-offers](https://developer.allegro.pl/documentation#operation/createProductOffers) udostępnimy nowy obiekt "deposits", gdzie podczas tworzenia nowej oferty wskażesz:

- **“id”** - identyfikator kaucji, który pobierzesz za pomocą [GET /deposit/types](https://developer.allegro.pl/documentation#tag/Deposits/operation/getDepositTypes),

- **“quantity”** - liczbę sztuk, dla których zostanie pobrana kaucja.

Dane zwrócimy również w odpowiedzi, gdy skorzystasz z [GET /sale/product-offers/{offerId}](https://developer.allegro.pl/documentation/#operation/getProductOffer).

**Przykładowy request i response:**

```
{
"productSet": [
{
"product": {},
"quantity": {},
"responsiblePerson": {},
"responsibleProducer": {},
"safetyInformation": {},
"marketedBeforeGPSRObligation": true,
"deposits": [
{
"id": "5f4fbc9d-f7f2-46cc-8db9-ec52623f5627", // identyfikator kaucji, który pobierzesz za pomocą GET /deposit/types,
"quantity": 5 // liczba sztuk, dla których zostanie pobrana kaucja
},
{
"id": "cac2139b-98f8-45f6-87b0-6d7915e4a2b4",
"quantity": 12
}
]
}
]
}
```

- dla zasobów do zarządzania zamówieniami:

- [GET /order/checkout-forms](https://developer.allegro.pl/documentation/#operation/getListOfOrdersUsingGET),
- [GET /order/checkout-forms/{id}](https://developer.allegro.pl/documentation/#operation/getOrdersDetailsUsingGET),

zwrócimy nowe pola **“deposit.price.amount”** i **“deposit.price.currency”**, w których zwrócimy wartość i walutę kaucji.

**Przykładowy fragment odpowiedzi:**

```
"lineItems"[
...
"deposit": { - kaucja
"price": {
"amount": "123.45", // wartość kaucji; jest ona pobierana za daną ofertę, jeśli jednak oferta składa się z wielu produktów z różnymi kaucjami, wartość w tym polu jest sumą tych kaucji
"currency": "PLN" // waluta kaucji
}
},
...
]
```

- dla [POST /payments/refunds](https://developer.allegro.pl/documentation/#tag/Payments/operation/initiateRefund) udostępnimy nowy obiekt **"deposits"**, gdzie zrealizujesz zwrot kaucji dla klienta za wskazany identyfikator grupy przedmiotów wchodzących w skład zamówienia.

**Przykładowy request:**

```
"lineItems": [{
"id": "09f0b4cc-7880-11e9-8f9e-2a86e4085a59",
"type": "QUANTITY",
"quantity": 5,
"value": null
}],
"deposits": [{
"lineItemId": "09f0b4cc-7880-11e9-8f9e-2a86e4085a59", // identyfikator grupy przedmiotów wchodzących w skład zamówienia, które pobierzesz za pomocą GET /order/checkout-forms, lub GET /order/checkout-forms/{id},
"totalValue": { // łączna suma kaucji
"amount": 20, // wartość kaucji
"currency": "PLN" // waluta kaucji
}}
]
```

Dane dotyczące zwrotu zwrócimy również w odpowiedzi, gdy skorzystasz z [GET /payments/refunds](https://developer.allegro.pl/documentation/#tag/Payments/operation/getRefundedPayments).

Więcej informacji na temat systemu kaucyjnego w Allegro, znajdziesz na stronie [“Dla sprzedających”](https://help.allegro.com/pl/sell/a/zmiany-i-nowosci-dla-sprzedajacych-w-sierpniu-wrzesniu-i-pazdzierniku-Rd7Gxly5Lce#dostosujemy-sprzedaz-na-allegro-do-wymogow-systemu-kaucyjnego).

--------

**On October 1, 2025**, a [new EU regulation](https://isap.sejm.gov.pl/isap.nsf/download.xsp/WDU20240001911/O/D20241911.pdf) will come into force in Poland, introducing a nationwide [deposit system for beverage packaging](https://help.allegro.com/pl/sell/a/zmiany-i-nowosci-dla-sprzedajacych-w-sierpniu-wrzesniu-i-pazdzierniku-Rd7Gxly5Lce#dostosujemy-sprzedaz-na-allegro-do-wymogow-systemu-kaucyjnego).

The new obligations will apply to all entrepreneurs in Poland who sell beverages in packaging covered by the deposit, which are:

- single-use plastic bottles up to 3 liters
- metal cans up to 1 liter
- reusable glass bottles up to 1.5 liter.

**What will we change in the public API?**

1. From today you can use the new resource [GET /deposit/types](https://developer.allegro.pl/documentation#tag/Deposits/operation/getDepositTypes), which will allow you to retrieve all available deposits.

**Sample request:**

```
curl -X GET \
'https://api.allegro.pl/deposit/types’ \
-H 'Authorization: Bearer {token}' \
-H 'Accept: application/vnd.allegro.public.v1+json' \
```

**Sample response fragment:**

```
{
"deposits": [
{
"id": "5e8a9e73-7e55-4896-bd8a-9c430413e808", // deposit ID
"name": "Reusable glass bottles up to 1.5 liters", // deposit name
"marketplaceId": "allegro-pl", // Allegro service to which the deposit is assigned
"price": {
"amount": "0.5", // deposit amount
"currency": "PLN" // deposit currency
}
}
]
}
```

2. **from October 1, 2025**, we will introduce the following changes:

- for [POST /sale/product-offers](https://developer.allegro.pl/documentation#operation/createProductOffers), we will provide a new **"deposits"** object, where when creating a new offer, you will specify:

- **“id”** - the deposit ID, which you can retrieve using [GET /deposit/types](https://developer.allegro.pl/documentation#tag/Deposits/operation/getDepositTypes),
- **“quantity”** - the number of items for which the deposit will be charged.

We will also return data in the response when you use [GET /sale/product-offers/{offerId}](https://developer.allegro.pl/documentation/#operation/getProductOffer).

**Sample request & response:**

```
{
"productSet": [
{
"product": {},
"quantity": {},
"responsiblePerson": {},
"responsibleProducer": {},
"safetyInformation": {},
"marketedBeforeGPSRObligation": true,
"deposits": [
{
"id": "5f4fbc9d-f7f2-46cc-8db9-ec52623f5627", // deposit ID, which you can retrieve using GET /deposit/types,
"quantity": 5 // number of items for which a deposit will be charged,
},
{
"id": "cac2139b-98f8-45f6-87b0-6d7915e4a2b4",
"quantity": 12
}
]
}
]
}
```

- for order management resources:

- [GET /order/checkout-forms](https://developer.allegro.pl/documentation/#operation/getListOfOrdersUsingGET),
- [GET /order/checkout-forms/{id}](https://developer.allegro.pl/documentation/#operation/getOrdersDetailsUsingGET),

we will return new fields **“deposit.price.amount”** & **“deposit.price.currency”**, in which we will refund the value and currency of the deposit.

**Sample response fragment:**

```
"lineItems"[
...
"deposit": { - deposit
"price": {
"amount": "123.45", // the deposit value; it is charged for a given offer, but if the offer consists of multiple products with different deposits, the value in this field is the sum of these deposits
"currency": "PLN" // deposit currency
}
},
...
]
```

- for [POST /payments/refunds](https://developer.allegro.pl/documentation/#tag/Payments/operation/initiateRefund) we will provide a new **"deposits"** object, where you will refund the deposit to the customer for the indicated identifier of the group of items included in the order.

**Sample request:**

```
"lineItems": [{
"id": "09f0b4cc-7880-11e9-8f9e-2a86e4085a59",
"type": "QUANTITY",
"quantity": 5,
"value": null
}],
"deposits": [{
"lineItemId": "09f0b4cc-7880-11e9-8f9e-2a86e4085a59", // the identifier of the group of items included in the order, which you can retrieve using GET /order/checkout-forms, or GET /order/checkout-forms/{id},
"totalValue": { // total deposit value
"amount": 20, // deposit amount
"currency": "PLN" // deposit currency
}}
]
```

We will also return refund details in the response when you use [GET /payments/refunds](https://developer.allegro.pl/documentation/#tag/Payments/operation/getRefundedPayments).

More information about the deposit system at Allegro can be found on the [“For sellers”](https://help.allegro.com/pl/sell/a/zmiany-i-nowosci-dla-sprzedajacych-w-sierpniu-wrzesniu-i-pazdzierniku-Rd7Gxly5Lce#dostosujemy-sprzedaz-na-allegro-do-wymogow-systemu-kaucyjnego) page.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.