Wsady (feeds)
Wsady JSON do 10 000 komunikatów przetwarzane w tle (Amazon Feeds).
Miejsce wgrania dokumentu wsadu
POST /allee/feeds/documents
wzór Amazon SP-APIallegro:api:sale:offers:writelimit: bulk
Dla wsadów większych niż chcesz wysłać w treści żądania: podpisany adres PUT (5 min, do 10 MB) — wgraj dokument JSON wprost do magazynu, potem POST /allee/feeds z inputFeedDocumentId. W sandboxie → 403 SANDBOX_UNSUPPORTED (wysyłaj content).
Zgodność: wzorowana na Amazon Selling Partner API — Feeds — createFeedDocument.
Uprawnienie: zakres allegro:api:sale:offers:write.
Grupa limitu: bulk.
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
contentType string wymaganeapplication/jsonOdpowiedzi
201 Miejsce wgrania. · FeedDocumentUpload
feedDocumentId string · uuid zawszemethod string zawszePUTurl string · uri zawszeheaders object zawszeexpiresAt string · date-time zawszemaxBytes integer 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 | SANDBOX_UNSUPPORTED | Operacja niedostępna w sandboxie (pliki trafiałyby do magazynu produkcyjnego). |
| 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 | JsonMappingException | Treść nie jest poprawnym JSON albo ma zły kształt (np. images jako obiekty). |
| 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. |
| 503 | NOT_DEPLOYED | Funkcja jeszcze nie uruchomiona (np. sandbox, wsady). |
| 503 | STORAGE_UNAVAILABLE | Magazyn plików chwilowo niedostępny. |
curl -sS -X POST "${ALLEE_API_URL:-https://api.allee.pl}/allee/feeds/documents" \
-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'
{
"contentType": "application/json"
}
JSON<?php
// allee API: POST /allee/feeds/documents (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$body = [
'contentType' => 'application/json',
];
$ch = curl_init($base . '/allee/feeds/documents');
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 /allee/feeds/documents (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 = {
"contentType": "application/json",
}
r = requests.request("POST", BASE + "/allee/feeds/documents", headers=headers, json=body, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: POST /allee/feeds/documents (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const body = {
"contentType": "application/json"
};
const res = await fetch(`${BASE}/allee/feeds/documents`, {
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 /allee/feeds/documents (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 + "/allee/feeds/documents");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALLEE_API_KEY"));
req.Headers.Accept.ParseAdd("application/vnd.allegro.public.v1+json");
var json = """
{
"contentType": "application/json"
}
""";
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 /allee/feeds/documents (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 = """
{
"contentType": "application/json"
}
""";
HttpRequest req = HttpRequest.newBuilder(URI.create(base + "/allee/feeds/documents"))
.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 /allee/feeds/documents (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 := `{
"contentType": "application/json"
}`
req, err := http.NewRequest("POST", base+"/allee/feeds/documents", 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{
"feedDocumentId": "aac1646a-866c-4baa-9f1c-b9cbbf6f8d35",
"method": "PUT",
"url": "https://0e31a0c8a001f9f8df521110ca4f3f6e.r2.cloudflarestorage.com/allee/api-feeds/980000001/aac1646a-866c-4baa-9f1c-b9cbbf6f8d35.json?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=0136e1e8b4bd3d8e11870c33177d2879%2F20261110%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20261110T111005Z&X-Amz-Expires=300&X-Amz-SignedHeaders=content-type%3Bhost&X-Amz-Signature=…",
"headers": {
"Content-Type": "application/json"
},
"expiresAt": "2026-11-10T11:15:05.000Z",
"maxBytes": 10485760
}Nowy wsad ofert (JSON_LISTINGS_FEED)
POST /allee/feeds
wzór Amazon SP-APIallegro:api:sale:offers:writelimit: bulk
Do 10 000 komunikatów (UPDATE, PARTIAL_UPDATE, PATCH, DELETE) przetwarzanych w tle w kolejności messageId. Odpowiedź 202 od razu; koniec poznasz z GET /allee/feeds/{feedId} albo powiadomienia FEED_PROCESSING_FINISHED, wynik każdego komunikatu — z …/result.
Źródło (dokładnie jedno): content (dokument inline), messages (sama lista) albo inputFeedDocumentId. Najwyżej 2 wsady sprzedawcy w toku (429 TOO_MANY_CONCURRENT). Gdy kolejka nie działa, wsad do 500 komunikatów przetwarzamy od razu (202 z DONE).
Zgodność: wzorowana na Amazon Selling Partner API — Feeds — createFeed (JSON_LISTINGS_FEED).
Uprawnienie: zakres allegro:api:sale:offers:write.
Grupa limitu: bulk.
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
feedType string wymaganeJSON_LISTINGS_FEEDcontent FeedDocumentDokument wsadu JSON_LISTINGS_FEED.
Pola obiektu
header objectPola obiektu
sellerId stringversion string2.0messages array<FeedMessage> wymaganeDo 10 000 komunikatów.
Pola obiektu
messageId integer wymaganeNumer komunikatu w wsadzie (unikalny).
sku stringSKU oferty.
offerId stringAlbo id oferty.
operationType string wymaganeUPDATE = utwórz/zastąp (jak PUT), PARTIAL_UPDATE = zmień podane atrybuty, PATCH = JSON Patch, DELETE = usuń szkic / zakończ.
UPDATE, PARTIAL_UPDATE, PATCH, DELETErequirements stringLISTING, LISTING_OFFER_ONLYstatus stringACTIVE, INACTIVEattributes ListingAttributesAtrybuty listingu (płaskie, nazwy jak w schemacie kategorii GET /allee/categories/{id}/schema).
Pola obiektu
name stringTytuł (10–75 znaków).
category objectKategoria (alleeId ma pierwszeństwo).
Pola obiektu
alleeId integerid stringparameters objectParametry: klucz = id parametru Allegro (patrz schemat kategorii).
images array<string · uri>1–16 adresów.
description stringOpis (tekst, 20–20 000 znaków).
price MoneyInputKwota w żądaniu.
Pola obiektu
amount string|number wymaganeKwota jako tekst „123.45” (zalecane) albo liczba.
currency stringWaluta: tylko PLN (domyślnie PLN).
PLNstock integerSztuki (0–99 999).
ean stringGTIN (EAN).
shippingRatesId string · uuidTwój cennik.
handlingTime stringPT0S, PT24H, P2D…P60D.
returnPolicyId string · nullwarrantyId string · nullimpliedWarrantyId string · nullresponsibleProducerId string · nullresponsiblePersonId string · nullsafetyInformation SafetyInformation · nullPola obiektu
type string wymaganeTEXT, NO_SAFETY_INFORMATION, ATTACHMENTSdescription stringTreść informacji (dla TEXT).
taxRate string · null0.00, 5.00, 8.00, 23.00, nullinvoice string · nullVAT, VAT_MARGIN, WITHOUT_VAT, NO_INVOICE, nulllocation object · nullpatches array<object>messages array<FeedMessage>Albo sama lista komunikatów.
Pola obiektu
messageId integer wymaganeNumer komunikatu w wsadzie (unikalny).
sku stringSKU oferty.
offerId stringAlbo id oferty.
operationType string wymaganeUPDATE = utwórz/zastąp (jak PUT), PARTIAL_UPDATE = zmień podane atrybuty, PATCH = JSON Patch, DELETE = usuń szkic / zakończ.
UPDATE, PARTIAL_UPDATE, PATCH, DELETErequirements stringLISTING, LISTING_OFFER_ONLYstatus stringACTIVE, INACTIVEattributes ListingAttributesAtrybuty listingu (płaskie, nazwy jak w schemacie kategorii GET /allee/categories/{id}/schema).
Pola obiektu
name stringTytuł (10–75 znaków).
category objectKategoria (alleeId ma pierwszeństwo).
Pola obiektu
alleeId integerid stringparameters objectParametry: klucz = id parametru Allegro (patrz schemat kategorii).
images array<string · uri>1–16 adresów.
description stringOpis (tekst, 20–20 000 znaków).
price MoneyInputKwota w żądaniu.
Pola obiektu
amount string|number wymaganeKwota jako tekst „123.45” (zalecane) albo liczba.
currency stringWaluta: tylko PLN (domyślnie PLN).
PLNstock integerSztuki (0–99 999).
ean stringGTIN (EAN).
shippingRatesId string · uuidTwój cennik.
handlingTime stringPT0S, PT24H, P2D…P60D.
returnPolicyId string · nullwarrantyId string · nullimpliedWarrantyId string · nullresponsibleProducerId string · nullresponsiblePersonId string · nullsafetyInformation SafetyInformation · nullPola obiektu
type string wymaganeTEXT, NO_SAFETY_INFORMATION, ATTACHMENTSdescription stringTreść informacji (dla TEXT).
taxRate string · null0.00, 5.00, 8.00, 23.00, nullinvoice string · nullVAT, VAT_MARGIN, WITHOUT_VAT, NO_INVOICE, nulllocation object · nullpatches array<object>header objectNagłówek przy podaniu messages.
inputFeedDocumentId string · uuidAlbo dokument wgrany przez POST /allee/feeds/documents.
uploadId stringAlias inputFeedDocumentId.
marketplaceIds array<string>feedOptions objectOdpowiedzi
202 Przyjęto do przetwarzania. · Feed
feedId string · uuid zawszefeedType string zawszeJSON_LISTINGS_FEEDmarketplaceIds array<string> zawszecreatedTime string · date-time zawszeprocessingStatus string zawszeIN_QUEUE, IN_PROGRESS, DONE, CANCELLED, FATALprocessingStartTime string · date-time · null zawszeprocessingEndTime string · date-time · null zawszeresultFeedDocumentId string · null zawszeGdy DONE: wynik pod GET /allee/feeds/{feedId}/result.
allee object zawszePola obiektu
source string zawszeSkąd wsad: treść żądania, dokument, polecenie wsadowe Allegro.
INLINE, DOKUMENT, POLECENIEmessages object zawszePola obiektu
total integer zawszeprocessed integer zawszeaccepted integer zawszeinvalid integer zawszewithWarnings integer zawszefatalError string · null zawszePowód przerwania całego wsadu (FATAL).
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ę). |
| 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 | FEED_DOCUMENT_NOT_FOUND | Nie ma takiego dokumentu wsadu. |
| 422 | INVALID_FEED_DOCUMENT | Dokument wsadu ma zły kształt. |
| 422 | JsonMappingException | Treść nie jest poprawnym JSON albo ma zły kształt (np. images jako obiekty). |
| 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_CONCURRENT | Za dużo ciężkich operacji naraz (wsady, raporty, duże polecenia). |
| 429 | TOO_MANY_REQUESTS | Przekroczony limit (minutowy, grupy operacji albo IP). |
| 500 | INTERNAL_ERROR | Błąd serwera allee. |
| 503 | NOT_DEPLOYED | Funkcja jeszcze nie uruchomiona (np. sandbox, wsady). |
| 503 | QUEUE_UNAVAILABLE | Kolejka wsadów chwilowo nie działa. |
curl -sS -X POST "${ALLEE_API_URL:-https://api.allee.pl}/allee/feeds" \
-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'
{
"feedType": "JSON_LISTINGS_FEED",
"content": {
"header": {
"sellerId": 980000001,
"version": "2.0"
},
"messages": [
{
"messageId": 1,
"sku": "FILM-21ef85-5",
"operationType": "UPDATE",
"requirements": "LISTING",
"attributes": {
"name": "Gabinet doktora Caligari DVD",
"category": {
"alleeId": 35
},
"parameters": {
"225693": {
"values": [
"5901234123464"
]
},
"237218": {
"values": [
"Metropolis"
]
},
"246845": {
"valuesIds": [
"246845_622165"
]
},
"250077": {
"valuesIds": [
"250077_1797493"
]
},
"11323": {
"valuesIds": [
"11323_1"
]
}
},
"price": {
"amount": "45.00",
"currency": "PLN"
},
"stock": 3,
"images": [
"https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp"
],
"description": "Film na płycie DVD, nowy w folii. Wersja z polskimi napisami.",
"shippingRatesId": "797d2e65-cb23-4a16-98e9-d6f2a399839a",
"responsibleProducerId": "472bad66-e704-4344-a2d6-9bd85b1f9a5e",
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu."
}
}
},
{
"messageId": 2,
"sku": "FILM-21ef85-6",
"operationType": "UPDATE",
"requirements": "LISTING",
"attributes": {
"name": "Nosferatu DVD wydanie specjalne",
"category": {
"alleeId": 35
},
"parameters": {
"225693": {
"values": [
"5901234123464"
]
},
"237218": {
"values": [
"Metropolis"
]
},
"246845": {
"valuesIds": [
"246845_622165"
]
},
"250077": {
"valuesIds": [
"250077_1797493"
]
},
"11323": {
"valuesIds": [
"11323_1"
]
}
},
"price": {
"amount": "39.90",
"currency": "PLN"
},
"stock": 5,
"images": [
"https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp"
],
"description": "Film na płycie DVD, nowy w folii. Wersja z polskimi napisami.",
"shippingRatesId": "797d2e65-cb23-4a16-98e9-d6f2a399839a",
"responsibleProducerId": "472bad66-e704-4344-a2d6-9bd85b1f9a5e",
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu."
}
}
},
{
"messageId": 3,
"sku": "FILM-21ef85-5",
"operationType": "PARTIAL_UPDATE",
"attributes": {
"price": {
"amount": "41.90",
"currency": "PLN"
},
"stock": 15
}
}
]
}
}
JSON<?php
// allee API: POST /allee/feeds (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$body = [
'feedType' => 'JSON_LISTINGS_FEED',
'content' => [
'header' => [
'sellerId' => 980000001,
'version' => '2.0',
],
'messages' => [
[
'messageId' => 1,
'sku' => 'FILM-21ef85-5',
'operationType' => 'UPDATE',
'requirements' => 'LISTING',
'attributes' => [
'name' => 'Gabinet doktora Caligari DVD',
'category' => [
'alleeId' => 35,
],
'parameters' => [
'225693' => [
'values' => [
'5901234123464',
],
],
'237218' => [
'values' => [
'Metropolis',
],
],
'246845' => [
'valuesIds' => [
'246845_622165',
],
],
'250077' => [
'valuesIds' => [
'250077_1797493',
],
],
'11323' => [
'valuesIds' => [
'11323_1',
],
],
],
'price' => [
'amount' => '45.00',
'currency' => 'PLN',
],
'stock' => 3,
'images' => [
'https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp',
],
'description' => 'Film na płycie DVD, nowy w folii. Wersja z polskimi napisami.',
'shippingRatesId' => '797d2e65-cb23-4a16-98e9-d6f2a399839a',
'responsibleProducerId' => '472bad66-e704-4344-a2d6-9bd85b1f9a5e',
'safetyInformation' => [
'type' => 'TEXT',
'description' => 'Produkt bezpieczny w normalnym użytkowaniu.',
],
],
],
[
'messageId' => 2,
'sku' => 'FILM-21ef85-6',
'operationType' => 'UPDATE',
'requirements' => 'LISTING',
'attributes' => [
'name' => 'Nosferatu DVD wydanie specjalne',
'category' => [
'alleeId' => 35,
],
'parameters' => [
'225693' => [
'values' => [
'5901234123464',
],
],
'237218' => [
'values' => [
'Metropolis',
],
],
'246845' => [
'valuesIds' => [
'246845_622165',
],
],
'250077' => [
'valuesIds' => [
'250077_1797493',
],
],
'11323' => [
'valuesIds' => [
'11323_1',
],
],
],
'price' => [
'amount' => '39.90',
'currency' => 'PLN',
],
'stock' => 5,
'images' => [
'https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp',
],
'description' => 'Film na płycie DVD, nowy w folii. Wersja z polskimi napisami.',
'shippingRatesId' => '797d2e65-cb23-4a16-98e9-d6f2a399839a',
'responsibleProducerId' => '472bad66-e704-4344-a2d6-9bd85b1f9a5e',
'safetyInformation' => [
'type' => 'TEXT',
'description' => 'Produkt bezpieczny w normalnym użytkowaniu.',
],
],
],
[
'messageId' => 3,
'sku' => 'FILM-21ef85-5',
'operationType' => 'PARTIAL_UPDATE',
'attributes' => [
'price' => [
'amount' => '41.90',
'currency' => 'PLN',
],
'stock' => 15,
],
],
],
],
];
$ch = curl_init($base . '/allee/feeds');
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 /allee/feeds (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 = {
"feedType": "JSON_LISTINGS_FEED",
"content": {
"header": {
"sellerId": 980000001,
"version": "2.0",
},
"messages": [
{
"messageId": 1,
"sku": "FILM-21ef85-5",
"operationType": "UPDATE",
"requirements": "LISTING",
"attributes": {
"name": "Gabinet doktora Caligari DVD",
"category": {
"alleeId": 35,
},
"parameters": {
"225693": {
"values": [
"5901234123464",
],
},
"237218": {
"values": [
"Metropolis",
],
},
"246845": {
"valuesIds": [
"246845_622165",
],
},
"250077": {
"valuesIds": [
"250077_1797493",
],
},
"11323": {
"valuesIds": [
"11323_1",
],
},
},
"price": {
"amount": "45.00",
"currency": "PLN",
},
"stock": 3,
"images": [
"https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp",
],
"description": "Film na płycie DVD, nowy w folii. Wersja z polskimi napisami.",
"shippingRatesId": "797d2e65-cb23-4a16-98e9-d6f2a399839a",
"responsibleProducerId": "472bad66-e704-4344-a2d6-9bd85b1f9a5e",
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu.",
},
},
},
{
"messageId": 2,
"sku": "FILM-21ef85-6",
"operationType": "UPDATE",
"requirements": "LISTING",
"attributes": {
"name": "Nosferatu DVD wydanie specjalne",
"category": {
"alleeId": 35,
},
"parameters": {
"225693": {
"values": [
"5901234123464",
],
},
"237218": {
"values": [
"Metropolis",
],
},
"246845": {
"valuesIds": [
"246845_622165",
],
},
"250077": {
"valuesIds": [
"250077_1797493",
],
},
"11323": {
"valuesIds": [
"11323_1",
],
},
},
"price": {
"amount": "39.90",
"currency": "PLN",
},
"stock": 5,
"images": [
"https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp",
],
"description": "Film na płycie DVD, nowy w folii. Wersja z polskimi napisami.",
"shippingRatesId": "797d2e65-cb23-4a16-98e9-d6f2a399839a",
"responsibleProducerId": "472bad66-e704-4344-a2d6-9bd85b1f9a5e",
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu.",
},
},
},
{
"messageId": 3,
"sku": "FILM-21ef85-5",
"operationType": "PARTIAL_UPDATE",
"attributes": {
"price": {
"amount": "41.90",
"currency": "PLN",
},
"stock": 15,
},
},
],
},
}
r = requests.request("POST", BASE + "/allee/feeds", headers=headers, json=body, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: POST /allee/feeds (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const body = {
"feedType": "JSON_LISTINGS_FEED",
"content": {
"header": {
"sellerId": 980000001,
"version": "2.0"
},
"messages": [
{
"messageId": 1,
"sku": "FILM-21ef85-5",
"operationType": "UPDATE",
"requirements": "LISTING",
"attributes": {
"name": "Gabinet doktora Caligari DVD",
"category": {
"alleeId": 35
},
"parameters": {
"225693": {
"values": [
"5901234123464"
]
},
"237218": {
"values": [
"Metropolis"
]
},
"246845": {
"valuesIds": [
"246845_622165"
]
},
"250077": {
"valuesIds": [
"250077_1797493"
]
},
"11323": {
"valuesIds": [
"11323_1"
]
}
},
"price": {
"amount": "45.00",
"currency": "PLN"
},
"stock": 3,
"images": [
"https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp"
],
"description": "Film na płycie DVD, nowy w folii. Wersja z polskimi napisami.",
"shippingRatesId": "797d2e65-cb23-4a16-98e9-d6f2a399839a",
"responsibleProducerId": "472bad66-e704-4344-a2d6-9bd85b1f9a5e",
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu."
}
}
},
{
"messageId": 2,
"sku": "FILM-21ef85-6",
"operationType": "UPDATE",
"requirements": "LISTING",
"attributes": {
"name": "Nosferatu DVD wydanie specjalne",
"category": {
"alleeId": 35
},
"parameters": {
"225693": {
"values": [
"5901234123464"
]
},
"237218": {
"values": [
"Metropolis"
]
},
"246845": {
"valuesIds": [
"246845_622165"
]
},
"250077": {
"valuesIds": [
"250077_1797493"
]
},
"11323": {
"valuesIds": [
"11323_1"
]
}
},
"price": {
"amount": "39.90",
"currency": "PLN"
},
"stock": 5,
"images": [
"https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp"
],
"description": "Film na płycie DVD, nowy w folii. Wersja z polskimi napisami.",
"shippingRatesId": "797d2e65-cb23-4a16-98e9-d6f2a399839a",
"responsibleProducerId": "472bad66-e704-4344-a2d6-9bd85b1f9a5e",
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu."
}
}
},
{
"messageId": 3,
"sku": "FILM-21ef85-5",
"operationType": "PARTIAL_UPDATE",
"attributes": {
"price": {
"amount": "41.90",
"currency": "PLN"
},
"stock": 15
}
}
]
}
};
const res = await fetch(`${BASE}/allee/feeds`, {
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 /allee/feeds (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 + "/allee/feeds");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALLEE_API_KEY"));
req.Headers.Accept.ParseAdd("application/vnd.allegro.public.v1+json");
var json = """
{
"feedType": "JSON_LISTINGS_FEED",
"content": {
"header": {
"sellerId": 980000001,
"version": "2.0"
},
"messages": [
{
"messageId": 1,
"sku": "FILM-21ef85-5",
"operationType": "UPDATE",
"requirements": "LISTING",
"attributes": {
"name": "Gabinet doktora Caligari DVD",
"category": {
"alleeId": 35
},
"parameters": {
"225693": {
"values": [
"5901234123464"
]
},
"237218": {
"values": [
"Metropolis"
]
},
"246845": {
"valuesIds": [
"246845_622165"
]
},
"250077": {
"valuesIds": [
"250077_1797493"
]
},
"11323": {
"valuesIds": [
"11323_1"
]
}
},
"price": {
"amount": "45.00",
"currency": "PLN"
},
"stock": 3,
"images": [
"https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp"
],
"description": "Film na płycie DVD, nowy w folii. Wersja z polskimi napisami.",
"shippingRatesId": "797d2e65-cb23-4a16-98e9-d6f2a399839a",
"responsibleProducerId": "472bad66-e704-4344-a2d6-9bd85b1f9a5e",
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu."
}
}
},
{
"messageId": 2,
"sku": "FILM-21ef85-6",
"operationType": "UPDATE",
"requirements": "LISTING",
"attributes": {
"name": "Nosferatu DVD wydanie specjalne",
"category": {
"alleeId": 35
},
"parameters": {
"225693": {
"values": [
"5901234123464"
]
},
"237218": {
"values": [
"Metropolis"
]
},
"246845": {
"valuesIds": [
"246845_622165"
]
},
"250077": {
"valuesIds": [
"250077_1797493"
]
},
"11323": {
"valuesIds": [
"11323_1"
]
}
},
"price": {
"amount": "39.90",
"currency": "PLN"
},
"stock": 5,
"images": [
"https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp"
],
"description": "Film na płycie DVD, nowy w folii. Wersja z polskimi napisami.",
"shippingRatesId": "797d2e65-cb23-4a16-98e9-d6f2a399839a",
"responsibleProducerId": "472bad66-e704-4344-a2d6-9bd85b1f9a5e",
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu."
}
}
},
{
"messageId": 3,
"sku": "FILM-21ef85-5",
"operationType": "PARTIAL_UPDATE",
"attributes": {
"price": {
"amount": "41.90",
"currency": "PLN"
},
"stock": 15
}
}
]
}
}
""";
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 /allee/feeds (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 = """
{
"feedType": "JSON_LISTINGS_FEED",
"content": {
"header": {
"sellerId": 980000001,
"version": "2.0"
},
"messages": [
{
"messageId": 1,
"sku": "FILM-21ef85-5",
"operationType": "UPDATE",
"requirements": "LISTING",
"attributes": {
"name": "Gabinet doktora Caligari DVD",
"category": {
"alleeId": 35
},
"parameters": {
"225693": {
"values": [
"5901234123464"
]
},
"237218": {
"values": [
"Metropolis"
]
},
"246845": {
"valuesIds": [
"246845_622165"
]
},
"250077": {
"valuesIds": [
"250077_1797493"
]
},
"11323": {
"valuesIds": [
"11323_1"
]
}
},
"price": {
"amount": "45.00",
"currency": "PLN"
},
"stock": 3,
"images": [
"https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp"
],
"description": "Film na płycie DVD, nowy w folii. Wersja z polskimi napisami.",
"shippingRatesId": "797d2e65-cb23-4a16-98e9-d6f2a399839a",
"responsibleProducerId": "472bad66-e704-4344-a2d6-9bd85b1f9a5e",
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu."
}
}
},
{
"messageId": 2,
"sku": "FILM-21ef85-6",
"operationType": "UPDATE",
"requirements": "LISTING",
"attributes": {
"name": "Nosferatu DVD wydanie specjalne",
"category": {
"alleeId": 35
},
"parameters": {
"225693": {
"values": [
"5901234123464"
]
},
"237218": {
"values": [
"Metropolis"
]
},
"246845": {
"valuesIds": [
"246845_622165"
]
},
"250077": {
"valuesIds": [
"250077_1797493"
]
},
"11323": {
"valuesIds": [
"11323_1"
]
}
},
"price": {
"amount": "39.90",
"currency": "PLN"
},
"stock": 5,
"images": [
"https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp"
],
"description": "Film na płycie DVD, nowy w folii. Wersja z polskimi napisami.",
"shippingRatesId": "797d2e65-cb23-4a16-98e9-d6f2a399839a",
"responsibleProducerId": "472bad66-e704-4344-a2d6-9bd85b1f9a5e",
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu."
}
}
},
{
"messageId": 3,
"sku": "FILM-21ef85-5",
"operationType": "PARTIAL_UPDATE",
"attributes": {
"price": {
"amount": "41.90",
"currency": "PLN"
},
"stock": 15
}
}
]
}
}
""";
HttpRequest req = HttpRequest.newBuilder(URI.create(base + "/allee/feeds"))
.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 /allee/feeds (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 := `{
"feedType": "JSON_LISTINGS_FEED",
"content": {
"header": {
"sellerId": 980000001,
"version": "2.0"
},
"messages": [
{
"messageId": 1,
"sku": "FILM-21ef85-5",
"operationType": "UPDATE",
"requirements": "LISTING",
"attributes": {
"name": "Gabinet doktora Caligari DVD",
"category": {
"alleeId": 35
},
"parameters": {
"225693": {
"values": [
"5901234123464"
]
},
"237218": {
"values": [
"Metropolis"
]
},
"246845": {
"valuesIds": [
"246845_622165"
]
},
"250077": {
"valuesIds": [
"250077_1797493"
]
},
"11323": {
"valuesIds": [
"11323_1"
]
}
},
"price": {
"amount": "45.00",
"currency": "PLN"
},
"stock": 3,
"images": [
"https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp"
],
"description": "Film na płycie DVD, nowy w folii. Wersja z polskimi napisami.",
"shippingRatesId": "797d2e65-cb23-4a16-98e9-d6f2a399839a",
"responsibleProducerId": "472bad66-e704-4344-a2d6-9bd85b1f9a5e",
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu."
}
}
},
{
"messageId": 2,
"sku": "FILM-21ef85-6",
"operationType": "UPDATE",
"requirements": "LISTING",
"attributes": {
"name": "Nosferatu DVD wydanie specjalne",
"category": {
"alleeId": 35
},
"parameters": {
"225693": {
"values": [
"5901234123464"
]
},
"237218": {
"values": [
"Metropolis"
]
},
"246845": {
"valuesIds": [
"246845_622165"
]
},
"250077": {
"valuesIds": [
"250077_1797493"
]
},
"11323": {
"valuesIds": [
"11323_1"
]
}
},
"price": {
"amount": "39.90",
"currency": "PLN"
},
"stock": 5,
"images": [
"https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp"
],
"description": "Film na płycie DVD, nowy w folii. Wersja z polskimi napisami.",
"shippingRatesId": "797d2e65-cb23-4a16-98e9-d6f2a399839a",
"responsibleProducerId": "472bad66-e704-4344-a2d6-9bd85b1f9a5e",
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu."
}
}
},
{
"messageId": 3,
"sku": "FILM-21ef85-5",
"operationType": "PARTIAL_UPDATE",
"attributes": {
"price": {
"amount": "41.90",
"currency": "PLN"
},
"stock": 15
}
}
]
}
}`
req, err := http.NewRequest("POST", base+"/allee/feeds", 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{
"feedId": "8abb06e8-6e07-4bbb-b0d7-7fda5882df49",
"feedType": "JSON_LISTINGS_FEED",
"marketplaceIds": [
"allee-pl"
],
"createdTime": "2026-11-10T11:10:04.563Z",
"processingStatus": "IN_QUEUE",
"processingStartTime": null,
"processingEndTime": null,
"resultFeedDocumentId": null,
"allee": {
"source": "INLINE",
"messages": {
"total": 3,
"processed": 0,
"accepted": 0,
"invalid": 0,
"withWarnings": 0
},
"fatalError": null
}
}Przykład: Wsad z samą listą komunikatów (messages)
curl -sS -X POST "${ALLEE_API_URL:-https://api.allee.pl}/allee/feeds" \
-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'
{
"feedType": "JSON_LISTINGS_FEED",
"messages": [
{
"messageId": 1,
"sku": "FILM-21ef85-6",
"operationType": "DELETE"
}
]
}
JSON<?php
// allee API: POST /allee/feeds (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$body = [
'feedType' => 'JSON_LISTINGS_FEED',
'messages' => [
[
'messageId' => 1,
'sku' => 'FILM-21ef85-6',
'operationType' => 'DELETE',
],
],
];
$ch = curl_init($base . '/allee/feeds');
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 /allee/feeds (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 = {
"feedType": "JSON_LISTINGS_FEED",
"messages": [
{
"messageId": 1,
"sku": "FILM-21ef85-6",
"operationType": "DELETE",
},
],
}
r = requests.request("POST", BASE + "/allee/feeds", headers=headers, json=body, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: POST /allee/feeds (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const body = {
"feedType": "JSON_LISTINGS_FEED",
"messages": [
{
"messageId": 1,
"sku": "FILM-21ef85-6",
"operationType": "DELETE"
}
]
};
const res = await fetch(`${BASE}/allee/feeds`, {
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 /allee/feeds (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 + "/allee/feeds");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALLEE_API_KEY"));
req.Headers.Accept.ParseAdd("application/vnd.allegro.public.v1+json");
var json = """
{
"feedType": "JSON_LISTINGS_FEED",
"messages": [
{
"messageId": 1,
"sku": "FILM-21ef85-6",
"operationType": "DELETE"
}
]
}
""";
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 /allee/feeds (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 = """
{
"feedType": "JSON_LISTINGS_FEED",
"messages": [
{
"messageId": 1,
"sku": "FILM-21ef85-6",
"operationType": "DELETE"
}
]
}
""";
HttpRequest req = HttpRequest.newBuilder(URI.create(base + "/allee/feeds"))
.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 /allee/feeds (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 := `{
"feedType": "JSON_LISTINGS_FEED",
"messages": [
{
"messageId": 1,
"sku": "FILM-21ef85-6",
"operationType": "DELETE"
}
]
}`
req, err := http.NewRequest("POST", base+"/allee/feeds", 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{
"feedId": "9be12e3a-f19a-4295-8542-b7392a657fcd",
"feedType": "JSON_LISTINGS_FEED",
"marketplaceIds": [
"allee-pl"
],
"createdTime": "2026-11-10T11:10:04.568Z",
"processingStatus": "IN_QUEUE",
"processingStartTime": null,
"processingEndTime": null,
"resultFeedDocumentId": null,
"allee": {
"source": "INLINE",
"messages": {
"total": 1,
"processed": 0,
"accepted": 0,
"invalid": 0,
"withWarnings": 0
},
"fatalError": null
}
}Lista wsadów
GET /allee/feeds
wzór Amazon SP-APIallegro:api:sale:offers:readlimit: read
Wsady tej aplikacji (klucza) u sprzedawcy, najnowsze pierwsze.
Zgodność: wzorowana na Amazon Selling Partner API — Feeds — getFeeds.
Uprawnienie: zakres allegro:api:sale:offers:read.
Grupa limitu: read.
Parametry zapytania
processingStatuses stringStatusy rozdzielone przecinkiem: IN_QUEUE, IN_PROGRESS, DONE, CANCELLED, FATAL.
pageSize integer1–100.
nextToken stringToken następnej strony.
Odpowiedzi
200 Wsady. · FeedList
feeds array<Feed> zawszePola obiektu
feedId string · uuid zawszefeedType string zawszeJSON_LISTINGS_FEEDmarketplaceIds array<string> zawszecreatedTime string · date-time zawszeprocessingStatus string zawszeIN_QUEUE, IN_PROGRESS, DONE, CANCELLED, FATALprocessingStartTime string · date-time · null zawszeprocessingEndTime string · date-time · null zawszeresultFeedDocumentId string · null zawszeGdy DONE: wynik pod GET /allee/feeds/{feedId}/result.
allee object zawszePola obiektu
source string zawszeSkąd wsad: treść żądania, dokument, polecenie wsadowe Allegro.
INLINE, DOKUMENT, POLECENIEmessages object zawszePola obiektu
total integer zawszeprocessed integer zawszeaccepted integer zawszeinvalid integer zawszewithWarnings integer zawszefatalError string · null zawszePowód przerwania całego wsadu (FATAL).
nextToken string · null zawszeBłę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ę). |
| 429 | TOO_MANY_REQUESTS | Przekroczony limit (minutowy, grupy operacji albo IP). |
| 500 | INTERNAL_ERROR | Błąd serwera allee. |
| 503 | NOT_DEPLOYED | Funkcja jeszcze nie uruchomiona (np. sandbox, wsady). |
curl -sS -X GET "${ALLEE_API_URL:-https://api.allee.pl}/allee/feeds?processingStatuses=DONE%2CCANCELLED&pageSize=10" \
-H "Authorization: Bearer $ALLEE_API_KEY" \
-H "Accept: application/vnd.allegro.public.v1+json" \
-w '\nHTTP %{http_code}\n'<?php
// allee API: GET /allee/feeds (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$ch = curl_init($base . '/allee/feeds?processingStatuses=DONE%2CCANCELLED&pageSize=10');
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 /allee/feeds (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 + "/allee/feeds?processingStatuses=DONE%2CCANCELLED&pageSize=10", headers=headers, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: GET /allee/feeds (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const res = await fetch(`${BASE}/allee/feeds?processingStatuses=DONE%2CCANCELLED&pageSize=10`, {
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 /allee/feeds (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 + "/allee/feeds?processingStatuses=DONE%2CCANCELLED&pageSize=10");
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 /allee/feeds (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 + "/allee/feeds?processingStatuses=DONE%2CCANCELLED&pageSize=10"))
.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 /allee/feeds (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+"/allee/feeds?processingStatuses=DONE%2CCANCELLED&pageSize=10", 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{
"feeds": [
{
"feedId": "9be12e3a-f19a-4295-8542-b7392a657fcd",
"feedType": "JSON_LISTINGS_FEED",
"marketplaceIds": [
"allee-pl"
],
"createdTime": "2026-11-10T11:10:04.568Z",
"processingStatus": "CANCELLED",
"processingStartTime": null,
"processingEndTime": "2026-11-10T11:10:04.570Z",
"resultFeedDocumentId": null,
"allee": {
"source": "INLINE",
"messages": {
"total": 1,
"processed": 0,
"accepted": 0,
"invalid": 0,
"withWarnings": 0
},
"fatalError": null
}
},
{
"feedId": "8abb06e8-6e07-4bbb-b0d7-7fda5882df49",
"feedType": "JSON_LISTINGS_FEED",
"marketplaceIds": [
"allee-pl"
],
"createdTime": "2026-11-10T11:10:04.563Z",
"processingStatus": "DONE",
"processingStartTime": "2026-11-10T11:10:04.617Z",
"processingEndTime": "2026-11-10T11:10:04.709Z",
"resultFeedDocumentId": "8abb06e8-6e07-4bbb-b0d7-7fda5882df49",
"allee": {
"source": "INLINE",
"messages": {
"total": 3,
"processed": 3,
"accepted": 3,
"invalid": 0,
"withWarnings": 0
},
"fatalError": null
}
}
],
"nextToken": null
}Wsad
GET /allee/feeds/{feedId}
wzór Amazon SP-APIallegro:api:sale:offers:readlimit: read
Stan i liczniki wsadu.
Zgodność: wzorowana na Amazon Selling Partner API — Feeds — getFeed.
Uprawnienie: zakres allegro:api:sale:offers:read.
Grupa limitu: read.
Parametry ścieżki
feedId string · uuid wymaganyIdentyfikator wsadu.
Odpowiedzi
200 Wsad. · Feed
feedId string · uuid zawszefeedType string zawszeJSON_LISTINGS_FEEDmarketplaceIds array<string> zawszecreatedTime string · date-time zawszeprocessingStatus string zawszeIN_QUEUE, IN_PROGRESS, DONE, CANCELLED, FATALprocessingStartTime string · date-time · null zawszeprocessingEndTime string · date-time · null zawszeresultFeedDocumentId string · null zawszeGdy DONE: wynik pod GET /allee/feeds/{feedId}/result.
allee object zawszePola obiektu
source string zawszeSkąd wsad: treść żądania, dokument, polecenie wsadowe Allegro.
INLINE, DOKUMENT, POLECENIEmessages object zawszePola obiektu
total integer zawszeprocessed integer zawszeaccepted integer zawszeinvalid integer zawszewithWarnings integer zawszefatalError string · null zawszePowód przerwania całego wsadu (FATAL).
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ę). |
| 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. |
| 503 | NOT_DEPLOYED | Funkcja jeszcze nie uruchomiona (np. sandbox, wsady). |
curl -sS -X GET "${ALLEE_API_URL:-https://api.allee.pl}/allee/feeds/8abb06e8-6e07-4bbb-b0d7-7fda5882df49" \
-H "Authorization: Bearer $ALLEE_API_KEY" \
-H "Accept: application/vnd.allegro.public.v1+json" \
-w '\nHTTP %{http_code}\n'<?php
// allee API: GET /allee/feeds/8abb06e8-6e07-4bbb-b0d7-7fda5882df49 (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$ch = curl_init($base . '/allee/feeds/8abb06e8-6e07-4bbb-b0d7-7fda5882df49');
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 /allee/feeds/8abb06e8-6e07-4bbb-b0d7-7fda5882df49 (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 + "/allee/feeds/8abb06e8-6e07-4bbb-b0d7-7fda5882df49", headers=headers, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: GET /allee/feeds/8abb06e8-6e07-4bbb-b0d7-7fda5882df49 (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const res = await fetch(`${BASE}/allee/feeds/8abb06e8-6e07-4bbb-b0d7-7fda5882df49`, {
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 /allee/feeds/8abb06e8-6e07-4bbb-b0d7-7fda5882df49 (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 + "/allee/feeds/8abb06e8-6e07-4bbb-b0d7-7fda5882df49");
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 /allee/feeds/8abb06e8-6e07-4bbb-b0d7-7fda5882df49 (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 + "/allee/feeds/8abb06e8-6e07-4bbb-b0d7-7fda5882df49"))
.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 /allee/feeds/8abb06e8-6e07-4bbb-b0d7-7fda5882df49 (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+"/allee/feeds/8abb06e8-6e07-4bbb-b0d7-7fda5882df49", 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{
"feedId": "8abb06e8-6e07-4bbb-b0d7-7fda5882df49",
"feedType": "JSON_LISTINGS_FEED",
"marketplaceIds": [
"allee-pl"
],
"createdTime": "2026-11-10T11:10:04.563Z",
"processingStatus": "IN_QUEUE",
"processingStartTime": null,
"processingEndTime": null,
"resultFeedDocumentId": null,
"allee": {
"source": "INLINE",
"messages": {
"total": 3,
"processed": 0,
"accepted": 0,
"invalid": 0,
"withWarnings": 0
},
"fatalError": null
}
}Anulowanie wsadu
DELETE /allee/feeds/{feedId}
wzór Amazon SP-APIallegro:api:sale:offers:writelimit: write
Tylko wsad w kolejce (IN_QUEUE); inaczej 409 FEED_NOT_CANCELLABLE z bieżącym statusem w details.
Zgodność: wzorowana na Amazon Selling Partner API — Feeds — cancelFeed.
Uprawnienie: zakres allegro:api:sale:offers:write.
Grupa limitu: write.
Parametry ścieżki
feedId string · uuid wymaganyIdentyfikator wsadu.
Odpowiedzi
200 Anulowano. · Feed
feedId string · uuid zawszefeedType string zawszeJSON_LISTINGS_FEEDmarketplaceIds array<string> zawszecreatedTime string · date-time zawszeprocessingStatus string zawszeIN_QUEUE, IN_PROGRESS, DONE, CANCELLED, FATALprocessingStartTime string · date-time · null zawszeprocessingEndTime string · date-time · null zawszeresultFeedDocumentId string · null zawszeGdy DONE: wynik pod GET /allee/feeds/{feedId}/result.
allee object zawszePola obiektu
source string zawszeSkąd wsad: treść żądania, dokument, polecenie wsadowe Allegro.
INLINE, DOKUMENT, POLECENIEmessages object zawszePola obiektu
total integer zawszeprocessed integer zawszeaccepted integer zawszeinvalid integer zawszewithWarnings integer zawszefatalError string · null zawszePowód przerwania całego wsadu (FATAL).
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ę). |
| 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 | FEED_NOT_CANCELLABLE | Wsad nie jest już w kolejce. |
| 429 | TOO_MANY_REQUESTS | Przekroczony limit (minutowy, grupy operacji albo IP). |
| 500 | INTERNAL_ERROR | Błąd serwera allee. |
| 503 | NOT_DEPLOYED | Funkcja jeszcze nie uruchomiona (np. sandbox, wsady). |
curl -sS -X DELETE "${ALLEE_API_URL:-https://api.allee.pl}/allee/feeds/9be12e3a-f19a-4295-8542-b7392a657fcd" \
-H "Authorization: Bearer $ALLEE_API_KEY" \
-H "Accept: application/vnd.allegro.public.v1+json" \
-w '\nHTTP %{http_code}\n'<?php
// allee API: DELETE /allee/feeds/9be12e3a-f19a-4295-8542-b7392a657fcd (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$ch = curl_init($base . '/allee/feeds/9be12e3a-f19a-4295-8542-b7392a657fcd');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
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: DELETE /allee/feeds/9be12e3a-f19a-4295-8542-b7392a657fcd (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("DELETE", BASE + "/allee/feeds/9be12e3a-f19a-4295-8542-b7392a657fcd", headers=headers, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: DELETE /allee/feeds/9be12e3a-f19a-4295-8542-b7392a657fcd (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const res = await fetch(`${BASE}/allee/feeds/9be12e3a-f19a-4295-8542-b7392a657fcd`, {
method: "DELETE",
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: DELETE /allee/feeds/9be12e3a-f19a-4295-8542-b7392a657fcd (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("DELETE"), baseUrl + "/allee/feeds/9be12e3a-f19a-4295-8542-b7392a657fcd");
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: DELETE /allee/feeds/9be12e3a-f19a-4295-8542-b7392a657fcd (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 + "/allee/feeds/9be12e3a-f19a-4295-8542-b7392a657fcd"))
.header("Authorization", "Bearer " + System.getenv("ALLEE_API_KEY"))
.header("Accept", "application/vnd.allegro.public.v1+json")
.method("DELETE", 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: DELETE /allee/feeds/9be12e3a-f19a-4295-8542-b7392a657fcd (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("DELETE", base+"/allee/feeds/9be12e3a-f19a-4295-8542-b7392a657fcd", 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{
"feedId": "9be12e3a-f19a-4295-8542-b7392a657fcd",
"feedType": "JSON_LISTINGS_FEED",
"marketplaceIds": [
"allee-pl"
],
"createdTime": "2026-11-10T11:10:04.568Z",
"processingStatus": "CANCELLED",
"processingStartTime": null,
"processingEndTime": "2026-11-10T11:10:04.570Z",
"resultFeedDocumentId": null,
"allee": {
"source": "INLINE",
"messages": {
"total": 1,
"processed": 0,
"accepted": 0,
"invalid": 0,
"withWarnings": 0
},
"fatalError": null
}
}Raport przetwarzania wsadu
GET /allee/feeds/{feedId}/result
wzór Amazon SP-APIallegro:api:sale:offers:readlimit: read
Po DONE/FATAL: podsumowanie, problemy z numerem komunikatu i wynik każdego komunikatu (oferta, zmiana, issues). Wcześniej → 409 FEED_NOT_FINISHED.
Zgodność: wzorowana na Amazon Selling Partner API — Feeds — processing report (JSON).
Uprawnienie: zakres allegro:api:sale:offers:read.
Grupa limitu: read.
Parametry ścieżki
feedId string · uuid wymaganyIdentyfikator wsadu.
Odpowiedzi
200 Raport. · FeedResult
header object zawszePola obiektu
sellerId string zawszefeedId string zawszeversion string zawszeissues array<ListingIssue> zawszePola obiektu
code string zawszeKod problemu (ten sam słownik co błędy walidacji oferty).
message string zawszeseverity string zawszeERROR blokuje zapis/publikację, WARNING nie blokuje.
ERROR, WARNING, INFOattributeNames array<string> zawszeAtrybuty, których dotyczy problem.
categories array<string> zawszeGrupy problemu, np. MISSING_ATTRIBUTE, INVALID_ATTRIBUTE, GPSR.
path string · nullPole w kształcie Allegro (np. productSet[0].product.parameters).
messageId integerNumer komunikatu wsadu (tylko w raporcie wsadu).
summary object zawszePola obiektu
errors integer zawszewarnings integer zawszemessagesProcessed integer zawszemessagesAccepted integer zawszemessagesInvalid integer zawszeallee object zawszePola obiektu
processingStatus string zawszeDONE, FATALfatalError string · null zawszeresults array<object> zawszeWynik każdego komunikatu.
Pola obiektu
messageId integer zawszesku string · null zawszeofferId string · null zawszestatus string zawszeACCEPTED, INVALIDchange string · null zawszeCREATED, UPDATED, UNCHANGED, DELETED, ENDED, nullissues array<ListingIssue> zawszePola obiektu
code string zawszeKod problemu (ten sam słownik co błędy walidacji oferty).
message string zawszeseverity string zawszeERROR blokuje zapis/publikację, WARNING nie blokuje.
ERROR, WARNING, INFOattributeNames array<string> zawszeAtrybuty, których dotyczy problem.
categories array<string> zawszeGrupy problemu, np. MISSING_ATTRIBUTE, INVALID_ATTRIBUTE, GPSR.
path string · nullPole w kształcie Allegro (np. productSet[0].product.parameters).
messageId integerNumer komunikatu wsadu (tylko w raporcie wsadu).
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ę). |
| 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 | FEED_NOT_FINISHED | Wsad jeszcze trwa. |
| 429 | TOO_MANY_REQUESTS | Przekroczony limit (minutowy, grupy operacji albo IP). |
| 500 | INTERNAL_ERROR | Błąd serwera allee. |
| 503 | NOT_DEPLOYED | Funkcja jeszcze nie uruchomiona (np. sandbox, wsady). |
curl -sS -X GET "${ALLEE_API_URL:-https://api.allee.pl}/allee/feeds/8abb06e8-6e07-4bbb-b0d7-7fda5882df49/result" \
-H "Authorization: Bearer $ALLEE_API_KEY" \
-H "Accept: application/vnd.allegro.public.v1+json" \
-w '\nHTTP %{http_code}\n'<?php
// allee API: GET /allee/feeds/8abb06e8-6e07-4bbb-b0d7-7fda5882df49/result (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$ch = curl_init($base . '/allee/feeds/8abb06e8-6e07-4bbb-b0d7-7fda5882df49/result');
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 /allee/feeds/8abb06e8-6e07-4bbb-b0d7-7fda5882df49/result (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 + "/allee/feeds/8abb06e8-6e07-4bbb-b0d7-7fda5882df49/result", headers=headers, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: GET /allee/feeds/8abb06e8-6e07-4bbb-b0d7-7fda5882df49/result (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const res = await fetch(`${BASE}/allee/feeds/8abb06e8-6e07-4bbb-b0d7-7fda5882df49/result`, {
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 /allee/feeds/8abb06e8-6e07-4bbb-b0d7-7fda5882df49/result (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 + "/allee/feeds/8abb06e8-6e07-4bbb-b0d7-7fda5882df49/result");
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 /allee/feeds/8abb06e8-6e07-4bbb-b0d7-7fda5882df49/result (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 + "/allee/feeds/8abb06e8-6e07-4bbb-b0d7-7fda5882df49/result"))
.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 /allee/feeds/8abb06e8-6e07-4bbb-b0d7-7fda5882df49/result (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+"/allee/feeds/8abb06e8-6e07-4bbb-b0d7-7fda5882df49/result", 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{
"header": {
"sellerId": "980000001",
"feedId": "8abb06e8-6e07-4bbb-b0d7-7fda5882df49",
"version": "2.0"
},
"issues": [],
"summary": {
"errors": 0,
"warnings": 0,
"messagesProcessed": 3,
"messagesAccepted": 3,
"messagesInvalid": 0
},
"allee": {
"processingStatus": "DONE",
"fatalError": null,
"results": [
{
"messageId": 1,
"sku": "FILM-21ef85-5",
"offerId": "900000000000026",
"status": "ACCEPTED",
"change": "CREATED",
"issues": []
},
{
"messageId": 2,
"sku": "FILM-21ef85-6",
"offerId": "900000000000027",
"status": "ACCEPTED",
"change": "CREATED",
"issues": []
},
{
"messageId": 3,
"sku": "FILM-21ef85-5",
"offerId": "900000000000026",
"status": "ACCEPTED",
"change": "UPDATED",
"issues": []
}
]
}
}