Dostawa
Słownik metod dostawy allee i cenniki dostawy sprzedawcy.
Metody dostawy
GET /sale/delivery-methods
Allegro + rozszerzenialimit: read
Słownik własny allee (identyfikatory Allegro tu nie obowiązują). Identyfikatory są stałe. paymentPolicy: przedpłata albo pobranie; allee.carrierId = kod przewoźnika do POST …/shipments.
Zgodność: zgodna z Allegro REST API, z rozszerzeniami allee (pola allee.*, alleeId) — GET /sale/delivery-methods.
Uprawnienie: dowolny ważny token lub klucz (działa też token aplikacji client_credentials).
Grupa limitu: read.
Odpowiedzi
200 Metody. · DeliveryMethodList
deliveryMethods array<DeliveryMethod> zawszePola obiektu
id string · uuid zawszeIdentyfikator metody (UUID allee, stały).
name string zawszepaymentPolicy string zawszePrzedpłata albo pobranie.
IN_ADVANCE, CASH_ON_DELIVERYallee object zawszePola obiektu
carrierId string zawszeKod przewoźnika — ten sam co w POST …/shipments.
Błędy
| HTTP | Kod | Znaczenie |
|---|---|---|
| 401 | invalid_token | Brak, zły, wygasły albo odwołany token lub klucz (format OAuth, nagłówek WWW-Authenticate). |
| 403 | ACCOUNT_INACTIVE | Konto sprzedawcy jest nieaktywne. |
| 403 | AccessDenied | Brak zakresu albo zasób innego sprzedawcy. |
| 403 | KEY_QUARANTINED | Kwarantanna: działa tylko odczyt (wykryto nietypowe użycie). |
| 403 | KEY_SUSPENDED | Klucz albo dostęp aplikacji wstrzymany (przez sprzedawcę albo ochronę). |
| 429 | TOO_MANY_REQUESTS | Przekroczony limit (minutowy, grupy operacji albo IP). |
| 500 | INTERNAL_ERROR | Błąd serwera allee. |
curl -sS -X GET "${ALLEE_API_URL:-https://api.allee.pl}/sale/delivery-methods" \
-H "Authorization: Bearer $ALLEE_API_KEY" \
-H "Accept: application/vnd.allegro.public.v1+json" \
-w '\nHTTP %{http_code}\n'<?php
// allee API: GET /sale/delivery-methods (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$ch = curl_init($base . '/sale/delivery-methods');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('ALLEE_API_KEY'),
'Accept: application/vnd.allegro.public.v1+json',
],
CURLOPT_RETURNTRANSFER => true,
]);
$odp = curl_exec($ch);
echo 'HTTP ', curl_getinfo($ch, CURLINFO_RESPONSE_CODE), "\n", $odp, "\n";# allee API: GET /sale/delivery-methods (Python 3, biblioteka requests)
import os
import requests
BASE = os.environ.get("ALLEE_API_URL", "https://api.allee.pl")
headers = {
"Authorization": "Bearer " + os.environ["ALLEE_API_KEY"],
"Accept": "application/vnd.allegro.public.v1+json",
}
r = requests.request("GET", BASE + "/sale/delivery-methods", headers=headers, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: GET /sale/delivery-methods (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const res = await fetch(`${BASE}/sale/delivery-methods`, {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.ALLEE_API_KEY}`,
"Accept": "application/vnd.allegro.public.v1+json",
},
redirect: "manual",
});
console.log("HTTP", res.status);
console.log(await res.text());// allee API: GET /sale/delivery-methods (C#, .NET 8+, HttpClient)
using System.Net.Http.Headers;
using System.Text;
var baseUrl = Environment.GetEnvironmentVariable("ALLEE_API_URL") ?? "https://api.allee.pl";
using var http = new HttpClient(new HttpClientHandler { AllowAutoRedirect = false });
using var req = new HttpRequestMessage(new HttpMethod("GET"), baseUrl + "/sale/delivery-methods");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALLEE_API_KEY"));
req.Headers.Accept.ParseAdd("application/vnd.allegro.public.v1+json");
using var res = await http.SendAsync(req);
Console.WriteLine($"HTTP {(int)res.StatusCode}");
Console.WriteLine(await res.Content.ReadAsStringAsync());// allee API: GET /sale/delivery-methods (Java 11+, java.net.http; uruchom: java Main.java)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String base = System.getenv().getOrDefault("ALLEE_API_URL", "https://api.allee.pl");
HttpRequest req = HttpRequest.newBuilder(URI.create(base + "/sale/delivery-methods"))
.header("Authorization", "Bearer " + System.getenv("ALLEE_API_KEY"))
.header("Accept", "application/vnd.allegro.public.v1+json")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpClient http = HttpClient.newBuilder().version(HttpClient.Version.HTTP_1_1).build();
HttpResponse<String> res = http.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println("HTTP " + res.statusCode());
System.out.println(res.body());
}
}// allee API: GET /sale/delivery-methods (Go 1.20+, net/http; uruchom: go run main.go)
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
base := os.Getenv("ALLEE_API_URL")
if base == "" {
base = "https://api.allee.pl"
}
req, err := http.NewRequest("GET", base+"/sale/delivery-methods", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("ALLEE_API_KEY"))
req.Header.Set("Accept", "application/vnd.allegro.public.v1+json")
klient := &http.Client{CheckRedirect: func(*http.Request, []*http.Request) error { return http.ErrUseLastResponse }}
res, err := klient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
dane, err := io.ReadAll(res.Body)
if err != nil {
panic(err)
}
fmt.Println("HTTP", res.StatusCode)
fmt.Println(string(dane))
}application/vnd.allegro.public.v1+json{
"deliveryMethods": [
{
"id": "b79ba3f7-7782-4521-b863-eae15c6f58a4",
"name": "DHL POP (punkt odbioru)",
"paymentPolicy": "IN_ADVANCE",
"allee": {
"carrierId": "DHL"
}
},
{
"id": "2981fc14-cd5e-4d8b-a35b-627dc5ad5b33",
"name": "Dostawa elektroniczna (e-mail)",
"paymentPolicy": "IN_ADVANCE",
"allee": {
"carrierId": "ELEKTRONICZNA"
}
},
{
"id": "ea4ee0a3-803a-4e34-ac32-2bc8c097d242",
"name": "DPD Pickup (punkt odbioru)",
"paymentPolicy": "IN_ADVANCE",
"allee": {
"carrierId": "DPD"
}
},
{
"id": "bd0e0bcb-10d1-4584-bf5b-ebd07a86e70f",
"name": "InPost Paczkomat 24/7",
"paymentPolicy": "IN_ADVANCE",
"allee": {
"carrierId": "INPOST"
}
},
{
"id": "5c76d200-c6db-46a7-9b78-7d067e8cfb2d",
"name": "InPost Paczkomat 24/7 pobranie",
"paymentPolicy": "CASH_ON_DELIVERY",
"allee": {
"carrierId": "INPOST"
}
},
{
"id": "4b09b683-3f36-4d41-96a8-fc295b0b4aed",
"name": "Kurier (inny przewoźnik)",
"paymentPolicy": "IN_ADVANCE",
"allee": {
"carrierId": "OTHER"
}
},
{
"id": "c2861209-80d2-4c77-83dc-fc9c038bdf35",
"name": "Kurier (inny przewoźnik) pobranie",
"paymentPolicy": "CASH_ON_DELIVERY",
"allee": {
"carrierId": "OTHER"
}
},
{
"id": "52fdc4c3-d33b-4eeb-8ee3-b1faf813d595",
"name": "Kurier DHL",
"paymentPolicy": "IN_ADVANCE",
"allee": {
"carrierId": "DHL"
}
},
{
"id": "af3fe346-005d-4452-8355-9cfacff12234",
"name": "Kurier DHL pobranie",
"paymentPolicy": "CASH_ON_DELIVERY",
"allee": {
"carrierId": "DHL"
}
},
{
"id": "5aeef32d-c3ba-4beb-9ded-2f5c4f5ca98f",
"name": "Kurier DPD",
"paymentPolicy": "IN_ADVANCE",
"allee": {
"carrierId": "DPD"
}
},
{
"id": "31f771d1-251f-4aef-8cab-3be9a123c527",
"name": "Kurier DPD pobranie",
"paymentPolicy": "CASH_ON_DELIVERY",
"allee": {
"carrierId": "DPD"
}
},
{
"id": "5857ec8a-81c4-46cc-8aaa-a4e724596dda",
"name": "Kurier FedEx",
"paymentPolicy": "IN_ADVANCE",
"allee": {
"carrierId": "FEDEX"
}
},
{
"id": "9c407b47-c8d9-445a-8d0f-9eaadd2eacc2",
"name": "Kurier GLS",
"paymentPolicy": "IN_ADVANCE",
"allee": {
"carrierId": "GLS"
}
},
{
"id": "9a278b1b-68ff-4a85-850e-72a4fc9843e9",
"name": "Kurier GLS pobranie",
"paymentPolicy": "CASH_ON_DELIVERY",
"allee": {
"carrierId": "GLS"
}
},
{
"id": "c0d5f4be-8793-469d-8438-d1c097f622e5",
"name": "Kurier InPost",
"paymentPolicy": "IN_ADVANCE",
"allee": {
"carrierId": "INPOST"
}
},
{
"id": "5016ab78-3462-48e5-aaff-2dfe2b7a1304",
"name": "Kurier InPost pobranie",
"paymentPolicy": "CASH_ON_DELIVERY",
"allee": {
"carrierId": "INPOST"
}
},
{
"id": "53f19e0d-0d96-436e-833b-0f07fdf51b7c",
"name": "Kurier UPS",
"paymentPolicy": "IN_ADVANCE",
"allee": {
"carrierId": "UPS"
}
},
{
"id": "93278785-250d-4094-82af-47c0e43bac7e",
"name": "Kurier UPS pobranie",
"paymentPolicy": "CASH_ON_DELIVERY",
"allee": {
"carrierId": "UPS"
}
},
{
"id": "6eab1b1e-208b-4424-804c-e1184f27696b",
"name": "Odbiór osobisty (płatność przy odbiorze)",
"paymentPolicy": "CASH_ON_DELIVERY",
"allee": {
"carrierId": "ODBIOR_OSOBISTY"
}
},
{
"id": "725db263-57e9-4128-a1f4-802920cbe84b",
"name": "Odbiór osobisty (przedpłata)",
"paymentPolicy": "IN_ADVANCE",
"allee": {
"carrierId": "ODBIOR_OSOBISTY"
}
},
{
"id": "5deebabb-6064-4c4e-af7d-2f7734276798",
"name": "ORLEN Paczka",
"paymentPolicy": "IN_ADVANCE",
"allee": {
"carrierId": "ORLEN_PACZKA"
}
},
{
"id": "025144a5-e5e5-440e-82c3-37d237eb0e9f",
"name": "ORLEN Paczka pobranie",
"paymentPolicy": "CASH_ON_DELIVERY",
"allee": {
"carrierId": "ORLEN_PACZKA"
}
},
{
"id": "b1f92de5-2504-4e72-a3d4-0ebfe87910ea",
"name": "Poczta Polska — paczka",
"paymentPolicy": "IN_ADVANCE",
"allee": {
"carrierId": "POCZTA_POLSKA"
}
},
{
"id": "5ab5d86c-0992-43e8-a0bd-9c8b659f0f8e",
"name": "Poczta Polska — paczka pobranie",
"paymentPolicy": "CASH_ON_DELIVERY",
"allee": {
"carrierId": "POCZTA_POLSKA"
}
},
{
"id": "b40ec70b-17be-41fc-aff0-e1c3be6689b1",
"name": "Pocztex Kurier",
"paymentPolicy": "IN_ADVANCE",
"allee": {
"carrierId": "POCZTEX"
}
},
{
"id": "c7de5480-2421-4158-8a6c-f99b50defedd",
"name": "Pocztex Kurier pobranie",
"paymentPolicy": "CASH_ON_DELIVERY",
"allee": {
"carrierId": "POCZTEX"
}
},
{
"id": "eabc5c15-2560-4c29-8342-5bc1ce8c0bf7",
"name": "Przesyłka gabarytowa / transport",
"paymentPolicy": "IN_ADVANCE",
"allee": {
"carrierId": "OTHER"
}
},
{
"id": "918a4e56-1372-49eb-8b7d-e5280a763d6b",
"name": "Przesyłka gabarytowa / transport pobranie",
"paymentPolicy": "CASH_ON_DELIVERY",
"allee": {
"carrierId": "OTHER"
}
}
]
}Cenniki dostawy sprzedawcy
GET /sale/shipping-rates
zgodna z Allegroallegro:api:sale:settings:readlimit: read
Twoje cenniki (id i nazwa), posortowane po nazwie.
Zgodność: zgodna z Allegro REST API (ten sam kształt) — GET /sale/shipping-rates.
Uprawnienie: zakres allegro:api:sale:settings:read.
Grupa limitu: read.
Odpowiedzi
200 Cenniki. · ShippingRatesList
shippingRates array<object> zawszePola obiektu
id string · uuid zawszename string zawszeBłędy
| HTTP | Kod | Znaczenie |
|---|---|---|
| 401 | invalid_token | Brak, zły, wygasły albo odwołany token lub klucz (format OAuth, nagłówek WWW-Authenticate). |
| 403 | ACCOUNT_INACTIVE | Konto sprzedawcy jest nieaktywne. |
| 403 | AccessDenied | Brak zakresu albo zasób innego sprzedawcy. |
| 403 | KEY_QUARANTINED | Kwarantanna: działa tylko odczyt (wykryto nietypowe użycie). |
| 403 | KEY_SUSPENDED | Klucz albo dostęp aplikacji wstrzymany (przez sprzedawcę albo ochronę). |
| 429 | TOO_MANY_REQUESTS | Przekroczony limit (minutowy, grupy operacji albo IP). |
| 500 | INTERNAL_ERROR | Błąd serwera allee. |
curl -sS -X GET "${ALLEE_API_URL:-https://api.allee.pl}/sale/shipping-rates" \
-H "Authorization: Bearer $ALLEE_API_KEY" \
-H "Accept: application/vnd.allegro.public.v1+json" \
-w '\nHTTP %{http_code}\n'<?php
// allee API: GET /sale/shipping-rates (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$ch = curl_init($base . '/sale/shipping-rates');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('ALLEE_API_KEY'),
'Accept: application/vnd.allegro.public.v1+json',
],
CURLOPT_RETURNTRANSFER => true,
]);
$odp = curl_exec($ch);
echo 'HTTP ', curl_getinfo($ch, CURLINFO_RESPONSE_CODE), "\n", $odp, "\n";# allee API: GET /sale/shipping-rates (Python 3, biblioteka requests)
import os
import requests
BASE = os.environ.get("ALLEE_API_URL", "https://api.allee.pl")
headers = {
"Authorization": "Bearer " + os.environ["ALLEE_API_KEY"],
"Accept": "application/vnd.allegro.public.v1+json",
}
r = requests.request("GET", BASE + "/sale/shipping-rates", headers=headers, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: GET /sale/shipping-rates (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const res = await fetch(`${BASE}/sale/shipping-rates`, {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.ALLEE_API_KEY}`,
"Accept": "application/vnd.allegro.public.v1+json",
},
redirect: "manual",
});
console.log("HTTP", res.status);
console.log(await res.text());// allee API: GET /sale/shipping-rates (C#, .NET 8+, HttpClient)
using System.Net.Http.Headers;
using System.Text;
var baseUrl = Environment.GetEnvironmentVariable("ALLEE_API_URL") ?? "https://api.allee.pl";
using var http = new HttpClient(new HttpClientHandler { AllowAutoRedirect = false });
using var req = new HttpRequestMessage(new HttpMethod("GET"), baseUrl + "/sale/shipping-rates");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALLEE_API_KEY"));
req.Headers.Accept.ParseAdd("application/vnd.allegro.public.v1+json");
using var res = await http.SendAsync(req);
Console.WriteLine($"HTTP {(int)res.StatusCode}");
Console.WriteLine(await res.Content.ReadAsStringAsync());// allee API: GET /sale/shipping-rates (Java 11+, java.net.http; uruchom: java Main.java)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String base = System.getenv().getOrDefault("ALLEE_API_URL", "https://api.allee.pl");
HttpRequest req = HttpRequest.newBuilder(URI.create(base + "/sale/shipping-rates"))
.header("Authorization", "Bearer " + System.getenv("ALLEE_API_KEY"))
.header("Accept", "application/vnd.allegro.public.v1+json")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpClient http = HttpClient.newBuilder().version(HttpClient.Version.HTTP_1_1).build();
HttpResponse<String> res = http.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println("HTTP " + res.statusCode());
System.out.println(res.body());
}
}// allee API: GET /sale/shipping-rates (Go 1.20+, net/http; uruchom: go run main.go)
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
base := os.Getenv("ALLEE_API_URL")
if base == "" {
base = "https://api.allee.pl"
}
req, err := http.NewRequest("GET", base+"/sale/shipping-rates", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("ALLEE_API_KEY"))
req.Header.Set("Accept", "application/vnd.allegro.public.v1+json")
klient := &http.Client{CheckRedirect: func(*http.Request, []*http.Request) error { return http.ErrUseLastResponse }}
res, err := klient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
dane, err := io.ReadAll(res.Body)
if err != nil {
panic(err)
}
fmt.Println("HTTP", res.StatusCode)
fmt.Println(string(dane))
}application/vnd.allegro.public.v1+json{
"shippingRates": [
{
"id": "154985df-0580-4e6e-91a3-7b23608beb41",
"name": "Cennik demo"
},
{
"id": "797d2e65-cb23-4a16-98e9-d6f2a399839a",
"name": "Paczkomat i kurier pobraniowy"
}
]
}Nowy cennik dostawy
POST /sale/shipping-rates
Allegro + rozszerzeniaallegro:api:sale:settings:writelimit: write
201 — nowy cennik. 200 — masz już cennik o tej name: oddajemy istniejący, jego treść się nie zmienia (bezpieczne ponowienie; wzorzec „nazwa = odcisk kosztów”).
W rates[].deliveryMethod zamiast id możesz podać dokładną name metody. Wszystkie błędy zwracamy naraz (np. EMPTY_TYPE i DELIVERY_METHOD_NOT_FOUND z path na pozycję).
Rozszerzenie allee (opcjonalne): allee.freeDeliveryFrom — próg darmowej dostawy (kwota PLN; null = bez progu). Ten sam cennik edytuje sprzedawca w panelu (Ustawienia › Wysyłka).
Zgodność: zgodna z Allegro REST API, z rozszerzeniami allee (pola allee.*, alleeId) — POST /sale/shipping-rates.
Uprawnienie: zakres allegro:api:sale:settings:write.
Grupa limitu: write.
Nagłówki
Idempotency-Key stringOchrona przed podwójnym wykonaniem (jak Stripe/Amazon): powtórzony POST z tym samym kluczem i tą samą treścią w ciągu 24 h zwraca zapisaną odpowiedź z nagłówkiem Idempotent-Replayed: true i niczego nie wykonuje drugi raz. Inna treść → 422 IDEMPOTENCY_KEY_REUSED; żądanie jeszcze trwa → 409 IDEMPOTENCY_KEY_IN_USE. 1–100 znaków ASCII (np. UUID).
Treść żądania application/vnd.allegro.public.v1+json
name string wymagane1–100 znaków, unikalna w obrębie sprzedawcy.
type string wymaganeWymagane: PHYSICAL.
PHYSICALrates array<object> wymaganeCo najmniej jedna metoda; każda najwyżej raz.
Pola obiektu
deliveryMethod object wymaganePola obiektu
id stringUUID z GET /sale/delivery-methods.
name stringAlbo dokładna nazwa metody (bez względu na wielkość liter).
maxQuantityPerPackage integer1–9999, domyślnie 1.
firstItemRate MoneyInput wymaganeKwota w żądaniu.
Pola obiektu
amount string|number wymaganeKwota jako tekst „123.45” (zalecane) albo liczba.
currency stringWaluta: tylko PLN (domyślnie PLN).
PLNnextItemRate MoneyInputKwota w żądaniu.
Pola obiektu
amount string|number wymaganeKwota jako tekst „123.45” (zalecane) albo liczba.
currency stringWaluta: tylko PLN (domyślnie PLN).
PLNallee objectRozszerzenie allee (S2): próg darmowej dostawy; null = bez progu, pominięte = bez zmian.
Pola obiektu
freeDeliveryFrom MoneyInput · nullPola obiektu
amount string|number wymaganeKwota jako tekst „123.45” (zalecane) albo liczba.
currency stringWaluta: tylko PLN (domyślnie PLN).
PLNOdpowiedzi
200 Cennik o tej nazwie już był — bez zmian. · ShippingRates
id string · uuid zawszename string zawszetype string zawszePHYSICALrates array<ShippingRateItem> zawszePola obiektu
deliveryMethod object zawszePola obiektu
id string · uuid zawszemaxQuantityPerPackage integer zawszeSztuk w jednej paczce (1–9999).
firstItemRate Money zawszeKoszt pierwszej sztuki.
Pola obiektu
amount string zawszeKwota z dwoma miejscami po przecinku, kropka dziesiętna.
currency string zawszeWaluta (allee.pl: tylko PLN).
PLNnextItemRate Money zawszeKoszt każdej kolejnej sztuki.
Pola obiektu
amount string zawszeKwota z dwoma miejscami po przecinku, kropka dziesiętna.
currency string zawszeWaluta (allee.pl: tylko PLN).
PLNlastModified string · date-time zawszeallee objectRozszerzenie allee (S2) — tylko gdy ustawiono próg.
Pola obiektu
freeDeliveryFrom Money zawszePróg darmowej dostawy.
Pola obiektu
amount string zawszeKwota z dwoma miejscami po przecinku, kropka dziesiętna.
currency string zawszeWaluta (allee.pl: tylko PLN).
PLN201 Utworzono. · ShippingRates
id string · uuid zawszename string zawszetype string zawszePHYSICALrates array<ShippingRateItem> zawszePola obiektu
deliveryMethod object zawszePola obiektu
id string · uuid zawszemaxQuantityPerPackage integer zawszeSztuk w jednej paczce (1–9999).
firstItemRate Money zawszeKoszt pierwszej sztuki.
Pola obiektu
amount string zawszeKwota z dwoma miejscami po przecinku, kropka dziesiętna.
currency string zawszeWaluta (allee.pl: tylko PLN).
PLNnextItemRate Money zawszeKoszt każdej kolejnej sztuki.
Pola obiektu
amount string zawszeKwota z dwoma miejscami po przecinku, kropka dziesiętna.
currency string zawszeWaluta (allee.pl: tylko PLN).
PLNlastModified string · date-time zawszeallee objectRozszerzenie allee (S2) — tylko gdy ustawiono próg.
Pola obiektu
freeDeliveryFrom Money zawszePróg darmowej dostawy.
Pola obiektu
amount string zawszeKwota z dwoma miejscami po przecinku, kropka dziesiętna.
currency string zawszeWaluta (allee.pl: tylko PLN).
PLNBłędy
| HTTP | Kod | Znaczenie |
|---|---|---|
| 401 | invalid_token | Brak, zły, wygasły albo odwołany token lub klucz (format OAuth, nagłówek WWW-Authenticate). |
| 403 | ACCOUNT_INACTIVE | Konto sprzedawcy jest nieaktywne. |
| 403 | AccessDenied | Brak zakresu albo zasób innego sprzedawcy. |
| 403 | KEY_QUARANTINED | Kwarantanna: działa tylko odczyt (wykryto nietypowe użycie). |
| 403 | KEY_SUSPENDED | Klucz albo dostęp aplikacji wstrzymany (przez sprzedawcę albo ochronę). |
| 413 | PAYLOAD_TOO_LARGE | Treść żądania za duża (JSON 5 MB, faktura PDF 3 MB). |
| 415 | UNSUPPORTED_MEDIA_TYPE | Zły Content-Type treści. |
| 422 | DELIVERY_METHOD_NOT_FOUND | Metoda dostawy spoza słownika allee (path = pozycja). |
| 422 | EMPTY_TYPE | Cennik bez type. |
| 422 | JsonMappingException | Treść nie jest poprawnym JSON albo ma zły kształt (np. images jako obiekty). |
| 422 | LIMIT_EXCEEDED | Limit wpisów osiągnięty (np. 50 warunków danego rodzaju). |
| 422 | UnknownJSONProperty | Pole nieznane w tym miejscu (path wskazuje które). |
| 422 | VALIDATION_ERROR | Zła wartość parametru zapytania (400) albo pola treści (422); path wskazuje miejsce. |
| 429 | TOO_MANY_REQUESTS | Przekroczony limit (minutowy, grupy operacji albo IP). |
| 500 | INTERNAL_ERROR | Błąd serwera allee. |
curl -sS -X POST "${ALLEE_API_URL:-https://api.allee.pl}/sale/shipping-rates" \
-H "Authorization: Bearer $ALLEE_API_KEY" \
-H "Accept: application/vnd.allegro.public.v1+json" \
-H "Content-Type: application/vnd.allegro.public.v1+json" \
--data-binary @- \
-w '\nHTTP %{http_code}\n' <<'JSON'
{
"name": "Paczkomat i kurier pobraniowy",
"type": "PHYSICAL",
"rates": [
{
"deliveryMethod": {
"id": "bd0e0bcb-10d1-4584-bf5b-ebd07a86e70f"
},
"maxQuantityPerPackage": 5,
"firstItemRate": {
"amount": "13.99",
"currency": "PLN"
},
"nextItemRate": {
"amount": "0.00",
"currency": "PLN"
}
},
{
"deliveryMethod": {
"id": "5c76d200-c6db-46a7-9b78-7d067e8cfb2d"
},
"maxQuantityPerPackage": 5,
"firstItemRate": {
"amount": "17.99",
"currency": "PLN"
},
"nextItemRate": {
"amount": "2.00",
"currency": "PLN"
}
}
]
}
JSON<?php
// allee API: POST /sale/shipping-rates (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$body = [
'name' => 'Paczkomat i kurier pobraniowy',
'type' => 'PHYSICAL',
'rates' => [
[
'deliveryMethod' => [
'id' => 'bd0e0bcb-10d1-4584-bf5b-ebd07a86e70f',
],
'maxQuantityPerPackage' => 5,
'firstItemRate' => [
'amount' => '13.99',
'currency' => 'PLN',
],
'nextItemRate' => [
'amount' => '0.00',
'currency' => 'PLN',
],
],
[
'deliveryMethod' => [
'id' => '5c76d200-c6db-46a7-9b78-7d067e8cfb2d',
],
'maxQuantityPerPackage' => 5,
'firstItemRate' => [
'amount' => '17.99',
'currency' => 'PLN',
],
'nextItemRate' => [
'amount' => '2.00',
'currency' => 'PLN',
],
],
],
];
$ch = curl_init($base . '/sale/shipping-rates');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('ALLEE_API_KEY'),
'Accept: application/vnd.allegro.public.v1+json',
'Content-Type: application/vnd.allegro.public.v1+json',
],
CURLOPT_POSTFIELDS => json_encode($body, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES),
CURLOPT_RETURNTRANSFER => true,
]);
$odp = curl_exec($ch);
echo 'HTTP ', curl_getinfo($ch, CURLINFO_RESPONSE_CODE), "\n", $odp, "\n";# allee API: POST /sale/shipping-rates (Python 3, biblioteka requests)
import os
import requests
BASE = os.environ.get("ALLEE_API_URL", "https://api.allee.pl")
headers = {
"Authorization": "Bearer " + os.environ["ALLEE_API_KEY"],
"Accept": "application/vnd.allegro.public.v1+json",
"Content-Type": "application/vnd.allegro.public.v1+json",
}
body = {
"name": "Paczkomat i kurier pobraniowy",
"type": "PHYSICAL",
"rates": [
{
"deliveryMethod": {
"id": "bd0e0bcb-10d1-4584-bf5b-ebd07a86e70f",
},
"maxQuantityPerPackage": 5,
"firstItemRate": {
"amount": "13.99",
"currency": "PLN",
},
"nextItemRate": {
"amount": "0.00",
"currency": "PLN",
},
},
{
"deliveryMethod": {
"id": "5c76d200-c6db-46a7-9b78-7d067e8cfb2d",
},
"maxQuantityPerPackage": 5,
"firstItemRate": {
"amount": "17.99",
"currency": "PLN",
},
"nextItemRate": {
"amount": "2.00",
"currency": "PLN",
},
},
],
}
r = requests.request("POST", BASE + "/sale/shipping-rates", headers=headers, json=body, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: POST /sale/shipping-rates (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const body = {
"name": "Paczkomat i kurier pobraniowy",
"type": "PHYSICAL",
"rates": [
{
"deliveryMethod": {
"id": "bd0e0bcb-10d1-4584-bf5b-ebd07a86e70f"
},
"maxQuantityPerPackage": 5,
"firstItemRate": {
"amount": "13.99",
"currency": "PLN"
},
"nextItemRate": {
"amount": "0.00",
"currency": "PLN"
}
},
{
"deliveryMethod": {
"id": "5c76d200-c6db-46a7-9b78-7d067e8cfb2d"
},
"maxQuantityPerPackage": 5,
"firstItemRate": {
"amount": "17.99",
"currency": "PLN"
},
"nextItemRate": {
"amount": "2.00",
"currency": "PLN"
}
}
]
};
const res = await fetch(`${BASE}/sale/shipping-rates`, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.ALLEE_API_KEY}`,
"Accept": "application/vnd.allegro.public.v1+json",
"Content-Type": "application/vnd.allegro.public.v1+json",
},
body: JSON.stringify(body),
redirect: "manual",
});
console.log("HTTP", res.status);
console.log(await res.text());// allee API: POST /sale/shipping-rates (C#, .NET 8+, HttpClient)
using System.Net.Http.Headers;
using System.Text;
var baseUrl = Environment.GetEnvironmentVariable("ALLEE_API_URL") ?? "https://api.allee.pl";
using var http = new HttpClient(new HttpClientHandler { AllowAutoRedirect = false });
using var req = new HttpRequestMessage(new HttpMethod("POST"), baseUrl + "/sale/shipping-rates");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALLEE_API_KEY"));
req.Headers.Accept.ParseAdd("application/vnd.allegro.public.v1+json");
var json = """
{
"name": "Paczkomat i kurier pobraniowy",
"type": "PHYSICAL",
"rates": [
{
"deliveryMethod": {
"id": "bd0e0bcb-10d1-4584-bf5b-ebd07a86e70f"
},
"maxQuantityPerPackage": 5,
"firstItemRate": {
"amount": "13.99",
"currency": "PLN"
},
"nextItemRate": {
"amount": "0.00",
"currency": "PLN"
}
},
{
"deliveryMethod": {
"id": "5c76d200-c6db-46a7-9b78-7d067e8cfb2d"
},
"maxQuantityPerPackage": 5,
"firstItemRate": {
"amount": "17.99",
"currency": "PLN"
},
"nextItemRate": {
"amount": "2.00",
"currency": "PLN"
}
}
]
}
""";
req.Content = new StringContent(json, Encoding.UTF8);
req.Content.Headers.ContentType = new MediaTypeHeaderValue("application/vnd.allegro.public.v1+json");
using var res = await http.SendAsync(req);
Console.WriteLine($"HTTP {(int)res.StatusCode}");
Console.WriteLine(await res.Content.ReadAsStringAsync());// allee API: POST /sale/shipping-rates (Java 11+, java.net.http; uruchom: java Main.java)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String base = System.getenv().getOrDefault("ALLEE_API_URL", "https://api.allee.pl");
String body = """
{
"name": "Paczkomat i kurier pobraniowy",
"type": "PHYSICAL",
"rates": [
{
"deliveryMethod": {
"id": "bd0e0bcb-10d1-4584-bf5b-ebd07a86e70f"
},
"maxQuantityPerPackage": 5,
"firstItemRate": {
"amount": "13.99",
"currency": "PLN"
},
"nextItemRate": {
"amount": "0.00",
"currency": "PLN"
}
},
{
"deliveryMethod": {
"id": "5c76d200-c6db-46a7-9b78-7d067e8cfb2d"
},
"maxQuantityPerPackage": 5,
"firstItemRate": {
"amount": "17.99",
"currency": "PLN"
},
"nextItemRate": {
"amount": "2.00",
"currency": "PLN"
}
}
]
}
""";
HttpRequest req = HttpRequest.newBuilder(URI.create(base + "/sale/shipping-rates"))
.header("Authorization", "Bearer " + System.getenv("ALLEE_API_KEY"))
.header("Accept", "application/vnd.allegro.public.v1+json")
.header("Content-Type", "application/vnd.allegro.public.v1+json")
.method("POST", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpClient http = HttpClient.newBuilder().version(HttpClient.Version.HTTP_1_1).build();
HttpResponse<String> res = http.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println("HTTP " + res.statusCode());
System.out.println(res.body());
}
}// allee API: POST /sale/shipping-rates (Go 1.20+, net/http; uruchom: go run main.go)
package main
import (
"fmt"
"io"
"net/http"
"os"
"strings"
)
func main() {
base := os.Getenv("ALLEE_API_URL")
if base == "" {
base = "https://api.allee.pl"
}
body := `{
"name": "Paczkomat i kurier pobraniowy",
"type": "PHYSICAL",
"rates": [
{
"deliveryMethod": {
"id": "bd0e0bcb-10d1-4584-bf5b-ebd07a86e70f"
},
"maxQuantityPerPackage": 5,
"firstItemRate": {
"amount": "13.99",
"currency": "PLN"
},
"nextItemRate": {
"amount": "0.00",
"currency": "PLN"
}
},
{
"deliveryMethod": {
"id": "5c76d200-c6db-46a7-9b78-7d067e8cfb2d"
},
"maxQuantityPerPackage": 5,
"firstItemRate": {
"amount": "17.99",
"currency": "PLN"
},
"nextItemRate": {
"amount": "2.00",
"currency": "PLN"
}
}
]
}`
req, err := http.NewRequest("POST", base+"/sale/shipping-rates", strings.NewReader(body))
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("ALLEE_API_KEY"))
req.Header.Set("Accept", "application/vnd.allegro.public.v1+json")
req.Header.Set("Content-Type", "application/vnd.allegro.public.v1+json")
klient := &http.Client{CheckRedirect: func(*http.Request, []*http.Request) error { return http.ErrUseLastResponse }}
res, err := klient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
dane, err := io.ReadAll(res.Body)
if err != nil {
panic(err)
}
fmt.Println("HTTP", res.StatusCode)
fmt.Println(string(dane))
}application/vnd.allegro.public.v1+json{
"id": "797d2e65-cb23-4a16-98e9-d6f2a399839a",
"name": "Paczkomat i kurier pobraniowy",
"type": "PHYSICAL",
"rates": [
{
"deliveryMethod": {
"id": "bd0e0bcb-10d1-4584-bf5b-ebd07a86e70f"
},
"maxQuantityPerPackage": 5,
"firstItemRate": {
"amount": "13.99",
"currency": "PLN"
},
"nextItemRate": {
"amount": "0.00",
"currency": "PLN"
}
},
{
"deliveryMethod": {
"id": "5c76d200-c6db-46a7-9b78-7d067e8cfb2d"
},
"maxQuantityPerPackage": 5,
"firstItemRate": {
"amount": "17.99",
"currency": "PLN"
},
"nextItemRate": {
"amount": "2.00",
"currency": "PLN"
}
}
],
"lastModified": "2026-11-10T11:10:03.639Z"
}Cennik dostawy
GET /sale/shipping-rates/{shippingRatesId}
zgodna z Allegroallegro:api:sale:settings:readlimit: read
Pełny cennik. Cudzy → 403, brak → 404.
Zgodność: zgodna z Allegro REST API (ten sam kształt) — GET /sale/shipping-rates/{id}.
Uprawnienie: zakres allegro:api:sale:settings:read.
Grupa limitu: read.
Parametry ścieżki
shippingRatesId string wymaganyIdentyfikator cennika (UUID).
Odpowiedzi
200 Cennik. · ShippingRates
id string · uuid zawszename string zawszetype string zawszePHYSICALrates array<ShippingRateItem> zawszePola obiektu
deliveryMethod object zawszePola obiektu
id string · uuid zawszemaxQuantityPerPackage integer zawszeSztuk w jednej paczce (1–9999).
firstItemRate Money zawszeKoszt pierwszej sztuki.
Pola obiektu
amount string zawszeKwota z dwoma miejscami po przecinku, kropka dziesiętna.
currency string zawszeWaluta (allee.pl: tylko PLN).
PLNnextItemRate Money zawszeKoszt każdej kolejnej sztuki.
Pola obiektu
amount string zawszeKwota z dwoma miejscami po przecinku, kropka dziesiętna.
currency string zawszeWaluta (allee.pl: tylko PLN).
PLNlastModified string · date-time zawszeallee objectRozszerzenie allee (S2) — tylko gdy ustawiono próg.
Pola obiektu
freeDeliveryFrom Money zawszePróg darmowej dostawy.
Pola obiektu
amount string zawszeKwota z dwoma miejscami po przecinku, kropka dziesiętna.
currency string zawszeWaluta (allee.pl: tylko PLN).
PLNBłędy
| HTTP | Kod | Znaczenie |
|---|---|---|
| 401 | invalid_token | Brak, zły, wygasły albo odwołany token lub klucz (format OAuth, nagłówek WWW-Authenticate). |
| 403 | ACCOUNT_INACTIVE | Konto sprzedawcy jest nieaktywne. |
| 403 | AccessDenied | Brak zakresu albo zasób innego sprzedawcy. |
| 403 | KEY_QUARANTINED | Kwarantanna: działa tylko odczyt (wykryto nietypowe użycie). |
| 403 | KEY_SUSPENDED | Klucz albo dostęp aplikacji wstrzymany (przez sprzedawcę albo ochronę). |
| 404 | NOT_FOUND | Nie ma takiego zasobu (albo należy do innego sprzedawcy — dla wątków, zwrotów i spraw odpowiedź jest ta sama). |
| 429 | TOO_MANY_REQUESTS | Przekroczony limit (minutowy, grupy operacji albo IP). |
| 500 | INTERNAL_ERROR | Błąd serwera allee. |
curl -sS -X GET "${ALLEE_API_URL:-https://api.allee.pl}/sale/shipping-rates/797d2e65-cb23-4a16-98e9-d6f2a399839a" \
-H "Authorization: Bearer $ALLEE_API_KEY" \
-H "Accept: application/vnd.allegro.public.v1+json" \
-w '\nHTTP %{http_code}\n'<?php
// allee API: GET /sale/shipping-rates/797d2e65-cb23-4a16-98e9-d6f2a399839a (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$ch = curl_init($base . '/sale/shipping-rates/797d2e65-cb23-4a16-98e9-d6f2a399839a');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('ALLEE_API_KEY'),
'Accept: application/vnd.allegro.public.v1+json',
],
CURLOPT_RETURNTRANSFER => true,
]);
$odp = curl_exec($ch);
echo 'HTTP ', curl_getinfo($ch, CURLINFO_RESPONSE_CODE), "\n", $odp, "\n";# allee API: GET /sale/shipping-rates/797d2e65-cb23-4a16-98e9-d6f2a399839a (Python 3, biblioteka requests)
import os
import requests
BASE = os.environ.get("ALLEE_API_URL", "https://api.allee.pl")
headers = {
"Authorization": "Bearer " + os.environ["ALLEE_API_KEY"],
"Accept": "application/vnd.allegro.public.v1+json",
}
r = requests.request("GET", BASE + "/sale/shipping-rates/797d2e65-cb23-4a16-98e9-d6f2a399839a", headers=headers, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: GET /sale/shipping-rates/797d2e65-cb23-4a16-98e9-d6f2a399839a (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const res = await fetch(`${BASE}/sale/shipping-rates/797d2e65-cb23-4a16-98e9-d6f2a399839a`, {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.ALLEE_API_KEY}`,
"Accept": "application/vnd.allegro.public.v1+json",
},
redirect: "manual",
});
console.log("HTTP", res.status);
console.log(await res.text());// allee API: GET /sale/shipping-rates/797d2e65-cb23-4a16-98e9-d6f2a399839a (C#, .NET 8+, HttpClient)
using System.Net.Http.Headers;
using System.Text;
var baseUrl = Environment.GetEnvironmentVariable("ALLEE_API_URL") ?? "https://api.allee.pl";
using var http = new HttpClient(new HttpClientHandler { AllowAutoRedirect = false });
using var req = new HttpRequestMessage(new HttpMethod("GET"), baseUrl + "/sale/shipping-rates/797d2e65-cb23-4a16-98e9-d6f2a399839a");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALLEE_API_KEY"));
req.Headers.Accept.ParseAdd("application/vnd.allegro.public.v1+json");
using var res = await http.SendAsync(req);
Console.WriteLine($"HTTP {(int)res.StatusCode}");
Console.WriteLine(await res.Content.ReadAsStringAsync());// allee API: GET /sale/shipping-rates/797d2e65-cb23-4a16-98e9-d6f2a399839a (Java 11+, java.net.http; uruchom: java Main.java)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String base = System.getenv().getOrDefault("ALLEE_API_URL", "https://api.allee.pl");
HttpRequest req = HttpRequest.newBuilder(URI.create(base + "/sale/shipping-rates/797d2e65-cb23-4a16-98e9-d6f2a399839a"))
.header("Authorization", "Bearer " + System.getenv("ALLEE_API_KEY"))
.header("Accept", "application/vnd.allegro.public.v1+json")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpClient http = HttpClient.newBuilder().version(HttpClient.Version.HTTP_1_1).build();
HttpResponse<String> res = http.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println("HTTP " + res.statusCode());
System.out.println(res.body());
}
}// allee API: GET /sale/shipping-rates/797d2e65-cb23-4a16-98e9-d6f2a399839a (Go 1.20+, net/http; uruchom: go run main.go)
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
base := os.Getenv("ALLEE_API_URL")
if base == "" {
base = "https://api.allee.pl"
}
req, err := http.NewRequest("GET", base+"/sale/shipping-rates/797d2e65-cb23-4a16-98e9-d6f2a399839a", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("ALLEE_API_KEY"))
req.Header.Set("Accept", "application/vnd.allegro.public.v1+json")
klient := &http.Client{CheckRedirect: func(*http.Request, []*http.Request) error { return http.ErrUseLastResponse }}
res, err := klient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
dane, err := io.ReadAll(res.Body)
if err != nil {
panic(err)
}
fmt.Println("HTTP", res.StatusCode)
fmt.Println(string(dane))
}application/vnd.allegro.public.v1+json{
"id": "797d2e65-cb23-4a16-98e9-d6f2a399839a",
"name": "Paczkomat i kurier pobraniowy",
"type": "PHYSICAL",
"rates": [
{
"deliveryMethod": {
"id": "bd0e0bcb-10d1-4584-bf5b-ebd07a86e70f"
},
"maxQuantityPerPackage": 5,
"firstItemRate": {
"amount": "13.99",
"currency": "PLN"
},
"nextItemRate": {
"amount": "0.00",
"currency": "PLN"
}
},
{
"deliveryMethod": {
"id": "5c76d200-c6db-46a7-9b78-7d067e8cfb2d"
},
"maxQuantityPerPackage": 5,
"firstItemRate": {
"amount": "17.99",
"currency": "PLN"
},
"nextItemRate": {
"amount": "2.00",
"currency": "PLN"
}
}
],
"lastModified": "2026-11-10T11:10:03.639Z"
}Zmiana cennika dostawy
PUT /sale/shipping-rates/{shippingRatesId}
zgodna z Allegroallegro:api:sale:settings:writelimit: write
Pełna podmiana name i rates. Oferty z tym cennikiem dostają nową „dostawę od” (najtańsze firstItemRate). Nazwa zajęta przez inny Twój cennik → 422. allee.freeDeliveryFrom zmieniamy tylko, gdy go podasz (pominięty = bez zmian).
Zgodność: zgodna z Allegro REST API (ten sam kształt) — PUT /sale/shipping-rates/{id}.
Uprawnienie: zakres allegro:api:sale:settings:write.
Grupa limitu: write.
Parametry ścieżki
shippingRatesId string wymaganyIdentyfikator cennika (UUID).
Treść żądania application/vnd.allegro.public.v1+json
name string wymagane1–100 znaków, unikalna w obrębie sprzedawcy.
type string wymaganeWymagane: PHYSICAL.
PHYSICALrates array<object> wymaganeCo najmniej jedna metoda; każda najwyżej raz.
Pola obiektu
deliveryMethod object wymaganePola obiektu
id stringUUID z GET /sale/delivery-methods.
name stringAlbo dokładna nazwa metody (bez względu na wielkość liter).
maxQuantityPerPackage integer1–9999, domyślnie 1.
firstItemRate MoneyInput wymaganeKwota w żądaniu.
Pola obiektu
amount string|number wymaganeKwota jako tekst „123.45” (zalecane) albo liczba.
currency stringWaluta: tylko PLN (domyślnie PLN).
PLNnextItemRate MoneyInputKwota w żądaniu.
Pola obiektu
amount string|number wymaganeKwota jako tekst „123.45” (zalecane) albo liczba.
currency stringWaluta: tylko PLN (domyślnie PLN).
PLNallee objectRozszerzenie allee (S2): próg darmowej dostawy; null = bez progu, pominięte = bez zmian.
Pola obiektu
freeDeliveryFrom MoneyInput · nullPola obiektu
amount string|number wymaganeKwota jako tekst „123.45” (zalecane) albo liczba.
currency stringWaluta: tylko PLN (domyślnie PLN).
PLNOdpowiedzi
200 Zmieniono. · ShippingRates
id string · uuid zawszename string zawszetype string zawszePHYSICALrates array<ShippingRateItem> zawszePola obiektu
deliveryMethod object zawszePola obiektu
id string · uuid zawszemaxQuantityPerPackage integer zawszeSztuk w jednej paczce (1–9999).
firstItemRate Money zawszeKoszt pierwszej sztuki.
Pola obiektu
amount string zawszeKwota z dwoma miejscami po przecinku, kropka dziesiętna.
currency string zawszeWaluta (allee.pl: tylko PLN).
PLNnextItemRate Money zawszeKoszt każdej kolejnej sztuki.
Pola obiektu
amount string zawszeKwota z dwoma miejscami po przecinku, kropka dziesiętna.
currency string zawszeWaluta (allee.pl: tylko PLN).
PLNlastModified string · date-time zawszeallee objectRozszerzenie allee (S2) — tylko gdy ustawiono próg.
Pola obiektu
freeDeliveryFrom Money zawszePróg darmowej dostawy.
Pola obiektu
amount string zawszeKwota z dwoma miejscami po przecinku, kropka dziesiętna.
currency string zawszeWaluta (allee.pl: tylko PLN).
PLNBłędy
| HTTP | Kod | Znaczenie |
|---|---|---|
| 401 | invalid_token | Brak, zły, wygasły albo odwołany token lub klucz (format OAuth, nagłówek WWW-Authenticate). |
| 403 | ACCOUNT_INACTIVE | Konto sprzedawcy jest nieaktywne. |
| 403 | AccessDenied | Brak zakresu albo zasób innego sprzedawcy. |
| 403 | KEY_QUARANTINED | Kwarantanna: działa tylko odczyt (wykryto nietypowe użycie). |
| 403 | KEY_SUSPENDED | Klucz albo dostęp aplikacji wstrzymany (przez sprzedawcę albo ochronę). |
| 404 | NOT_FOUND | Nie ma takiego zasobu (albo należy do innego sprzedawcy — dla wątków, zwrotów i spraw odpowiedź jest ta sama). |
| 413 | PAYLOAD_TOO_LARGE | Treść żądania za duża (JSON 5 MB, faktura PDF 3 MB). |
| 415 | UNSUPPORTED_MEDIA_TYPE | Zły Content-Type treści. |
| 422 | DELIVERY_METHOD_NOT_FOUND | Metoda dostawy spoza słownika allee (path = pozycja). |
| 422 | EMPTY_TYPE | Cennik bez type. |
| 422 | JsonMappingException | Treść nie jest poprawnym JSON albo ma zły kształt (np. images jako obiekty). |
| 422 | NAME_HAS_TO_BE_UNIQUE | Nazwa zajęta (details = id istniejącego wpisu). |
| 422 | VALIDATION_ERROR | Zła wartość parametru zapytania (400) albo pola treści (422); path wskazuje miejsce. |
| 429 | TOO_MANY_REQUESTS | Przekroczony limit (minutowy, grupy operacji albo IP). |
| 500 | INTERNAL_ERROR | Błąd serwera allee. |
curl -sS -X PUT "${ALLEE_API_URL:-https://api.allee.pl}/sale/shipping-rates/797d2e65-cb23-4a16-98e9-d6f2a399839a" \
-H "Authorization: Bearer $ALLEE_API_KEY" \
-H "Accept: application/vnd.allegro.public.v1+json" \
-H "Content-Type: application/vnd.allegro.public.v1+json" \
--data-binary @- \
-w '\nHTTP %{http_code}\n' <<'JSON'
{
"name": "Paczkomat i kurier pobraniowy",
"type": "PHYSICAL",
"rates": [
{
"deliveryMethod": {
"id": "bd0e0bcb-10d1-4584-bf5b-ebd07a86e70f"
},
"maxQuantityPerPackage": 5,
"firstItemRate": {
"amount": "12.99",
"currency": "PLN"
},
"nextItemRate": {
"amount": "0.00",
"currency": "PLN"
}
},
{
"deliveryMethod": {
"id": "5c76d200-c6db-46a7-9b78-7d067e8cfb2d"
},
"maxQuantityPerPackage": 5,
"firstItemRate": {
"amount": "16.99",
"currency": "PLN"
},
"nextItemRate": {
"amount": "2.00",
"currency": "PLN"
}
}
],
"allee": {
"freeDeliveryFrom": {
"amount": "200.00",
"currency": "PLN"
}
}
}
JSON<?php
// allee API: PUT /sale/shipping-rates/797d2e65-cb23-4a16-98e9-d6f2a399839a (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$body = [
'name' => 'Paczkomat i kurier pobraniowy',
'type' => 'PHYSICAL',
'rates' => [
[
'deliveryMethod' => [
'id' => 'bd0e0bcb-10d1-4584-bf5b-ebd07a86e70f',
],
'maxQuantityPerPackage' => 5,
'firstItemRate' => [
'amount' => '12.99',
'currency' => 'PLN',
],
'nextItemRate' => [
'amount' => '0.00',
'currency' => 'PLN',
],
],
[
'deliveryMethod' => [
'id' => '5c76d200-c6db-46a7-9b78-7d067e8cfb2d',
],
'maxQuantityPerPackage' => 5,
'firstItemRate' => [
'amount' => '16.99',
'currency' => 'PLN',
],
'nextItemRate' => [
'amount' => '2.00',
'currency' => 'PLN',
],
],
],
'allee' => [
'freeDeliveryFrom' => [
'amount' => '200.00',
'currency' => 'PLN',
],
],
];
$ch = curl_init($base . '/sale/shipping-rates/797d2e65-cb23-4a16-98e9-d6f2a399839a');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('ALLEE_API_KEY'),
'Accept: application/vnd.allegro.public.v1+json',
'Content-Type: application/vnd.allegro.public.v1+json',
],
CURLOPT_POSTFIELDS => json_encode($body, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES),
CURLOPT_RETURNTRANSFER => true,
]);
$odp = curl_exec($ch);
echo 'HTTP ', curl_getinfo($ch, CURLINFO_RESPONSE_CODE), "\n", $odp, "\n";# allee API: PUT /sale/shipping-rates/797d2e65-cb23-4a16-98e9-d6f2a399839a (Python 3, biblioteka requests)
import os
import requests
BASE = os.environ.get("ALLEE_API_URL", "https://api.allee.pl")
headers = {
"Authorization": "Bearer " + os.environ["ALLEE_API_KEY"],
"Accept": "application/vnd.allegro.public.v1+json",
"Content-Type": "application/vnd.allegro.public.v1+json",
}
body = {
"name": "Paczkomat i kurier pobraniowy",
"type": "PHYSICAL",
"rates": [
{
"deliveryMethod": {
"id": "bd0e0bcb-10d1-4584-bf5b-ebd07a86e70f",
},
"maxQuantityPerPackage": 5,
"firstItemRate": {
"amount": "12.99",
"currency": "PLN",
},
"nextItemRate": {
"amount": "0.00",
"currency": "PLN",
},
},
{
"deliveryMethod": {
"id": "5c76d200-c6db-46a7-9b78-7d067e8cfb2d",
},
"maxQuantityPerPackage": 5,
"firstItemRate": {
"amount": "16.99",
"currency": "PLN",
},
"nextItemRate": {
"amount": "2.00",
"currency": "PLN",
},
},
],
"allee": {
"freeDeliveryFrom": {
"amount": "200.00",
"currency": "PLN",
},
},
}
r = requests.request("PUT", BASE + "/sale/shipping-rates/797d2e65-cb23-4a16-98e9-d6f2a399839a", headers=headers, json=body, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: PUT /sale/shipping-rates/797d2e65-cb23-4a16-98e9-d6f2a399839a (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const body = {
"name": "Paczkomat i kurier pobraniowy",
"type": "PHYSICAL",
"rates": [
{
"deliveryMethod": {
"id": "bd0e0bcb-10d1-4584-bf5b-ebd07a86e70f"
},
"maxQuantityPerPackage": 5,
"firstItemRate": {
"amount": "12.99",
"currency": "PLN"
},
"nextItemRate": {
"amount": "0.00",
"currency": "PLN"
}
},
{
"deliveryMethod": {
"id": "5c76d200-c6db-46a7-9b78-7d067e8cfb2d"
},
"maxQuantityPerPackage": 5,
"firstItemRate": {
"amount": "16.99",
"currency": "PLN"
},
"nextItemRate": {
"amount": "2.00",
"currency": "PLN"
}
}
],
"allee": {
"freeDeliveryFrom": {
"amount": "200.00",
"currency": "PLN"
}
}
};
const res = await fetch(`${BASE}/sale/shipping-rates/797d2e65-cb23-4a16-98e9-d6f2a399839a`, {
method: "PUT",
headers: {
Authorization: `Bearer ${process.env.ALLEE_API_KEY}`,
"Accept": "application/vnd.allegro.public.v1+json",
"Content-Type": "application/vnd.allegro.public.v1+json",
},
body: JSON.stringify(body),
redirect: "manual",
});
console.log("HTTP", res.status);
console.log(await res.text());// allee API: PUT /sale/shipping-rates/797d2e65-cb23-4a16-98e9-d6f2a399839a (C#, .NET 8+, HttpClient)
using System.Net.Http.Headers;
using System.Text;
var baseUrl = Environment.GetEnvironmentVariable("ALLEE_API_URL") ?? "https://api.allee.pl";
using var http = new HttpClient(new HttpClientHandler { AllowAutoRedirect = false });
using var req = new HttpRequestMessage(new HttpMethod("PUT"), baseUrl + "/sale/shipping-rates/797d2e65-cb23-4a16-98e9-d6f2a399839a");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALLEE_API_KEY"));
req.Headers.Accept.ParseAdd("application/vnd.allegro.public.v1+json");
var json = """
{
"name": "Paczkomat i kurier pobraniowy",
"type": "PHYSICAL",
"rates": [
{
"deliveryMethod": {
"id": "bd0e0bcb-10d1-4584-bf5b-ebd07a86e70f"
},
"maxQuantityPerPackage": 5,
"firstItemRate": {
"amount": "12.99",
"currency": "PLN"
},
"nextItemRate": {
"amount": "0.00",
"currency": "PLN"
}
},
{
"deliveryMethod": {
"id": "5c76d200-c6db-46a7-9b78-7d067e8cfb2d"
},
"maxQuantityPerPackage": 5,
"firstItemRate": {
"amount": "16.99",
"currency": "PLN"
},
"nextItemRate": {
"amount": "2.00",
"currency": "PLN"
}
}
],
"allee": {
"freeDeliveryFrom": {
"amount": "200.00",
"currency": "PLN"
}
}
}
""";
req.Content = new StringContent(json, Encoding.UTF8);
req.Content.Headers.ContentType = new MediaTypeHeaderValue("application/vnd.allegro.public.v1+json");
using var res = await http.SendAsync(req);
Console.WriteLine($"HTTP {(int)res.StatusCode}");
Console.WriteLine(await res.Content.ReadAsStringAsync());// allee API: PUT /sale/shipping-rates/797d2e65-cb23-4a16-98e9-d6f2a399839a (Java 11+, java.net.http; uruchom: java Main.java)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String base = System.getenv().getOrDefault("ALLEE_API_URL", "https://api.allee.pl");
String body = """
{
"name": "Paczkomat i kurier pobraniowy",
"type": "PHYSICAL",
"rates": [
{
"deliveryMethod": {
"id": "bd0e0bcb-10d1-4584-bf5b-ebd07a86e70f"
},
"maxQuantityPerPackage": 5,
"firstItemRate": {
"amount": "12.99",
"currency": "PLN"
},
"nextItemRate": {
"amount": "0.00",
"currency": "PLN"
}
},
{
"deliveryMethod": {
"id": "5c76d200-c6db-46a7-9b78-7d067e8cfb2d"
},
"maxQuantityPerPackage": 5,
"firstItemRate": {
"amount": "16.99",
"currency": "PLN"
},
"nextItemRate": {
"amount": "2.00",
"currency": "PLN"
}
}
],
"allee": {
"freeDeliveryFrom": {
"amount": "200.00",
"currency": "PLN"
}
}
}
""";
HttpRequest req = HttpRequest.newBuilder(URI.create(base + "/sale/shipping-rates/797d2e65-cb23-4a16-98e9-d6f2a399839a"))
.header("Authorization", "Bearer " + System.getenv("ALLEE_API_KEY"))
.header("Accept", "application/vnd.allegro.public.v1+json")
.header("Content-Type", "application/vnd.allegro.public.v1+json")
.method("PUT", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpClient http = HttpClient.newBuilder().version(HttpClient.Version.HTTP_1_1).build();
HttpResponse<String> res = http.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println("HTTP " + res.statusCode());
System.out.println(res.body());
}
}// allee API: PUT /sale/shipping-rates/797d2e65-cb23-4a16-98e9-d6f2a399839a (Go 1.20+, net/http; uruchom: go run main.go)
package main
import (
"fmt"
"io"
"net/http"
"os"
"strings"
)
func main() {
base := os.Getenv("ALLEE_API_URL")
if base == "" {
base = "https://api.allee.pl"
}
body := `{
"name": "Paczkomat i kurier pobraniowy",
"type": "PHYSICAL",
"rates": [
{
"deliveryMethod": {
"id": "bd0e0bcb-10d1-4584-bf5b-ebd07a86e70f"
},
"maxQuantityPerPackage": 5,
"firstItemRate": {
"amount": "12.99",
"currency": "PLN"
},
"nextItemRate": {
"amount": "0.00",
"currency": "PLN"
}
},
{
"deliveryMethod": {
"id": "5c76d200-c6db-46a7-9b78-7d067e8cfb2d"
},
"maxQuantityPerPackage": 5,
"firstItemRate": {
"amount": "16.99",
"currency": "PLN"
},
"nextItemRate": {
"amount": "2.00",
"currency": "PLN"
}
}
],
"allee": {
"freeDeliveryFrom": {
"amount": "200.00",
"currency": "PLN"
}
}
}`
req, err := http.NewRequest("PUT", base+"/sale/shipping-rates/797d2e65-cb23-4a16-98e9-d6f2a399839a", strings.NewReader(body))
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("ALLEE_API_KEY"))
req.Header.Set("Accept", "application/vnd.allegro.public.v1+json")
req.Header.Set("Content-Type", "application/vnd.allegro.public.v1+json")
klient := &http.Client{CheckRedirect: func(*http.Request, []*http.Request) error { return http.ErrUseLastResponse }}
res, err := klient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
dane, err := io.ReadAll(res.Body)
if err != nil {
panic(err)
}
fmt.Println("HTTP", res.StatusCode)
fmt.Println(string(dane))
}application/vnd.allegro.public.v1+json{
"id": "797d2e65-cb23-4a16-98e9-d6f2a399839a",
"name": "Paczkomat i kurier pobraniowy",
"type": "PHYSICAL",
"rates": [
{
"deliveryMethod": {
"id": "bd0e0bcb-10d1-4584-bf5b-ebd07a86e70f"
},
"maxQuantityPerPackage": 5,
"firstItemRate": {
"amount": "12.99",
"currency": "PLN"
},
"nextItemRate": {
"amount": "0.00",
"currency": "PLN"
}
},
{
"deliveryMethod": {
"id": "5c76d200-c6db-46a7-9b78-7d067e8cfb2d"
},
"maxQuantityPerPackage": 5,
"firstItemRate": {
"amount": "16.99",
"currency": "PLN"
},
"nextItemRate": {
"amount": "2.00",
"currency": "PLN"
}
}
],
"lastModified": "2026-11-10T11:10:03.648Z",
"allee": {
"freeDeliveryFrom": {
"amount": "200.00",
"currency": "PLN"
}
}
}