allegro / allegro/allegro-api

[NEWS] Cenniki dostawy - określ maksymalną wagę paczki / Shipping rates - specify the maximum weight of the package

Offen
#5,136 0 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @AureliuszBrussy Auf GitHub ansehen
News
Vorherrschende Sprache
Keine Sprachdaten
Sterne
244
Forks
40
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Dla wszystkich metod dostawy, które dodajesz do [cenników dostawy](https://developer.allegro.pl/sale/#cennik-dostaw), możesz określić:
- cenę pierwszej sztuki w paczce,
- maksymalną liczbę sztuk przedmiotu w paczce,
- dopłatę za kolejne sztuki przedmiotu w paczce.

**Co zmieniliśmy?**

Od dziś przy wybranych metodach dostawy udostępniliśmy nową opcję, dzięki której możesz określić również maksymalną wagę jednej paczki.

Dlatego rozszerzyliśmy:

- [GET /sale/delivery-methods](https://developer.allegro.pl/documentation/#operation/getListOfDeliveryMethodsUsingGET) - o nową strukturę **deliveryMethods[].shippingRatesConstraints.maxPackageWeight** z polami:
- **supported** - flaga określająca, czy możesz definiować maksymalną wagę paczki dla danej metody dostawy,
- **min** - minimalna dopuszczalna waga paczki,
- **max** - maksymalna dopuszczalna waga paczki,
- **unit** - jednostka wagi.

**Przykładowa struktura response’a:**
```
{
"id": "0e4c7d59-64b6-4b06-89c3-c1d941506dd0",
"name": "Allegro Kurier UPS",
"paymentPolicy": "IN_ADVANCE",
"allegroEndorsed": false,
"shippingRatesConstraints": {
...
"maxPackageWeight": {
"supported": true, -- czy dopuszczamy możliwość
zadeklarowania maksymalnej wagi
paczki
"min": "15.000", -- minimalna dopuszczalna wartość,
"max": "20.000", -- maksymalna dopuszczalna wartość,
"unit": "KILOGRAM" -- jednostka wagi.
},
...
}
}
}
```

- [POST /sale/shipping-rates](https://developer.allegro.pl/documentation/#operation/createShippingRatesSetUsingPOST) oraz [GET /sale/shipping-rates/{id}](https://developer.allegro.pl/documentation/#operation/getShippingRatesSetUsingGET) - o nową strukturę **rates[].maxPackageWeight** z polami:
- **value** - wartość maksymalnej wagi paczki dla danej metody dostawy w cenniku dostawy,
- **unit** - jednostka wagi.

**Przykładowy request:**
```
curl -X POST \
‘https://api.allegro.pl/sale/shipping-rates’ \
-H 'Accept: application/vnd.allegro.public.v1+json' \
-H 'Authorization: {token}' \
-H 'Content-Type: application/vnd.allegro.public.v1+json' \
-d ‘{
"id": "74989fd0-0e91-47e6-b446-d77ebd2a6ac8",
"name": "Cennik - elektronika",
"rates": [{
"deliveryMethod": {
"id": "0e4c7d59-64b6-4b06-89c3-c1d941506dd0"
},
"maxQuantityPerPackage": 5,
"maxPackageWeight": {
"value": "19.000", -- deklarowana maksymalna waga
paczki,
"unit": "KILOGRAM" -- jednostka wagi, obecnie obsługujemy
tylko ‘KILOGRAM’.
},
"firstItemRate": {
"amount": "10.00",
"currency": "PLN"
},
"nextItemRate": {
"amount": "0.00",
"currency": "PLN"
},
"shippingTime": null
}
],
}’
```

**Uwaga!** Nie musisz podawać w cenniku maksymalnej wagi paczki – nie wymagamy tej wartości.

Uwzględnienie wagi przy wyliczeniu kosztu przesyłki w zamówieniu bazuje na parametrze “Waga produktu z opakowaniem jednostkowym” (id parametru: 17448).

Jeżeli chociaż jedna oferta w zamówieniu nie ma uzupełnionego parametru wagowego, wówczas koszt przesyłki wyliczymy na podstawie zadeklarowanej maksymalnej liczby sztuk w paczce.

Dodatkowo w przypadku, gdy ustawisz w cenniku dostawy dwie wartości: maksymalną liczbę sztuk w paczce oraz maksymalną wagę paczki, przy określeniu ostatecznej ceny dostawy weźmiemy pod uwagę każdą z nich. Jeśli kupujący przekroczy limit w przynajmniej jednej z tych wartości, naliczymy koszt kolejnej paczki.

**Uwaga!** Jeśli określisz maksymalną wagę dla metody dostawy z płatnością z góry i analogiczna pobraniowa metoda dostawy także dostępna będzie w danym cenniku - to obie metody muszą mieć określoną tą samą wartość w polu **rates[].maxPackageWeight.value**.

Aktualnie maksymalną wagę paczki określisz dla metod dostawy:
- Allegro Kurier UPS (id: 0e4c7d59-64b6-4b06-89c3-c1d941506dd0),
- Allegro Kurier UPS pobranie (id: 199d2a2a-7c90-4ca7-aaf3-c1d941506dd0).

W kolejnych miesiącach planujemy udostępnić tą możliwość również dla innych metod dostawy.

Więcej informacji na temat cenników dostawy znajdziesz w [naszym poradniku](https://developer.allegro.pl/sale/#cennik-dostaw) oraz na [stronie dla sprzedających](https://allegro.pl/pomoc/aktualnosci/od-dzis-mozesz-okreslic-maksymalna-wage-paczki-dla-metod-dostawy-allegro-kurier-ups-i-allegro-kurier-ups-pobranie-9gg2W84VYUZ).

----------
For all delivery methods that you add to [delivery price lists](https://developer.allegro.pl/en/sale/#shipping-price-list), you can specify:
- the price of the first item in the package,
- the maximum number of items in the package,
- surcharge for additional items in the package.

**What have we changed?**

From now on, we have provided a new option for selected delivery methods, owing to which you can also specify the maximum weight of one parcel.

That's why we expanded:

- [GET /sale/delivery-methods](https://developer.allegro.pl/en/documentation/#operation/getListOfDeliveryMethodsUsingGET) - with new **deliveryMethods[].shippingRatesConstraints.maxPackageWeight** structure with fields:
- **supported** - flag specifying whether you can define maximum package weight for a given delivery method,
- **min** - minimum allowed package weight,
- **max** - maximum allowed package weight,
- **unit** - weight unit.

**Sample response structure:**
```
{
"id": "0e4c7d59-64b6-4b06-89c3-c1d941506dd0",
"name": "Allegro Kurier UPS",
"paymentPolicy": "IN_ADVANCE",
"allegroEndorsed": false,
"shippingRatesConstraints": {
...
"maxPackageWeight": {
"supported": true, -- whether we allow the possibility
declare the maximum weight
of the package,
"min": "15.000", -- minimum allowed package weight,
"max": "20.000", -- maximum allowed package weight,
"unit": "KILOGRAM" -- weight unit.
},
...
}
}
}
```

- [POST /sale/shipping-rates](https://developer.allegro.pl/en/documentation/#operation/createShippingRatesSetUsingPOST) and [GET /sale/shipping-rates/{id}](https://developer.allegro.pl/en/documentation/#operation/getShippingRatesSetUsingGET) - with a new **rates[].maxPackageWeight** structure with fields:
- **value** - value of maximum package weight for given delivery method in delivery price list,
- **unit** - weight unit.

**Sample request:**
```
curl -X POST \
‘https://api.allegro.pl/sale/shipping-rates’ \
-H 'Accept: application/vnd.allegro.public.v1+json' \
-H 'Authorization: {token}' \
-H 'Content-Type: application/vnd.allegro.public.v1+json' \
-d ‘{
"id": "74989fd0-0e91-47e6-b446-d77ebd2a6ac8",
"name": "Shipping rate - electronics",
"rates": [{
"deliveryMethod": {
"id": "0e4c7d59-64b6-4b06-89c3-c1d941506dd0"
},
"maxQuantityPerPackage": 5,
"maxPackageWeight": {
"value": "19.000", -- declared maximum weight
package weight,
"unit": "KILOGRAM" -- weight unit, we currently support
only 'KILOGRAM'.
},
"firstItemRate": {
"amount": "10.00",
"currency": "PLN"
},
"nextItemRate": {
"amount": "0.00",
"currency": "PLN"
},
"shippingTime": null
}
],
}’
```

**Note!** You do not have to specify the maximum weight of the package in the price list - we do not require this value.

Taking the weight into consideration when calculating the order, shipment cost is based on the parameter "Weight of the product with packing" (parameter id: 17448).

If at least one offer in the order does not have the weight parameter filled in, we will calculate the shipping cost on the basis of the declared maximum number of items in the package.

Additionally, if you set two values in the delivery price list: the maximum number of items in a package and the maximum weight of the package, we will take each of these values into account when determining the final delivery price. If the buyer exceeds the limit in at least one of these values, we will charge the cost of the next package.

**Note!** If you specify a maximum weight for a prepaid delivery method and a corresponding cash on delivery method is also available in the given price list - both methods must have the same value specified in **rates[].maxPackageWeight.value** field.

Currently, you can define the maximum package weight for the delivery methods:
- Allegro Kurier UPS (id: 0e4c7d59-64b6-4b06-89c3-c1d941506dd0),
- Allegro Kurier UPS pobranie (id: 199d2a2a-7c90-4ca7-aaf3-c1d941506dd0).

In the coming months, we plan to make this option available for other delivery methods as well.

For more information on shipping rates - see [our guide](https://developer.allegro.pl/en/sale/#shipping-price-list) and [for sellers page](https://allegro.pl/pomoc/aktualnosci/od-dzis-mozesz-okreslic-maksymalna-wage-paczki-dla-metod-dostawy-allegro-kurier-ups-i-allegro-kurier-ups-pobranie-9gg2W84VYUZ).

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.