Przesyłki
Numery przesyłek, przewoźnicy, śledzenie.
Przewoźnicy
GET /order/carriers
zgodna z Allegrolimit: read
Stała lista kodów przewoźników do POST …/shipments. ALLEGRO i OTHER wymagają carrierName.
Zgodność: zgodna z Allegro REST API (ten sam kształt) — GET /order/carriers.
Uprawnienie: dowolny ważny token lub klucz (działa też token aplikacji client_credentials).
Grupa limitu: read.
Odpowiedzi
200 Przewoźnicy. · CarrierList
carriers array<Carrier> zawszePola obiektu
id string 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}/order/carriers" \
-H "Authorization: Bearer $ALLEE_API_KEY" \
-H "Accept: application/vnd.allegro.public.v1+json" \
-w '\nHTTP %{http_code}\n'<?php
// allee API: GET /order/carriers (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$ch = curl_init($base . '/order/carriers');
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 /order/carriers (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 + "/order/carriers", headers=headers, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: GET /order/carriers (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const res = await fetch(`${BASE}/order/carriers`, {
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 /order/carriers (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 + "/order/carriers");
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 /order/carriers (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 + "/order/carriers"))
.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 /order/carriers (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+"/order/carriers", 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{
"carriers": [
{
"id": "DPD",
"name": "DPD"
},
{
"id": "INPOST",
"name": "InPost"
},
{
"id": "ALLEGRO_PACZKOMATY",
"name": "Allegro Paczkomaty InPost"
},
{
"id": "DHL",
"name": "DHL"
},
{
"id": "GLS",
"name": "GLS"
},
{
"id": "UPS",
"name": "UPS"
},
{
"id": "FEDEX",
"name": "FedEx"
},
{
"id": "TNT",
"name": "TNT"
},
{
"id": "ORLEN_PACZKA",
"name": "ORLEN Paczka"
},
{
"id": "POCZTEX",
"name": "Pocztex"
},
{
"id": "POCZTA_POLSKA",
"name": "Poczta Polska"
},
{
"id": "RUCH",
"name": "Ruch"
},
{
"id": "ALLEGRO",
"name": "Allegro (inny przewoźnik)"
},
{
"id": "OTHER",
"name": "Inny przewoźnik"
}
]
}Przesyłki zamówienia
GET /order/checkout-forms/{checkoutFormId}/shipments
Allegro + rozszerzeniaallegro:api:orders:readlimit: read
Numery przesyłek dodane do zamówienia.
Zamówieniami allee.pl sprzedawcy obsługuje jedna integracja naraz (wybór w panelu sprzedaży → Integracje); inna aplikacja dostaje 403 ORDERS_OWNED_BY_OTHER_INTEGRATION (details.owner: PANEL, OTHER_APP, BASELINKER).
Zgodność: zgodna z Allegro REST API, z rozszerzeniami allee (pola allee.*, alleeId) — GET /order/checkout-forms/{id}/shipments.
Uprawnienie: zakres allegro:api:orders:read.
Grupa limitu: read.
Parametry ścieżki
checkoutFormId string · uuid wymaganyIdentyfikator zamówienia (UUID, checkoutForm.id).
Odpowiedzi
200 Przesyłki. · ShipmentList
shipments array<Shipment> zawszePola obiektu
id string · uuid zawszewaybill string zawszecarrierId string zawszecarrierName string · null zawszelineItems array<object> zawszePola obiektu
id string zawszequantity integer zawszecreatedAt string · date-time zawszeallee object zawszeRozszerzenia allee (10.11.2026).
Pola obiektu
trackingUrl string · uri · null zawszeLink śledzenia, który widzi kupujący (null — przewoźnik bez publicznej strony śledzenia).
warnings array<object> zawszeOstrzeżenia (numer zapisany): nietypowy format dla DPD, InPost, Poczty Polskiej.
Pola obiektu
code string zawszeWAYBILL_FORMAT_UNUSUALpath string zawszemessage 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ę). |
| 403 | ORDERS_OWNED_BY_OTHER_INTEGRATION | Zamówienia sprzedawcy obsługuje inna integracja (details.owner). |
| 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}/order/checkout-forms/432810d0-4d26-4f39-ba5f-b89def4d4f92/shipments" \
-H "Authorization: Bearer $ALLEE_API_KEY" \
-H "Accept: application/vnd.allegro.public.v1+json" \
-w '\nHTTP %{http_code}\n'<?php
// allee API: GET /order/checkout-forms/432810d0-4d26-4f39-ba5f-b89def4d4f92/shipments (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$ch = curl_init($base . '/order/checkout-forms/432810d0-4d26-4f39-ba5f-b89def4d4f92/shipments');
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 /order/checkout-forms/432810d0-4d26-4f39-ba5f-b89def4d4f92/shipments (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 + "/order/checkout-forms/432810d0-4d26-4f39-ba5f-b89def4d4f92/shipments", headers=headers, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: GET /order/checkout-forms/432810d0-4d26-4f39-ba5f-b89def4d4f92/shipments (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const res = await fetch(`${BASE}/order/checkout-forms/432810d0-4d26-4f39-ba5f-b89def4d4f92/shipments`, {
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 /order/checkout-forms/432810d0-4d26-4f39-ba5f-b89def4d4f92/shipments (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 + "/order/checkout-forms/432810d0-4d26-4f39-ba5f-b89def4d4f92/shipments");
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 /order/checkout-forms/432810d0-4d26-4f39-ba5f-b89def4d4f92/shipments (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 + "/order/checkout-forms/432810d0-4d26-4f39-ba5f-b89def4d4f92/shipments"))
.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 /order/checkout-forms/432810d0-4d26-4f39-ba5f-b89def4d4f92/shipments (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+"/order/checkout-forms/432810d0-4d26-4f39-ba5f-b89def4d4f92/shipments", 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{
"shipments": [
{
"id": "120b3099-c95e-4765-b44e-8f1e3f67ee8c",
"waybill": "620111222333444555495937",
"carrierId": "INPOST",
"carrierName": "InPost",
"lineItems": [
{
"id": "2d9680b4-9cb7-4096-9428-8c1ceb2790c2",
"quantity": 2
}
],
"createdAt": "2026-11-10T11:10:05.446Z",
"allee": {
"trackingUrl": "https://inpost.pl/sledzenie-przesylek?number=620111222333444555495937",
"warnings": []
}
}
]
}Dodanie numeru przesyłki
POST /order/checkout-forms/{checkoutFormId}/shipments
Allegro + rozszerzeniaallegro:api:orders:writelimit: write
Numer przesyłki (bez zmiany statusu — SENT ustawiasz osobno). Brak lineItems = całe zamówienie; lineItems[].quantity (allee) = część sztuk pozycji.
Idempotentne: ta sama para (carrierId, waybill) w zamówieniu → 200 z istniejącą przesyłką. Paczki InPost allee śledzi samo i ustawia SENT/PICKED_UP.
Zamówieniami allee.pl sprzedawcy obsługuje jedna integracja naraz (wybór w panelu sprzedaży → Integracje); inna aplikacja dostaje 403 ORDERS_OWNED_BY_OTHER_INTEGRATION (details.owner: PANEL, OTHER_APP, BASELINKER).
Zgodność: zgodna z Allegro REST API, z rozszerzeniami allee (pola allee.*, alleeId) — POST /order/checkout-forms/{id}/shipments.
Uprawnienie: zakres allegro:api:orders:write.
Grupa limitu: write.
Parametry ścieżki
checkoutFormId string · uuid wymaganyIdentyfikator zamówienia (UUID, checkoutForm.id).
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
carrierId string wymaganeKod przewoźnika z GET /order/carriers (wielkość liter bez znaczenia).
waybill string wymaganeNumer przesyłki: [A-Za-z0-9._-/], 1–64 znaki.
carrierName stringWymagane dla ALLEGRO i OTHER (do 60 znaków).
lineItems array<object>Brak albo pusta lista = całe zamówienie.
Pola obiektu
id stringlineItem IdRefOdwołanie po identyfikatorze.
Pola obiektu
id string wymaganequantity integerRozszerzenie allee: część sztuk pozycji.
Odpowiedzi
200 Ta przesyłka już była. · Shipment
id string · uuid zawszewaybill string zawszecarrierId string zawszecarrierName string · null zawszelineItems array<object> zawszePola obiektu
id string zawszequantity integer zawszecreatedAt string · date-time zawszeallee object zawszeRozszerzenia allee (10.11.2026).
Pola obiektu
trackingUrl string · uri · null zawszeLink śledzenia, który widzi kupujący (null — przewoźnik bez publicznej strony śledzenia).
warnings array<object> zawszeOstrzeżenia (numer zapisany): nietypowy format dla DPD, InPost, Poczty Polskiej.
Pola obiektu
code string zawszeWAYBILL_FORMAT_UNUSUALpath string zawszemessage string zawsze201 Dodano. · Shipment
id string · uuid zawszewaybill string zawszecarrierId string zawszecarrierName string · null zawszelineItems array<object> zawszePola obiektu
id string zawszequantity integer zawszecreatedAt string · date-time zawszeallee object zawszeRozszerzenia allee (10.11.2026).
Pola obiektu
trackingUrl string · uri · null zawszeLink śledzenia, który widzi kupujący (null — przewoźnik bez publicznej strony śledzenia).
warnings array<object> zawszeOstrzeżenia (numer zapisany): nietypowy format dla DPD, InPost, Poczty Polskiej.
Pola obiektu
code string zawszeWAYBILL_FORMAT_UNUSUALpath string zawszemessage 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ę). |
| 403 | ORDERS_OWNED_BY_OTHER_INTEGRATION | Zamówienia sprzedawcy obsługuje inna integracja (details.owner). |
| 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). |
| 409 | ORDER_CLOSED | Zamówienie anulowane albo zakończone. |
| 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 | CARRIER_NAME_REQUIRED | ALLEGRO/OTHER bez carrierName. |
| 422 | CARRIER_NOT_FOUND | Nieznany przewoźnik. |
| 422 | ConstraintViolationException.MissingRequiredParameters | Brak wymaganego parametru lub pola (details = id parametru). |
| 422 | INVALID_QUANTITY | Liczba sztuk poza zakresem. |
| 422 | INVALID_WAYBILL | Zły numer przesyłki. |
| 422 | JsonMappingException | Treść nie jest poprawnym JSON albo ma zły kształt (np. images jako obiekty). |
| 422 | LINE_ITEM_NOT_FOUND | Pozycja spoza zamówienia. |
| 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}/order/checkout-forms/432810d0-4d26-4f39-ba5f-b89def4d4f92/shipments" \
-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'
{
"carrierId": "INPOST",
"waybill": "620111222333444555495937",
"lineItems": [
{
"id": "2d9680b4-9cb7-4096-9428-8c1ceb2790c2"
}
]
}
JSON<?php
// allee API: POST /order/checkout-forms/432810d0-4d26-4f39-ba5f-b89def4d4f92/shipments (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$body = [
'carrierId' => 'INPOST',
'waybill' => '620111222333444555495937',
'lineItems' => [
[
'id' => '2d9680b4-9cb7-4096-9428-8c1ceb2790c2',
],
],
];
$ch = curl_init($base . '/order/checkout-forms/432810d0-4d26-4f39-ba5f-b89def4d4f92/shipments');
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 /order/checkout-forms/432810d0-4d26-4f39-ba5f-b89def4d4f92/shipments (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 = {
"carrierId": "INPOST",
"waybill": "620111222333444555495937",
"lineItems": [
{
"id": "2d9680b4-9cb7-4096-9428-8c1ceb2790c2",
},
],
}
r = requests.request("POST", BASE + "/order/checkout-forms/432810d0-4d26-4f39-ba5f-b89def4d4f92/shipments", headers=headers, json=body, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: POST /order/checkout-forms/432810d0-4d26-4f39-ba5f-b89def4d4f92/shipments (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const body = {
"carrierId": "INPOST",
"waybill": "620111222333444555495937",
"lineItems": [
{
"id": "2d9680b4-9cb7-4096-9428-8c1ceb2790c2"
}
]
};
const res = await fetch(`${BASE}/order/checkout-forms/432810d0-4d26-4f39-ba5f-b89def4d4f92/shipments`, {
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 /order/checkout-forms/432810d0-4d26-4f39-ba5f-b89def4d4f92/shipments (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 + "/order/checkout-forms/432810d0-4d26-4f39-ba5f-b89def4d4f92/shipments");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALLEE_API_KEY"));
req.Headers.Accept.ParseAdd("application/vnd.allegro.public.v1+json");
var json = """
{
"carrierId": "INPOST",
"waybill": "620111222333444555495937",
"lineItems": [
{
"id": "2d9680b4-9cb7-4096-9428-8c1ceb2790c2"
}
]
}
""";
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 /order/checkout-forms/432810d0-4d26-4f39-ba5f-b89def4d4f92/shipments (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 = """
{
"carrierId": "INPOST",
"waybill": "620111222333444555495937",
"lineItems": [
{
"id": "2d9680b4-9cb7-4096-9428-8c1ceb2790c2"
}
]
}
""";
HttpRequest req = HttpRequest.newBuilder(URI.create(base + "/order/checkout-forms/432810d0-4d26-4f39-ba5f-b89def4d4f92/shipments"))
.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 /order/checkout-forms/432810d0-4d26-4f39-ba5f-b89def4d4f92/shipments (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 := `{
"carrierId": "INPOST",
"waybill": "620111222333444555495937",
"lineItems": [
{
"id": "2d9680b4-9cb7-4096-9428-8c1ceb2790c2"
}
]
}`
req, err := http.NewRequest("POST", base+"/order/checkout-forms/432810d0-4d26-4f39-ba5f-b89def4d4f92/shipments", 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": "120b3099-c95e-4765-b44e-8f1e3f67ee8c",
"waybill": "620111222333444555495937",
"carrierId": "INPOST",
"carrierName": "InPost",
"lineItems": [
{
"id": "2d9680b4-9cb7-4096-9428-8c1ceb2790c2",
"quantity": 2
}
],
"createdAt": "2026-11-10T11:10:05.446Z",
"allee": {
"trackingUrl": "https://inpost.pl/sledzenie-przesylek?number=620111222333444555495937",
"warnings": []
}
}Przykład: Przesyłka całego zamówienia (bez lineItems)
curl -sS -X POST "${ALLEE_API_URL:-https://api.allee.pl}/order/checkout-forms/718ce396-4940-431f-815e-7a51875c71df/shipments" \
-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'
{
"carrierId": "DPD",
"waybill": "1000634495937U"
}
JSON<?php
// allee API: POST /order/checkout-forms/718ce396-4940-431f-815e-7a51875c71df/shipments (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$body = [
'carrierId' => 'DPD',
'waybill' => '1000634495937U',
];
$ch = curl_init($base . '/order/checkout-forms/718ce396-4940-431f-815e-7a51875c71df/shipments');
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 /order/checkout-forms/718ce396-4940-431f-815e-7a51875c71df/shipments (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 = {
"carrierId": "DPD",
"waybill": "1000634495937U",
}
r = requests.request("POST", BASE + "/order/checkout-forms/718ce396-4940-431f-815e-7a51875c71df/shipments", headers=headers, json=body, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: POST /order/checkout-forms/718ce396-4940-431f-815e-7a51875c71df/shipments (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const body = {
"carrierId": "DPD",
"waybill": "1000634495937U"
};
const res = await fetch(`${BASE}/order/checkout-forms/718ce396-4940-431f-815e-7a51875c71df/shipments`, {
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 /order/checkout-forms/718ce396-4940-431f-815e-7a51875c71df/shipments (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 + "/order/checkout-forms/718ce396-4940-431f-815e-7a51875c71df/shipments");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALLEE_API_KEY"));
req.Headers.Accept.ParseAdd("application/vnd.allegro.public.v1+json");
var json = """
{
"carrierId": "DPD",
"waybill": "1000634495937U"
}
""";
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 /order/checkout-forms/718ce396-4940-431f-815e-7a51875c71df/shipments (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 = """
{
"carrierId": "DPD",
"waybill": "1000634495937U"
}
""";
HttpRequest req = HttpRequest.newBuilder(URI.create(base + "/order/checkout-forms/718ce396-4940-431f-815e-7a51875c71df/shipments"))
.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 /order/checkout-forms/718ce396-4940-431f-815e-7a51875c71df/shipments (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 := `{
"carrierId": "DPD",
"waybill": "1000634495937U"
}`
req, err := http.NewRequest("POST", base+"/order/checkout-forms/718ce396-4940-431f-815e-7a51875c71df/shipments", 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": "d9006b14-2174-4806-b58d-1a8e46e91e23",
"waybill": "1000634495937U",
"carrierId": "DPD",
"carrierName": "DPD",
"lineItems": [],
"createdAt": "2026-11-10T11:10:05.530Z",
"allee": {
"trackingUrl": "https://tracktrace.dpd.com.pl/parcelDetails?typ=1&p1=1000634495937U",
"warnings": []
}
}Śledzenie przesyłek
GET /order/carriers/{carrierId}/tracking
Allegro + rozszerzeniaallegro:api:orders:readlimit: read
Historia statusów przesyłek Twoich zamówień (do 20 numerów naraz). Zakres orders:read albo shipments:read. Numer spoza Twoich zamówień → trackingDetails: null.
Zamówieniami allee.pl sprzedawcy obsługuje jedna integracja naraz (wybór w panelu sprzedaży → Integracje); inna aplikacja dostaje 403 ORDERS_OWNED_BY_OTHER_INTEGRATION (details.owner: PANEL, OTHER_APP, BASELINKER).
Zgodność: zgodna z Allegro REST API, z rozszerzeniami allee (pola allee.*, alleeId) — GET /order/carriers/{carrierId}/tracking.
Uprawnienie: zakres allegro:api:orders:read.
Grupa limitu: read.
Parametry ścieżki
carrierId string wymaganyKod przewoźnika (GET /order/carriers).
Parametry zapytania
waybill array<string> wymaganyNumer przesyłki — powtórz parametr dla kilku (do 20).
Odpowiedzi
200 Śledzenie. · Tracking
carrierId string zawszewaybills array<object> zawszePola obiektu
waybill string zawszetrackingDetails object · null zawszePola obiektu
createdAt string · date-time · null zawszeupdatedAt string · date-time · null zawszestatuses array<object> zawszePola obiektu
occurredAt string · date-time zawszecode string zawszedescription string · nullallee object zawszePola obiektu
trackingUrl string · uri · null zawszeStrona śledzenia u przewoźnika.
Błędy
| HTTP | Kod | Znaczenie |
|---|---|---|
| 400 | VALIDATION_ERROR | Zła wartość parametru zapytania (400) albo pola treści (422); path wskazuje miejsce. |
| 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ę). |
| 403 | ORDERS_OWNED_BY_OTHER_INTEGRATION | Zamówienia sprzedawcy obsługuje inna integracja (details.owner). |
| 404 | CARRIER_NOT_FOUND | Nieznany przewoźnik. |
| 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}/order/carriers/INPOST/tracking?waybill=620111222333444555495937" \
-H "Authorization: Bearer $ALLEE_API_KEY" \
-H "Accept: application/vnd.allegro.public.v1+json" \
-w '\nHTTP %{http_code}\n'<?php
// allee API: GET /order/carriers/INPOST/tracking (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$ch = curl_init($base . '/order/carriers/INPOST/tracking?waybill=620111222333444555495937');
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 /order/carriers/INPOST/tracking (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 + "/order/carriers/INPOST/tracking?waybill=620111222333444555495937", headers=headers, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: GET /order/carriers/INPOST/tracking (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const res = await fetch(`${BASE}/order/carriers/INPOST/tracking?waybill=620111222333444555495937`, {
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 /order/carriers/INPOST/tracking (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 + "/order/carriers/INPOST/tracking?waybill=620111222333444555495937");
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 /order/carriers/INPOST/tracking (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 + "/order/carriers/INPOST/tracking?waybill=620111222333444555495937"))
.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 /order/carriers/INPOST/tracking (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+"/order/carriers/INPOST/tracking?waybill=620111222333444555495937", 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{
"carrierId": "INPOST",
"waybills": [
{
"waybill": "620111222333444555495937",
"trackingDetails": {
"createdAt": "2026-11-10T11:10:05.446Z",
"updatedAt": "2026-11-10T11:10:05.446Z",
"statuses": []
},
"allee": {
"trackingUrl": "https://inpost.pl/sledzenie-przesylek?number=620111222333444555495937"
}
}
]
}