Oferty
Wystawianie i zmiana ofert w kształcie Allegro, lista, kupowalność, zdarzenia ofert.
- POST
/sale/product-offers— Wystawienie oferty - GET
/sale/product-offers/{offerId}— Oferta - PATCH
/sale/product-offers/{offerId}— Zmiana oferty - GET
/sale/offers— Lista ofert - GET
/sale/offers/unfilled-parameters— Oferty z brakującymi parametrami - GET
/sale/offers/{offerId}/buyability— Czy oferta da się kupić - DELETE
/sale/offers/{offerId}— Usunięcie szkicu oferty - GET
/sale/offer-events— Zdarzenia ofert
Wystawienie oferty
POST /sale/product-offers
Allegro + rozszerzeniaallegro:api:sale:offers:writelimit: write
Oferta w kształcie Allegro. Minimum: productSet[0].product (nazwa 10–75 znaków, kategoria-liść, wymagane parametry, ≥ 1 zdjęcie), cena, liczba sztuk, opis ≥ 20 znaków, delivery.shippingRates.id.
publication.status: ACTIVEpublikuje od razu (wymaga GPSR:responsibleProducer+safetyInformation); brak = szkicINACTIVE.- Kategorię wskaż przez
id(Allegro) alboalleeId; gdy podasz oba, wygrywaalleeId. external.id= SKU, unikalne na koncie: drugi POST z tym samym SKU → 409OfferDuplicatez id istniejącej oferty wdetails(bezpieczne ponowienie).- Zdjęcia pobiera allee w tle; do czasu pobrania status
ACTIVATING,allee.imagesPending> 0. - Walidacja zwraca wszystkie błędy naraz (422).
- allee:
?validateOnly=truesprawdza ofertę bez zapisu (200ValidationResult); nagłówekIdempotency-Keychroni przed dublem po zerwanym połączeniu.
Zawsze 201 z pełnym obiektem (allee nie odpowiada 202).
Zgodność: zgodna z Allegro REST API, z rozszerzeniami allee (pola allee.*, alleeId) — POST /sale/product-offers.
Uprawnienie: zakres allegro:api:sale:offers:write.
Grupa limitu: write.
Parametry zapytania
validateOnly booleantrue = tylko walidacja, bez zapisu (rozszerzenie allee).
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
productSet array<object> wymaganeDokładnie 1 element.
Pola obiektu
product object wymaganePola obiektu
name stringTytuł: 10–75 znaków, żadne słowo dłuższe niż 30 znaków.
category objectPola obiektu
id stringId kategorii Allegro.
alleeId integer|stringId allee — gdy podano oba, wygrywa alleeId.
parameters array<OfferParameterInput>Pola obiektu
id stringId parametru Allegro.
alleeId integer|stringId parametru allee.
name stringAlbo nazwa parametru w kategorii (bez względu na wielkość liter).
valuesIds array<string>alleeValuesIds array<integer|string>values array<string|number>Tekst (słownik dopasowywany bez względu na wielkość liter), liczba albo tekst.
rangeValue anyNieobsługiwane → 422 ConstraintViolationException.RangeValueNotSupported.
images array<string · uri | object>1–16 adresów https: lista tekstów albo obiektów {url} (jak w odczycie Allegro).
id stringKarta produktu Allegro — pomijana; samo id bez danych → 422 CATALOG_PRODUCT_NOT_SUPPORTED.
responsibleProducer object · nullPola obiektu
type string wymaganeIDid string · uuid wymaganeresponsiblePerson IdRef · nullPola obiektu
id string wymaganesafetyInformation SafetyInformation · nullPola obiektu
type string wymaganeTEXT, NO_SAFETY_INFORMATION, ATTACHMENTSdescription stringTreść informacji (dla TEXT).
parameters array<OfferParameterInput>Parametry oferty (Stan 11323 — przyjmowany w każdej kategorii).
Pola obiektu
id stringId parametru Allegro.
alleeId integer|stringId parametru allee.
name stringAlbo nazwa parametru w kategorii (bez względu na wielkość liter).
valuesIds array<string>alleeValuesIds array<integer|string>values array<string|number>Tekst (słownik dopasowywany bez względu na wielkość liter), liczba albo tekst.
rangeValue anyNieobsługiwane → 422 ConstraintViolationException.RangeValueNotSupported.
sellingMode objectCena wymagana: 1,00–10 000 000,00 zł.
Pola obiektu
format stringBUY_NOWprice MoneyInputKwota w żądaniu.
Pola obiektu
amount string|number wymaganeKwota jako tekst „123.45” (zalecane) albo liczba.
currency stringWaluta: tylko PLN (domyślnie PLN).
PLNstock objectPola obiektu
available integer|string0–99 999 (przy POST co najmniej 1).
unit stringUNITexternal object · nullPola obiektu
id string|integerSKU (do 100 znaków), unikalne na koncie — dubel → 409 OfferDuplicate.
description OfferDescriptionOpis w sekcjach Allegro. allee zapisuje go jako tekst (znaczniki formatowania, skrypty i style znikają); odczyt zwraca jedną sekcję TEXT z odtworzonym prostym HTML: akapity <p> i <br>, a nagłówek tuż przed listą wraca jako <h2> + <ul><li>. Nie porównuj opisu 1:1 z wysłanym.
Pola obiektu
sections array<object> wymaganePola obiektu
items array<object> wymaganePola obiektu
type string wymaganeTEXT, IMAGEcontent stringHTML (TEXT).
url stringAdres obrazka (IMAGE — pomijany).
publication objectPola obiektu
status stringTylko w POST; brak = INACTIVE (szkic).
ACTIVE, INACTIVEdelivery objectPola obiektu
handlingTime string · nullCzas ISO 8601 do 60 dni, np. PT24H, P3D, PT72H (jak w odczycie Allegro). Zapisywany jako jedna z wartości PT0S, PT24H, P2D, P3D, P4D, P5D, P7D, P10D, P14D, P21D, P30D, P60D; wartość pośrednia — w górę, z ostrzeżeniem w validation.warnings.
shippingRates IdRef · nullTwój cennik — wymagany w POST.
Pola obiektu
id string wymaganeadditionalInfo anyBez skutku.
shipmentDate anyBez skutku.
afterSalesServices objectPola obiektu
returnPolicy IdRef · nullPola obiektu
id string wymaganewarranty IdRef · nullPola obiektu
id string wymaganeimpliedWarranty IdRef · nullPola obiektu
id string wymaganetaxSettings object · nullPola obiektu
rates array<object> wymaganePola obiektu
rate string wymaganeTekst, nie liczba.
0.00, 5.00, 8.00, 23.00countryCode stringpayments objectPola obiektu
invoice string · nullVAT, VAT_MARGIN, WITHOUT_VAT, NO_INVOICE, nulllocation object · nullDo 300 znaków JSON.
images array<string>Alternatywnie zdjęcia na wierzchu.
category objectAlternatywnie kategoria na wierzchu.
Pola obiektu
id stringalleeId integer|stringname stringTytuł oferty (jak Allegro) — w POST i PATCH; ma pierwszeństwo przed productSet[0].product.name.
id anyTylko do odczytu — pomijane.
validation anyTylko do odczytu — pomijane.
warnings anyTylko do odczytu — pomijane.
createdAt anyTylko do odczytu — pomijane.
updatedAt anyTylko do odczytu — pomijane.
aiCoCreatedContent anyTylko do odczytu — pomijane.
allee anyTylko do odczytu — pomijane.
language anyPrzyjmowane bez skutku.
additionalMarketplaces anyBez skutku.
b2b anyBez skutku.
discounts anyBez skutku.
compatibilityList anyBez skutku.
tecdocSpecification anyBez skutku.
contact anyBez skutku.
messageToSellerSettings anyBez skutku.
attachments anyBez skutku.
fundraisingCampaign anyBez skutku.
additionalServices anyBez skutku.
sizeTable anyBez skutku.
promotion anyBez skutku.
Odpowiedzi
200 Wynik validateOnly=true (nic nie zapisano). · ValidationResult
validateOnly boolean zawszeOdpowiedź podglądu — nic nie zapisano.
truestatus string zawszeVALID, INVALIDissues 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).
errors array<Error>Przy INVALID: te same błędy co przy prawdziwym zapisie.
Pola obiektu
code string zawszeKod maszynowy błędu — na nim opieraj obsługę (lista: przewodnik „Błędy”).
message string zawszeOpis dla programisty (po polsku).
details any zawszeDane dodatkowe albo null — np. id istniejącej oferty przy OfferDuplicate, {"current": "SENT"} przy błędzie statusu, {"retryAfterMs": 1200} przy limicie.
path string · null zawszePole żądania, którego dotyczy błąd, np. productSet[0].product.parameters.
userMessage string zawszeKomunikat, który można pokazać sprzedawcy.
201 Utworzono (pełny obiekt; adres oferty: GET /sale/product-offers/{id} z pola id). · ProductOffer
id string zawszeIdentyfikator oferty.
name string zawszeTytuł oferty.
category CategoryRef zawszeKategoria — oba identyfikatory.
Pola obiektu
id string · null zawszeIdentyfikator kategorii Allegro (bywa liczbą, bywa UUID).
alleeId integer zawszeIdentyfikator kategorii allee.
productSet array<object> zawszeZawsze dokładnie 1 element.
Pola obiektu
product object zawszePola obiektu
name string zawszecategory CategoryRef zawszeKategoria — oba identyfikatory.
Pola obiektu
id string · null zawszeIdentyfikator kategorii Allegro (bywa liczbą, bywa UUID).
alleeId integer zawszeIdentyfikator kategorii allee.
parameters array<OfferParameter> zawszeParametry produktu (bez Stanu).
Pola obiektu
id string zawszeIdentyfikator parametru Allegro.
alleeId integer zawszename string zawszevaluesIds array<string> zawszeIdentyfikatory wartości słownika Allegro (puste dla parametrów liczbowych/tekstowych).
alleeValuesIds array<integer>Identyfikatory wartości allee (tylko słownikowe).
values array<string> zawszeWartości tekstowo.
rangeValue any · null zawszeZawsze null (zakresy nieobsługiwane).
images array<string · uri> zawszeZdjęcia po przetworzeniu (cdn.allee.pl, WebP 1200 px).
responsibleProducer object · null zawszeProducent GPSR.
Pola obiektu
type string zawszeIDid string · uuid zawszeresponsiblePerson IdRef · null zawszeOsoba odpowiedzialna GPSR.
Pola obiektu
id string zawszesafetyInformation SafetyInformation · null zawszePola obiektu
type string zawszeTEXT, NO_SAFETY_INFORMATION, ATTACHMENTSdescription stringTreść informacji (dla TEXT).
parameters array<OfferParameter> zawszeParametry oferty — tu jest Stan (11323).
Pola obiektu
id string zawszeIdentyfikator parametru Allegro.
alleeId integer zawszename string zawszevaluesIds array<string> zawszeIdentyfikatory wartości słownika Allegro (puste dla parametrów liczbowych/tekstowych).
alleeValuesIds array<integer>Identyfikatory wartości allee (tylko słownikowe).
values array<string> zawszeWartości tekstowo.
rangeValue any · null zawszeZawsze null (zakresy nieobsługiwane).
sellingMode object zawszePola obiektu
format string zawszeOferty przez API: BUY_NOW (licytacje tylko z panelu).
BUY_NOW, AUCTIONprice Money zawszeKwota (kształt Allegro).
Pola obiektu
amount string zawszeKwota z dwoma miejscami po przecinku, kropka dziesiętna.
currency string zawszeWaluta (allee.pl: tylko PLN).
PLNstock object zawszePola obiektu
available integer zawszeDostępne sztuki (0–99 999).
unit string zawszeUNITpublication object zawszePola obiektu
status PublicationStatus zawszeINACTIVE = szkic, ACTIVATING = czeka na zdjęcia, ACTIVE = widoczna i kupowalna, ENDED = zakończona.
INACTIVE, ACTIVATING, ACTIVE, ENDEDendedBy string · null zawszeKto zakończył (tylko przy ENDED).
USER, EMPTY_STOCK, ADMIN, EXPIRATION, nullexternal object · null zawszePola obiektu
id string zawszeSKU sprzedawcy (unikalne na koncie).
delivery object zawszePola obiektu
handlingTime string · null zawszeCzas wysyłki.
PT0S, PT24H, P2D, P3D, P4D, P5D, P7D, P10D, P14D, P21D, P30D, P60D, nullshippingRates IdRef · null zawszeCennik dostawy.
Pola obiektu
id string zawszeafterSalesServices object zawszePola obiektu
returnPolicy IdRef · null zawszePola obiektu
id string zawszewarranty IdRef · null zawszePola obiektu
id string zawszeimpliedWarranty IdRef · null zawszePola obiektu
id string zawszetaxSettings object · null zawszeStawka VAT.
Pola obiektu
rates array<object> zawszePola obiektu
rate string zawsze0.00, 5.00, 8.00, 23.00countryCode string zawszePLpayments object zawszePola obiektu
invoice string · null zawszeRodzaj dokumentu sprzedaży.
VAT, VAT_MARGIN, WITHOUT_VAT, NO_INVOICE, nullimages array<string · uri> zawszeTo samo co productSet[0].product.images.
description OfferDescription zawszeOpis w sekcjach Allegro. allee zapisuje go jako tekst (znaczniki formatowania, skrypty i style znikają); odczyt zwraca jedną sekcję TEXT z odtworzonym prostym HTML: akapity <p> i <br>, a nagłówek tuż przed listą wraca jako <h2> + <ul><li>. Nie porównuj opisu 1:1 z wysłanym.
Pola obiektu
sections array<object> zawszePola obiektu
items array<object> zawszePola obiektu
type string zawszeTEXT, IMAGEcontent stringHTML (TEXT).
url stringAdres obrazka (IMAGE — pomijany).
location object · null zawszeLokalizacja (zapisana 1:1, zwykle city, countryCode, postCode, province).
validation object zawszePola obiektu
errors array<Error> zawszePrawdziwe problemy oferty, np. nieudane zdjęcia; puste = brak problemów.
Pola obiektu
code string zawszeKod maszynowy błędu — na nim opieraj obsługę (lista: przewodnik „Błędy”).
message string zawszeOpis dla programisty (po polsku).
details any zawszeDane dodatkowe albo null — np. id istniejącej oferty przy OfferDuplicate, {"current": "SENT"} przy błędzie statusu, {"retryAfterMs": 1200} przy limicie.
path string · null zawszePole żądania, którego dotyczy błąd, np. productSet[0].product.parameters.
userMessage string zawszeKomunikat, który można pokazać sprzedawcy.
warnings array<Error> zawszeTylko w odpowiedzi POST/PATCH: co allee dopasowało zamiast odrzucić (np. czas wysyłki zaokrąglony w górę, parametr jednowartościowy obcięty do pierwszej wartości). W GET puste.
Pola obiektu
code string zawszeKod maszynowy błędu — na nim opieraj obsługę (lista: przewodnik „Błędy”).
message string zawszeOpis dla programisty (po polsku).
details any zawszeDane dodatkowe albo null — np. id istniejącej oferty przy OfferDuplicate, {"current": "SENT"} przy błędzie statusu, {"retryAfterMs": 1200} przy limicie.
path string · null zawszePole żądania, którego dotyczy błąd, np. productSet[0].product.parameters.
userMessage string zawszeKomunikat, który można pokazać sprzedawcy.
createdAt string · date-time zawszeupdatedAt string · date-time zawszeallee object zawszeRozszerzenie allee.
Pola obiektu
url string · uri zawszeAdres oferty na allee.pl.
endedReason string · null zawszePowód zakończenia nadany przez allee (np. R2 = 0 sztuk).
imagesPending integer zawszeZdjęcia czekające na pobranie przez allee.
categorySource stringTylko w odpowiedzi POST: która kategoria została użyta.
allegro, allee, allee (podano obie — allee ma pierwszeństwo)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ę). |
| 409 | OfferDuplicate | Oferta z tym external.id (SKU) już istnieje — details = jej id. |
| 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 | ATTACHMENTS_NOT_SUPPORTED | allee nie przyjmuje załączników w wiadomościach. |
| 422 | CATALOG_PRODUCT_NOT_SUPPORTED | Sama karta produktu Allegro bez danych. |
| 422 | CATEGORY_NOT_FOUND | Nie ma takiej kategorii. |
| 422 | CATEGORY_NOT_LEAF | Kategoria nie jest liściem. |
| 422 | ConstraintViolationException.MissingRequiredParameters | Brak wymaganego parametru lub pola (details = id parametru). |
| 422 | ConstraintViolationException.RangeValueNotSupported | rangeValue nieobsługiwane. |
| 422 | ConstraintViolationException.TooManyValues | Kilka wartości przy multipleChoices: false. |
| 422 | DictionaryParameterValueNotFound | Wartość spoza słownika kategorii (albo Stan nieobsługiwany przez allee). |
| 422 | IMAGE_DOWNLOAD_FAILED | Adres zdjęcia niedozwolony albo nie da się go pobrać (path = które zdjęcie). |
| 422 | INVALID_QUANTITY | Liczba sztuk poza zakresem. |
| 422 | JsonMappingException | Treść nie jest poprawnym JSON albo ma zły kształt (np. images jako obiekty). |
| 422 | ParameterCategoryException | Parametr nie należy do kategorii. |
| 422 | RESPONSIBLE_PRODUCER_NOT_SPECIFIED | Publikacja bez producenta GPSR. |
| 422 | SAFETY_INFO_NOT_DEFINED | Publikacja bez informacji o bezpieczeństwie (GPSR). |
| 422 | UnknownJSONProperty | Pole nieznane w tym miejscu (path wskazuje które). |
| 422 | VALIDATION_ERROR | Zła wartość parametru zapytania (400) albo pola treści (422); path wskazuje miejsce. |
| 429 | TOO_MANY_REQUESTS | Przekroczony limit (minutowy, grupy operacji albo IP). |
| 500 | INTERNAL_ERROR | Błąd serwera allee. |
curl -sS -X POST "${ALLEE_API_URL:-https://api.allee.pl}/sale/product-offers" \
-H "Authorization: Bearer $ALLEE_API_KEY" \
-H "Accept: application/vnd.allegro.public.v1+json" \
-H "Idempotency-Key: oferta-FILM-21ef85-1" \
-H "Content-Type: application/vnd.allegro.public.v1+json" \
--data-binary @- \
-w '\nHTTP %{http_code}\n' <<'JSON'
{
"productSet": [
{
"product": {
"name": "Podróż na Księżyc DVD wydanie kolekcjonerskie",
"category": {
"id": "20585"
},
"parameters": [
{
"id": "225693",
"values": [
"5901234123457"
]
},
{
"id": "237218",
"values": [
"Podróż na Księżyc"
]
},
{
"id": "246845",
"valuesIds": [
"246845_622165"
]
},
{
"id": "250077",
"valuesIds": [
"250077_1797493"
]
}
],
"images": [
"https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp"
]
},
"responsibleProducer": {
"type": "ID",
"id": "472bad66-e704-4344-a2d6-9bd85b1f9a5e"
},
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu. Przechowywać z dala od źródeł ciepła."
}
}
],
"parameters": [
{
"id": "11323",
"valuesIds": [
"11323_1"
]
}
],
"sellingMode": {
"format": "BUY_NOW",
"price": {
"amount": "49.90",
"currency": "PLN"
}
},
"stock": {
"available": 10,
"unit": "UNIT"
},
"external": {
"id": "FILM-21ef85-1"
},
"description": {
"sections": [
{
"items": [
{
"type": "TEXT",
"content": "<h2>Opis</h2><p>Film na płycie DVD, wydanie kolekcjonerskie, nowy w folii.</p><ul><li>Region 2</li><li>Język: polski</li></ul>"
}
]
}
]
},
"delivery": {
"handlingTime": "PT24H",
"shippingRates": {
"id": "797d2e65-cb23-4a16-98e9-d6f2a399839a"
}
},
"afterSalesServices": {
"returnPolicy": {
"id": "0d2fcf15-119d-479c-9d97-ba1794013def"
},
"impliedWarranty": {
"id": "d82f8496-f284-4cdf-9575-242222870c5f"
}
},
"taxSettings": {
"rates": [
{
"rate": "23.00",
"countryCode": "PL"
}
]
},
"payments": {
"invoice": "VAT"
},
"location": {
"city": "Warszawa",
"countryCode": "PL",
"postCode": "00-001",
"province": "MAZOWIECKIE"
},
"publication": {
"status": "ACTIVE"
}
}
JSON<?php
// allee API: POST /sale/product-offers (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$body = [
'productSet' => [
[
'product' => [
'name' => 'Podróż na Księżyc DVD wydanie kolekcjonerskie',
'category' => [
'id' => '20585',
],
'parameters' => [
[
'id' => '225693',
'values' => [
'5901234123457',
],
],
[
'id' => '237218',
'values' => [
'Podróż na Księżyc',
],
],
[
'id' => '246845',
'valuesIds' => [
'246845_622165',
],
],
[
'id' => '250077',
'valuesIds' => [
'250077_1797493',
],
],
],
'images' => [
'https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp',
],
],
'responsibleProducer' => [
'type' => 'ID',
'id' => '472bad66-e704-4344-a2d6-9bd85b1f9a5e',
],
'safetyInformation' => [
'type' => 'TEXT',
'description' => 'Produkt bezpieczny w normalnym użytkowaniu. Przechowywać z dala od źródeł ciepła.',
],
],
],
'parameters' => [
[
'id' => '11323',
'valuesIds' => [
'11323_1',
],
],
],
'sellingMode' => [
'format' => 'BUY_NOW',
'price' => [
'amount' => '49.90',
'currency' => 'PLN',
],
],
'stock' => [
'available' => 10,
'unit' => 'UNIT',
],
'external' => [
'id' => 'FILM-21ef85-1',
],
'description' => [
'sections' => [
[
'items' => [
[
'type' => 'TEXT',
'content' => '<h2>Opis</h2><p>Film na płycie DVD, wydanie kolekcjonerskie, nowy w folii.</p><ul><li>Region 2</li><li>Język: polski</li></ul>',
],
],
],
],
],
'delivery' => [
'handlingTime' => 'PT24H',
'shippingRates' => [
'id' => '797d2e65-cb23-4a16-98e9-d6f2a399839a',
],
],
'afterSalesServices' => [
'returnPolicy' => [
'id' => '0d2fcf15-119d-479c-9d97-ba1794013def',
],
'impliedWarranty' => [
'id' => 'd82f8496-f284-4cdf-9575-242222870c5f',
],
],
'taxSettings' => [
'rates' => [
[
'rate' => '23.00',
'countryCode' => 'PL',
],
],
],
'payments' => [
'invoice' => 'VAT',
],
'location' => [
'city' => 'Warszawa',
'countryCode' => 'PL',
'postCode' => '00-001',
'province' => 'MAZOWIECKIE',
],
'publication' => [
'status' => 'ACTIVE',
],
];
$ch = curl_init($base . '/sale/product-offers');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('ALLEE_API_KEY'),
'Accept: application/vnd.allegro.public.v1+json',
'Idempotency-Key: oferta-FILM-21ef85-1',
'Content-Type: application/vnd.allegro.public.v1+json',
],
CURLOPT_POSTFIELDS => json_encode($body, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES),
CURLOPT_RETURNTRANSFER => true,
]);
$odp = curl_exec($ch);
echo 'HTTP ', curl_getinfo($ch, CURLINFO_RESPONSE_CODE), "\n", $odp, "\n";# allee API: POST /sale/product-offers (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",
"Idempotency-Key": "oferta-FILM-21ef85-1",
"Content-Type": "application/vnd.allegro.public.v1+json",
}
body = {
"productSet": [
{
"product": {
"name": "Podróż na Księżyc DVD wydanie kolekcjonerskie",
"category": {
"id": "20585",
},
"parameters": [
{
"id": "225693",
"values": [
"5901234123457",
],
},
{
"id": "237218",
"values": [
"Podróż na Księżyc",
],
},
{
"id": "246845",
"valuesIds": [
"246845_622165",
],
},
{
"id": "250077",
"valuesIds": [
"250077_1797493",
],
},
],
"images": [
"https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp",
],
},
"responsibleProducer": {
"type": "ID",
"id": "472bad66-e704-4344-a2d6-9bd85b1f9a5e",
},
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu. Przechowywać z dala od źródeł ciepła.",
},
},
],
"parameters": [
{
"id": "11323",
"valuesIds": [
"11323_1",
],
},
],
"sellingMode": {
"format": "BUY_NOW",
"price": {
"amount": "49.90",
"currency": "PLN",
},
},
"stock": {
"available": 10,
"unit": "UNIT",
},
"external": {
"id": "FILM-21ef85-1",
},
"description": {
"sections": [
{
"items": [
{
"type": "TEXT",
"content": "<h2>Opis</h2><p>Film na płycie DVD, wydanie kolekcjonerskie, nowy w folii.</p><ul><li>Region 2</li><li>Język: polski</li></ul>",
},
],
},
],
},
"delivery": {
"handlingTime": "PT24H",
"shippingRates": {
"id": "797d2e65-cb23-4a16-98e9-d6f2a399839a",
},
},
"afterSalesServices": {
"returnPolicy": {
"id": "0d2fcf15-119d-479c-9d97-ba1794013def",
},
"impliedWarranty": {
"id": "d82f8496-f284-4cdf-9575-242222870c5f",
},
},
"taxSettings": {
"rates": [
{
"rate": "23.00",
"countryCode": "PL",
},
],
},
"payments": {
"invoice": "VAT",
},
"location": {
"city": "Warszawa",
"countryCode": "PL",
"postCode": "00-001",
"province": "MAZOWIECKIE",
},
"publication": {
"status": "ACTIVE",
},
}
r = requests.request("POST", BASE + "/sale/product-offers", headers=headers, json=body, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: POST /sale/product-offers (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const body = {
"productSet": [
{
"product": {
"name": "Podróż na Księżyc DVD wydanie kolekcjonerskie",
"category": {
"id": "20585"
},
"parameters": [
{
"id": "225693",
"values": [
"5901234123457"
]
},
{
"id": "237218",
"values": [
"Podróż na Księżyc"
]
},
{
"id": "246845",
"valuesIds": [
"246845_622165"
]
},
{
"id": "250077",
"valuesIds": [
"250077_1797493"
]
}
],
"images": [
"https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp"
]
},
"responsibleProducer": {
"type": "ID",
"id": "472bad66-e704-4344-a2d6-9bd85b1f9a5e"
},
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu. Przechowywać z dala od źródeł ciepła."
}
}
],
"parameters": [
{
"id": "11323",
"valuesIds": [
"11323_1"
]
}
],
"sellingMode": {
"format": "BUY_NOW",
"price": {
"amount": "49.90",
"currency": "PLN"
}
},
"stock": {
"available": 10,
"unit": "UNIT"
},
"external": {
"id": "FILM-21ef85-1"
},
"description": {
"sections": [
{
"items": [
{
"type": "TEXT",
"content": "<h2>Opis</h2><p>Film na płycie DVD, wydanie kolekcjonerskie, nowy w folii.</p><ul><li>Region 2</li><li>Język: polski</li></ul>"
}
]
}
]
},
"delivery": {
"handlingTime": "PT24H",
"shippingRates": {
"id": "797d2e65-cb23-4a16-98e9-d6f2a399839a"
}
},
"afterSalesServices": {
"returnPolicy": {
"id": "0d2fcf15-119d-479c-9d97-ba1794013def"
},
"impliedWarranty": {
"id": "d82f8496-f284-4cdf-9575-242222870c5f"
}
},
"taxSettings": {
"rates": [
{
"rate": "23.00",
"countryCode": "PL"
}
]
},
"payments": {
"invoice": "VAT"
},
"location": {
"city": "Warszawa",
"countryCode": "PL",
"postCode": "00-001",
"province": "MAZOWIECKIE"
},
"publication": {
"status": "ACTIVE"
}
};
const res = await fetch(`${BASE}/sale/product-offers`, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.ALLEE_API_KEY}`,
"Accept": "application/vnd.allegro.public.v1+json",
"Idempotency-Key": "oferta-FILM-21ef85-1",
"Content-Type": "application/vnd.allegro.public.v1+json",
},
body: JSON.stringify(body),
redirect: "manual",
});
console.log("HTTP", res.status);
console.log(await res.text());// allee API: POST /sale/product-offers (C#, .NET 8+, HttpClient)
using System.Net.Http.Headers;
using System.Text;
var baseUrl = Environment.GetEnvironmentVariable("ALLEE_API_URL") ?? "https://api.allee.pl";
using var http = new HttpClient(new HttpClientHandler { AllowAutoRedirect = false });
using var req = new HttpRequestMessage(new HttpMethod("POST"), baseUrl + "/sale/product-offers");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALLEE_API_KEY"));
req.Headers.Accept.ParseAdd("application/vnd.allegro.public.v1+json");
req.Headers.Add("Idempotency-Key", "oferta-FILM-21ef85-1");
var json = """
{
"productSet": [
{
"product": {
"name": "Podróż na Księżyc DVD wydanie kolekcjonerskie",
"category": {
"id": "20585"
},
"parameters": [
{
"id": "225693",
"values": [
"5901234123457"
]
},
{
"id": "237218",
"values": [
"Podróż na Księżyc"
]
},
{
"id": "246845",
"valuesIds": [
"246845_622165"
]
},
{
"id": "250077",
"valuesIds": [
"250077_1797493"
]
}
],
"images": [
"https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp"
]
},
"responsibleProducer": {
"type": "ID",
"id": "472bad66-e704-4344-a2d6-9bd85b1f9a5e"
},
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu. Przechowywać z dala od źródeł ciepła."
}
}
],
"parameters": [
{
"id": "11323",
"valuesIds": [
"11323_1"
]
}
],
"sellingMode": {
"format": "BUY_NOW",
"price": {
"amount": "49.90",
"currency": "PLN"
}
},
"stock": {
"available": 10,
"unit": "UNIT"
},
"external": {
"id": "FILM-21ef85-1"
},
"description": {
"sections": [
{
"items": [
{
"type": "TEXT",
"content": "<h2>Opis</h2><p>Film na płycie DVD, wydanie kolekcjonerskie, nowy w folii.</p><ul><li>Region 2</li><li>Język: polski</li></ul>"
}
]
}
]
},
"delivery": {
"handlingTime": "PT24H",
"shippingRates": {
"id": "797d2e65-cb23-4a16-98e9-d6f2a399839a"
}
},
"afterSalesServices": {
"returnPolicy": {
"id": "0d2fcf15-119d-479c-9d97-ba1794013def"
},
"impliedWarranty": {
"id": "d82f8496-f284-4cdf-9575-242222870c5f"
}
},
"taxSettings": {
"rates": [
{
"rate": "23.00",
"countryCode": "PL"
}
]
},
"payments": {
"invoice": "VAT"
},
"location": {
"city": "Warszawa",
"countryCode": "PL",
"postCode": "00-001",
"province": "MAZOWIECKIE"
},
"publication": {
"status": "ACTIVE"
}
}
""";
req.Content = new StringContent(json, Encoding.UTF8);
req.Content.Headers.ContentType = new MediaTypeHeaderValue("application/vnd.allegro.public.v1+json");
using var res = await http.SendAsync(req);
Console.WriteLine($"HTTP {(int)res.StatusCode}");
Console.WriteLine(await res.Content.ReadAsStringAsync());// allee API: POST /sale/product-offers (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 = """
{
"productSet": [
{
"product": {
"name": "Podróż na Księżyc DVD wydanie kolekcjonerskie",
"category": {
"id": "20585"
},
"parameters": [
{
"id": "225693",
"values": [
"5901234123457"
]
},
{
"id": "237218",
"values": [
"Podróż na Księżyc"
]
},
{
"id": "246845",
"valuesIds": [
"246845_622165"
]
},
{
"id": "250077",
"valuesIds": [
"250077_1797493"
]
}
],
"images": [
"https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp"
]
},
"responsibleProducer": {
"type": "ID",
"id": "472bad66-e704-4344-a2d6-9bd85b1f9a5e"
},
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu. Przechowywać z dala od źródeł ciepła."
}
}
],
"parameters": [
{
"id": "11323",
"valuesIds": [
"11323_1"
]
}
],
"sellingMode": {
"format": "BUY_NOW",
"price": {
"amount": "49.90",
"currency": "PLN"
}
},
"stock": {
"available": 10,
"unit": "UNIT"
},
"external": {
"id": "FILM-21ef85-1"
},
"description": {
"sections": [
{
"items": [
{
"type": "TEXT",
"content": "<h2>Opis</h2><p>Film na płycie DVD, wydanie kolekcjonerskie, nowy w folii.</p><ul><li>Region 2</li><li>Język: polski</li></ul>"
}
]
}
]
},
"delivery": {
"handlingTime": "PT24H",
"shippingRates": {
"id": "797d2e65-cb23-4a16-98e9-d6f2a399839a"
}
},
"afterSalesServices": {
"returnPolicy": {
"id": "0d2fcf15-119d-479c-9d97-ba1794013def"
},
"impliedWarranty": {
"id": "d82f8496-f284-4cdf-9575-242222870c5f"
}
},
"taxSettings": {
"rates": [
{
"rate": "23.00",
"countryCode": "PL"
}
]
},
"payments": {
"invoice": "VAT"
},
"location": {
"city": "Warszawa",
"countryCode": "PL",
"postCode": "00-001",
"province": "MAZOWIECKIE"
},
"publication": {
"status": "ACTIVE"
}
}
""";
HttpRequest req = HttpRequest.newBuilder(URI.create(base + "/sale/product-offers"))
.header("Authorization", "Bearer " + System.getenv("ALLEE_API_KEY"))
.header("Accept", "application/vnd.allegro.public.v1+json")
.header("Idempotency-Key", "oferta-FILM-21ef85-1")
.header("Content-Type", "application/vnd.allegro.public.v1+json")
.method("POST", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpClient http = HttpClient.newBuilder().version(HttpClient.Version.HTTP_1_1).build();
HttpResponse<String> res = http.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println("HTTP " + res.statusCode());
System.out.println(res.body());
}
}// allee API: POST /sale/product-offers (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 := `{
"productSet": [
{
"product": {
"name": "Podróż na Księżyc DVD wydanie kolekcjonerskie",
"category": {
"id": "20585"
},
"parameters": [
{
"id": "225693",
"values": [
"5901234123457"
]
},
{
"id": "237218",
"values": [
"Podróż na Księżyc"
]
},
{
"id": "246845",
"valuesIds": [
"246845_622165"
]
},
{
"id": "250077",
"valuesIds": [
"250077_1797493"
]
}
],
"images": [
"https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp"
]
},
"responsibleProducer": {
"type": "ID",
"id": "472bad66-e704-4344-a2d6-9bd85b1f9a5e"
},
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu. Przechowywać z dala od źródeł ciepła."
}
}
],
"parameters": [
{
"id": "11323",
"valuesIds": [
"11323_1"
]
}
],
"sellingMode": {
"format": "BUY_NOW",
"price": {
"amount": "49.90",
"currency": "PLN"
}
},
"stock": {
"available": 10,
"unit": "UNIT"
},
"external": {
"id": "FILM-21ef85-1"
},
"description": {
"sections": [
{
"items": [
{
"type": "TEXT",
"content": "<h2>Opis</h2><p>Film na płycie DVD, wydanie kolekcjonerskie, nowy w folii.</p><ul><li>Region 2</li><li>Język: polski</li></ul>"
}
]
}
]
},
"delivery": {
"handlingTime": "PT24H",
"shippingRates": {
"id": "797d2e65-cb23-4a16-98e9-d6f2a399839a"
}
},
"afterSalesServices": {
"returnPolicy": {
"id": "0d2fcf15-119d-479c-9d97-ba1794013def"
},
"impliedWarranty": {
"id": "d82f8496-f284-4cdf-9575-242222870c5f"
}
},
"taxSettings": {
"rates": [
{
"rate": "23.00",
"countryCode": "PL"
}
]
},
"payments": {
"invoice": "VAT"
},
"location": {
"city": "Warszawa",
"countryCode": "PL",
"postCode": "00-001",
"province": "MAZOWIECKIE"
},
"publication": {
"status": "ACTIVE"
}
}`
req, err := http.NewRequest("POST", base+"/sale/product-offers", 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("Idempotency-Key", "oferta-FILM-21ef85-1")
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": "900000000000021",
"name": "Podróż na Księżyc DVD wydanie kolekcjonerskie",
"category": {
"id": "20585",
"alleeId": 35
},
"productSet": [
{
"product": {
"name": "Podróż na Księżyc DVD wydanie kolekcjonerskie",
"category": {
"id": "20585",
"alleeId": 35
},
"parameters": [
{
"id": "246845",
"alleeId": 8973,
"name": "Nośnik",
"valuesIds": [
"246845_622165"
],
"alleeValuesIds": [
79216
],
"values": [
"płyta DVD"
],
"rangeValue": null
},
{
"id": "250077",
"alleeId": 10923,
"name": "Gatunek",
"valuesIds": [
"250077_1797493"
],
"alleeValuesIds": [
258674
],
"values": [
"anime"
],
"rangeValue": null
},
{
"id": "225693",
"alleeId": 5967,
"name": "EAN (GTIN)",
"valuesIds": [],
"values": [
"5901234123457"
],
"rangeValue": null
},
{
"id": "237218",
"alleeId": 7939,
"name": "Tytuł",
"valuesIds": [],
"values": [
"Podróż na Księżyc"
],
"rangeValue": null
}
],
"images": [
"https://cdn.allee.pl/img/sandbox/9a16623650ab051ba0d7-1200.webp"
]
},
"responsibleProducer": {
"type": "ID",
"id": "472bad66-e704-4344-a2d6-9bd85b1f9a5e"
},
"responsiblePerson": null,
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu. Przechowywać z dala od źródeł ciepła."
}
}
],
"parameters": [
{
"id": "11323",
"alleeId": 669,
"name": "Stan",
"valuesIds": [
"11323_1"
],
"alleeValuesIds": [
6386
],
"values": [
"Nowy"
],
"rangeValue": null
}
],
"sellingMode": {
"format": "BUY_NOW",
"price": {
"amount": "49.90",
"currency": "PLN"
}
},
"stock": {
"available": 10,
"unit": "UNIT"
},
"publication": {
"status": "ACTIVE",
"endedBy": null
},
"external": {
"id": "FILM-21ef85-1"
},
"delivery": {
"handlingTime": "PT24H",
"shippingRates": {
"id": "797d2e65-cb23-4a16-98e9-d6f2a399839a"
}
},
"afterSalesServices": {
"returnPolicy": {
"id": "0d2fcf15-119d-479c-9d97-ba1794013def"
},
"warranty": null,
"impliedWarranty": {
"id": "d82f8496-f284-4cdf-9575-242222870c5f"
}
},
"taxSettings": {
"rates": [
{
"rate": "23.00",
"countryCode": "PL"
}
]
},
"payments": {
"invoice": "VAT"
},
"images": [
"https://cdn.allee.pl/img/sandbox/9a16623650ab051ba0d7-1200.webp"
],
"description": {
"sections": [
{
"items": [
{
"type": "TEXT",
"content": "<p>Opis</p><p>Film na płycie DVD, wydanie kolekcjonerskie, nowy w folii.</p><p>• Region 2<br>• Język: polski</p>"
}
]
}
]
},
"location": {
"city": "Warszawa",
"countryCode": "PL",
"postCode": "00-001",
"province": "MAZOWIECKIE"
},
"validation": {
"errors": [],
"warnings": []
},
"createdAt": "2026-11-10T11:10:03.000Z",
"updatedAt": "2026-11-10T11:10:03.000Z",
"allee": {
"url": "https://allee.pl/oferta/podroz-na-ksiezyc-dvd-wydanie-kolekcjonerskie-900000000000021",
"endedReason": null,
"imagesPending": 0,
"categorySource": "allegro"
}
}Przykład: Sprawdzenie oferty bez zapisu (validateOnly=true)
curl -sS -X POST "${ALLEE_API_URL:-https://api.allee.pl}/sale/product-offers?validateOnly=true" \
-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'
{
"productSet": [
{
"product": {
"name": "Podróż na Księżyc DVD wydanie kolekcjonerskie",
"category": {
"id": "20585"
},
"parameters": [
{
"id": "225693",
"values": [
"5901234123457"
]
},
{
"id": "237218",
"values": [
"Podróż na Księżyc"
]
},
{
"id": "246845",
"valuesIds": [
"246845_622165"
]
},
{
"id": "250077",
"valuesIds": [
"250077_1797493"
]
}
],
"images": [
"https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp"
]
},
"responsibleProducer": {
"type": "ID",
"id": "472bad66-e704-4344-a2d6-9bd85b1f9a5e"
},
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu. Przechowywać z dala od źródeł ciepła."
}
}
],
"parameters": [
{
"id": "11323",
"valuesIds": [
"11323_1"
]
}
],
"sellingMode": {
"format": "BUY_NOW",
"price": {
"amount": "49.90",
"currency": "PLN"
}
},
"stock": {
"available": 10,
"unit": "UNIT"
},
"external": {
"id": "FILM-21ef85-1"
},
"description": {
"sections": [
{
"items": [
{
"type": "TEXT",
"content": "<h2>Opis</h2><p>Film na płycie DVD, wydanie kolekcjonerskie, nowy w folii.</p><ul><li>Region 2</li><li>Język: polski</li></ul>"
}
]
}
]
},
"delivery": {
"handlingTime": "PT24H",
"shippingRates": {
"id": "797d2e65-cb23-4a16-98e9-d6f2a399839a"
}
},
"afterSalesServices": {
"returnPolicy": {
"id": "0d2fcf15-119d-479c-9d97-ba1794013def"
},
"impliedWarranty": {
"id": "d82f8496-f284-4cdf-9575-242222870c5f"
}
},
"taxSettings": {
"rates": [
{
"rate": "23.00",
"countryCode": "PL"
}
]
},
"payments": {
"invoice": "VAT"
},
"location": {
"city": "Warszawa",
"countryCode": "PL",
"postCode": "00-001",
"province": "MAZOWIECKIE"
},
"publication": {
"status": "ACTIVE"
}
}
JSON<?php
// allee API: POST /sale/product-offers (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$body = [
'productSet' => [
[
'product' => [
'name' => 'Podróż na Księżyc DVD wydanie kolekcjonerskie',
'category' => [
'id' => '20585',
],
'parameters' => [
[
'id' => '225693',
'values' => [
'5901234123457',
],
],
[
'id' => '237218',
'values' => [
'Podróż na Księżyc',
],
],
[
'id' => '246845',
'valuesIds' => [
'246845_622165',
],
],
[
'id' => '250077',
'valuesIds' => [
'250077_1797493',
],
],
],
'images' => [
'https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp',
],
],
'responsibleProducer' => [
'type' => 'ID',
'id' => '472bad66-e704-4344-a2d6-9bd85b1f9a5e',
],
'safetyInformation' => [
'type' => 'TEXT',
'description' => 'Produkt bezpieczny w normalnym użytkowaniu. Przechowywać z dala od źródeł ciepła.',
],
],
],
'parameters' => [
[
'id' => '11323',
'valuesIds' => [
'11323_1',
],
],
],
'sellingMode' => [
'format' => 'BUY_NOW',
'price' => [
'amount' => '49.90',
'currency' => 'PLN',
],
],
'stock' => [
'available' => 10,
'unit' => 'UNIT',
],
'external' => [
'id' => 'FILM-21ef85-1',
],
'description' => [
'sections' => [
[
'items' => [
[
'type' => 'TEXT',
'content' => '<h2>Opis</h2><p>Film na płycie DVD, wydanie kolekcjonerskie, nowy w folii.</p><ul><li>Region 2</li><li>Język: polski</li></ul>',
],
],
],
],
],
'delivery' => [
'handlingTime' => 'PT24H',
'shippingRates' => [
'id' => '797d2e65-cb23-4a16-98e9-d6f2a399839a',
],
],
'afterSalesServices' => [
'returnPolicy' => [
'id' => '0d2fcf15-119d-479c-9d97-ba1794013def',
],
'impliedWarranty' => [
'id' => 'd82f8496-f284-4cdf-9575-242222870c5f',
],
],
'taxSettings' => [
'rates' => [
[
'rate' => '23.00',
'countryCode' => 'PL',
],
],
],
'payments' => [
'invoice' => 'VAT',
],
'location' => [
'city' => 'Warszawa',
'countryCode' => 'PL',
'postCode' => '00-001',
'province' => 'MAZOWIECKIE',
],
'publication' => [
'status' => 'ACTIVE',
],
];
$ch = curl_init($base . '/sale/product-offers?validateOnly=true');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('ALLEE_API_KEY'),
'Accept: application/vnd.allegro.public.v1+json',
'Content-Type: application/vnd.allegro.public.v1+json',
],
CURLOPT_POSTFIELDS => json_encode($body, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES),
CURLOPT_RETURNTRANSFER => true,
]);
$odp = curl_exec($ch);
echo 'HTTP ', curl_getinfo($ch, CURLINFO_RESPONSE_CODE), "\n", $odp, "\n";# allee API: POST /sale/product-offers (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 = {
"productSet": [
{
"product": {
"name": "Podróż na Księżyc DVD wydanie kolekcjonerskie",
"category": {
"id": "20585",
},
"parameters": [
{
"id": "225693",
"values": [
"5901234123457",
],
},
{
"id": "237218",
"values": [
"Podróż na Księżyc",
],
},
{
"id": "246845",
"valuesIds": [
"246845_622165",
],
},
{
"id": "250077",
"valuesIds": [
"250077_1797493",
],
},
],
"images": [
"https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp",
],
},
"responsibleProducer": {
"type": "ID",
"id": "472bad66-e704-4344-a2d6-9bd85b1f9a5e",
},
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu. Przechowywać z dala od źródeł ciepła.",
},
},
],
"parameters": [
{
"id": "11323",
"valuesIds": [
"11323_1",
],
},
],
"sellingMode": {
"format": "BUY_NOW",
"price": {
"amount": "49.90",
"currency": "PLN",
},
},
"stock": {
"available": 10,
"unit": "UNIT",
},
"external": {
"id": "FILM-21ef85-1",
},
"description": {
"sections": [
{
"items": [
{
"type": "TEXT",
"content": "<h2>Opis</h2><p>Film na płycie DVD, wydanie kolekcjonerskie, nowy w folii.</p><ul><li>Region 2</li><li>Język: polski</li></ul>",
},
],
},
],
},
"delivery": {
"handlingTime": "PT24H",
"shippingRates": {
"id": "797d2e65-cb23-4a16-98e9-d6f2a399839a",
},
},
"afterSalesServices": {
"returnPolicy": {
"id": "0d2fcf15-119d-479c-9d97-ba1794013def",
},
"impliedWarranty": {
"id": "d82f8496-f284-4cdf-9575-242222870c5f",
},
},
"taxSettings": {
"rates": [
{
"rate": "23.00",
"countryCode": "PL",
},
],
},
"payments": {
"invoice": "VAT",
},
"location": {
"city": "Warszawa",
"countryCode": "PL",
"postCode": "00-001",
"province": "MAZOWIECKIE",
},
"publication": {
"status": "ACTIVE",
},
}
r = requests.request("POST", BASE + "/sale/product-offers?validateOnly=true", headers=headers, json=body, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: POST /sale/product-offers (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const body = {
"productSet": [
{
"product": {
"name": "Podróż na Księżyc DVD wydanie kolekcjonerskie",
"category": {
"id": "20585"
},
"parameters": [
{
"id": "225693",
"values": [
"5901234123457"
]
},
{
"id": "237218",
"values": [
"Podróż na Księżyc"
]
},
{
"id": "246845",
"valuesIds": [
"246845_622165"
]
},
{
"id": "250077",
"valuesIds": [
"250077_1797493"
]
}
],
"images": [
"https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp"
]
},
"responsibleProducer": {
"type": "ID",
"id": "472bad66-e704-4344-a2d6-9bd85b1f9a5e"
},
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu. Przechowywać z dala od źródeł ciepła."
}
}
],
"parameters": [
{
"id": "11323",
"valuesIds": [
"11323_1"
]
}
],
"sellingMode": {
"format": "BUY_NOW",
"price": {
"amount": "49.90",
"currency": "PLN"
}
},
"stock": {
"available": 10,
"unit": "UNIT"
},
"external": {
"id": "FILM-21ef85-1"
},
"description": {
"sections": [
{
"items": [
{
"type": "TEXT",
"content": "<h2>Opis</h2><p>Film na płycie DVD, wydanie kolekcjonerskie, nowy w folii.</p><ul><li>Region 2</li><li>Język: polski</li></ul>"
}
]
}
]
},
"delivery": {
"handlingTime": "PT24H",
"shippingRates": {
"id": "797d2e65-cb23-4a16-98e9-d6f2a399839a"
}
},
"afterSalesServices": {
"returnPolicy": {
"id": "0d2fcf15-119d-479c-9d97-ba1794013def"
},
"impliedWarranty": {
"id": "d82f8496-f284-4cdf-9575-242222870c5f"
}
},
"taxSettings": {
"rates": [
{
"rate": "23.00",
"countryCode": "PL"
}
]
},
"payments": {
"invoice": "VAT"
},
"location": {
"city": "Warszawa",
"countryCode": "PL",
"postCode": "00-001",
"province": "MAZOWIECKIE"
},
"publication": {
"status": "ACTIVE"
}
};
const res = await fetch(`${BASE}/sale/product-offers?validateOnly=true`, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.ALLEE_API_KEY}`,
"Accept": "application/vnd.allegro.public.v1+json",
"Content-Type": "application/vnd.allegro.public.v1+json",
},
body: JSON.stringify(body),
redirect: "manual",
});
console.log("HTTP", res.status);
console.log(await res.text());// allee API: POST /sale/product-offers (C#, .NET 8+, HttpClient)
using System.Net.Http.Headers;
using System.Text;
var baseUrl = Environment.GetEnvironmentVariable("ALLEE_API_URL") ?? "https://api.allee.pl";
using var http = new HttpClient(new HttpClientHandler { AllowAutoRedirect = false });
using var req = new HttpRequestMessage(new HttpMethod("POST"), baseUrl + "/sale/product-offers?validateOnly=true");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALLEE_API_KEY"));
req.Headers.Accept.ParseAdd("application/vnd.allegro.public.v1+json");
var json = """
{
"productSet": [
{
"product": {
"name": "Podróż na Księżyc DVD wydanie kolekcjonerskie",
"category": {
"id": "20585"
},
"parameters": [
{
"id": "225693",
"values": [
"5901234123457"
]
},
{
"id": "237218",
"values": [
"Podróż na Księżyc"
]
},
{
"id": "246845",
"valuesIds": [
"246845_622165"
]
},
{
"id": "250077",
"valuesIds": [
"250077_1797493"
]
}
],
"images": [
"https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp"
]
},
"responsibleProducer": {
"type": "ID",
"id": "472bad66-e704-4344-a2d6-9bd85b1f9a5e"
},
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu. Przechowywać z dala od źródeł ciepła."
}
}
],
"parameters": [
{
"id": "11323",
"valuesIds": [
"11323_1"
]
}
],
"sellingMode": {
"format": "BUY_NOW",
"price": {
"amount": "49.90",
"currency": "PLN"
}
},
"stock": {
"available": 10,
"unit": "UNIT"
},
"external": {
"id": "FILM-21ef85-1"
},
"description": {
"sections": [
{
"items": [
{
"type": "TEXT",
"content": "<h2>Opis</h2><p>Film na płycie DVD, wydanie kolekcjonerskie, nowy w folii.</p><ul><li>Region 2</li><li>Język: polski</li></ul>"
}
]
}
]
},
"delivery": {
"handlingTime": "PT24H",
"shippingRates": {
"id": "797d2e65-cb23-4a16-98e9-d6f2a399839a"
}
},
"afterSalesServices": {
"returnPolicy": {
"id": "0d2fcf15-119d-479c-9d97-ba1794013def"
},
"impliedWarranty": {
"id": "d82f8496-f284-4cdf-9575-242222870c5f"
}
},
"taxSettings": {
"rates": [
{
"rate": "23.00",
"countryCode": "PL"
}
]
},
"payments": {
"invoice": "VAT"
},
"location": {
"city": "Warszawa",
"countryCode": "PL",
"postCode": "00-001",
"province": "MAZOWIECKIE"
},
"publication": {
"status": "ACTIVE"
}
}
""";
req.Content = new StringContent(json, Encoding.UTF8);
req.Content.Headers.ContentType = new MediaTypeHeaderValue("application/vnd.allegro.public.v1+json");
using var res = await http.SendAsync(req);
Console.WriteLine($"HTTP {(int)res.StatusCode}");
Console.WriteLine(await res.Content.ReadAsStringAsync());// allee API: POST /sale/product-offers (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 = """
{
"productSet": [
{
"product": {
"name": "Podróż na Księżyc DVD wydanie kolekcjonerskie",
"category": {
"id": "20585"
},
"parameters": [
{
"id": "225693",
"values": [
"5901234123457"
]
},
{
"id": "237218",
"values": [
"Podróż na Księżyc"
]
},
{
"id": "246845",
"valuesIds": [
"246845_622165"
]
},
{
"id": "250077",
"valuesIds": [
"250077_1797493"
]
}
],
"images": [
"https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp"
]
},
"responsibleProducer": {
"type": "ID",
"id": "472bad66-e704-4344-a2d6-9bd85b1f9a5e"
},
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu. Przechowywać z dala od źródeł ciepła."
}
}
],
"parameters": [
{
"id": "11323",
"valuesIds": [
"11323_1"
]
}
],
"sellingMode": {
"format": "BUY_NOW",
"price": {
"amount": "49.90",
"currency": "PLN"
}
},
"stock": {
"available": 10,
"unit": "UNIT"
},
"external": {
"id": "FILM-21ef85-1"
},
"description": {
"sections": [
{
"items": [
{
"type": "TEXT",
"content": "<h2>Opis</h2><p>Film na płycie DVD, wydanie kolekcjonerskie, nowy w folii.</p><ul><li>Region 2</li><li>Język: polski</li></ul>"
}
]
}
]
},
"delivery": {
"handlingTime": "PT24H",
"shippingRates": {
"id": "797d2e65-cb23-4a16-98e9-d6f2a399839a"
}
},
"afterSalesServices": {
"returnPolicy": {
"id": "0d2fcf15-119d-479c-9d97-ba1794013def"
},
"impliedWarranty": {
"id": "d82f8496-f284-4cdf-9575-242222870c5f"
}
},
"taxSettings": {
"rates": [
{
"rate": "23.00",
"countryCode": "PL"
}
]
},
"payments": {
"invoice": "VAT"
},
"location": {
"city": "Warszawa",
"countryCode": "PL",
"postCode": "00-001",
"province": "MAZOWIECKIE"
},
"publication": {
"status": "ACTIVE"
}
}
""";
HttpRequest req = HttpRequest.newBuilder(URI.create(base + "/sale/product-offers?validateOnly=true"))
.header("Authorization", "Bearer " + System.getenv("ALLEE_API_KEY"))
.header("Accept", "application/vnd.allegro.public.v1+json")
.header("Content-Type", "application/vnd.allegro.public.v1+json")
.method("POST", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpClient http = HttpClient.newBuilder().version(HttpClient.Version.HTTP_1_1).build();
HttpResponse<String> res = http.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println("HTTP " + res.statusCode());
System.out.println(res.body());
}
}// allee API: POST /sale/product-offers (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 := `{
"productSet": [
{
"product": {
"name": "Podróż na Księżyc DVD wydanie kolekcjonerskie",
"category": {
"id": "20585"
},
"parameters": [
{
"id": "225693",
"values": [
"5901234123457"
]
},
{
"id": "237218",
"values": [
"Podróż na Księżyc"
]
},
{
"id": "246845",
"valuesIds": [
"246845_622165"
]
},
{
"id": "250077",
"valuesIds": [
"250077_1797493"
]
}
],
"images": [
"https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp"
]
},
"responsibleProducer": {
"type": "ID",
"id": "472bad66-e704-4344-a2d6-9bd85b1f9a5e"
},
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu. Przechowywać z dala od źródeł ciepła."
}
}
],
"parameters": [
{
"id": "11323",
"valuesIds": [
"11323_1"
]
}
],
"sellingMode": {
"format": "BUY_NOW",
"price": {
"amount": "49.90",
"currency": "PLN"
}
},
"stock": {
"available": 10,
"unit": "UNIT"
},
"external": {
"id": "FILM-21ef85-1"
},
"description": {
"sections": [
{
"items": [
{
"type": "TEXT",
"content": "<h2>Opis</h2><p>Film na płycie DVD, wydanie kolekcjonerskie, nowy w folii.</p><ul><li>Region 2</li><li>Język: polski</li></ul>"
}
]
}
]
},
"delivery": {
"handlingTime": "PT24H",
"shippingRates": {
"id": "797d2e65-cb23-4a16-98e9-d6f2a399839a"
}
},
"afterSalesServices": {
"returnPolicy": {
"id": "0d2fcf15-119d-479c-9d97-ba1794013def"
},
"impliedWarranty": {
"id": "d82f8496-f284-4cdf-9575-242222870c5f"
}
},
"taxSettings": {
"rates": [
{
"rate": "23.00",
"countryCode": "PL"
}
]
},
"payments": {
"invoice": "VAT"
},
"location": {
"city": "Warszawa",
"countryCode": "PL",
"postCode": "00-001",
"province": "MAZOWIECKIE"
},
"publication": {
"status": "ACTIVE"
}
}`
req, err := http.NewRequest("POST", base+"/sale/product-offers?validateOnly=true", 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{
"validateOnly": true,
"status": "VALID",
"issues": []
}Przykład: Szkic oferty (INACTIVE)
curl -sS -X POST "${ALLEE_API_URL:-https://api.allee.pl}/sale/product-offers" \
-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'
{
"productSet": [
{
"product": {
"name": "Metropolis DVD wydanie odrestaurowane",
"category": {
"id": "20585"
},
"parameters": [
{
"id": "225693",
"values": [
"5901234123457"
]
},
{
"id": "237218",
"values": [
"Podróż na Księżyc"
]
},
{
"id": "246845",
"valuesIds": [
"246845_622165"
]
},
{
"id": "250077",
"valuesIds": [
"250077_1797493"
]
}
],
"images": [
"https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp"
]
},
"responsibleProducer": {
"type": "ID",
"id": "472bad66-e704-4344-a2d6-9bd85b1f9a5e"
},
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu. Przechowywać z dala od źródeł ciepła."
}
}
],
"parameters": [
{
"id": "11323",
"valuesIds": [
"11323_1"
]
}
],
"sellingMode": {
"format": "BUY_NOW",
"price": {
"amount": "49.90",
"currency": "PLN"
}
},
"stock": {
"available": 10,
"unit": "UNIT"
},
"external": {
"id": "FILM-21ef85-2"
},
"description": {
"sections": [
{
"items": [
{
"type": "TEXT",
"content": "<h2>Opis</h2><p>Film na płycie DVD, wydanie kolekcjonerskie, nowy w folii.</p><ul><li>Region 2</li><li>Język: polski</li></ul>"
}
]
}
]
},
"delivery": {
"handlingTime": "PT24H",
"shippingRates": {
"id": "797d2e65-cb23-4a16-98e9-d6f2a399839a"
}
},
"afterSalesServices": {
"returnPolicy": {
"id": "0d2fcf15-119d-479c-9d97-ba1794013def"
},
"impliedWarranty": {
"id": "d82f8496-f284-4cdf-9575-242222870c5f"
}
},
"taxSettings": {
"rates": [
{
"rate": "23.00",
"countryCode": "PL"
}
]
},
"payments": {
"invoice": "VAT"
},
"location": {
"city": "Warszawa",
"countryCode": "PL",
"postCode": "00-001",
"province": "MAZOWIECKIE"
},
"publication": {
"status": "INACTIVE"
}
}
JSON<?php
// allee API: POST /sale/product-offers (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$body = [
'productSet' => [
[
'product' => [
'name' => 'Metropolis DVD wydanie odrestaurowane',
'category' => [
'id' => '20585',
],
'parameters' => [
[
'id' => '225693',
'values' => [
'5901234123457',
],
],
[
'id' => '237218',
'values' => [
'Podróż na Księżyc',
],
],
[
'id' => '246845',
'valuesIds' => [
'246845_622165',
],
],
[
'id' => '250077',
'valuesIds' => [
'250077_1797493',
],
],
],
'images' => [
'https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp',
],
],
'responsibleProducer' => [
'type' => 'ID',
'id' => '472bad66-e704-4344-a2d6-9bd85b1f9a5e',
],
'safetyInformation' => [
'type' => 'TEXT',
'description' => 'Produkt bezpieczny w normalnym użytkowaniu. Przechowywać z dala od źródeł ciepła.',
],
],
],
'parameters' => [
[
'id' => '11323',
'valuesIds' => [
'11323_1',
],
],
],
'sellingMode' => [
'format' => 'BUY_NOW',
'price' => [
'amount' => '49.90',
'currency' => 'PLN',
],
],
'stock' => [
'available' => 10,
'unit' => 'UNIT',
],
'external' => [
'id' => 'FILM-21ef85-2',
],
'description' => [
'sections' => [
[
'items' => [
[
'type' => 'TEXT',
'content' => '<h2>Opis</h2><p>Film na płycie DVD, wydanie kolekcjonerskie, nowy w folii.</p><ul><li>Region 2</li><li>Język: polski</li></ul>',
],
],
],
],
],
'delivery' => [
'handlingTime' => 'PT24H',
'shippingRates' => [
'id' => '797d2e65-cb23-4a16-98e9-d6f2a399839a',
],
],
'afterSalesServices' => [
'returnPolicy' => [
'id' => '0d2fcf15-119d-479c-9d97-ba1794013def',
],
'impliedWarranty' => [
'id' => 'd82f8496-f284-4cdf-9575-242222870c5f',
],
],
'taxSettings' => [
'rates' => [
[
'rate' => '23.00',
'countryCode' => 'PL',
],
],
],
'payments' => [
'invoice' => 'VAT',
],
'location' => [
'city' => 'Warszawa',
'countryCode' => 'PL',
'postCode' => '00-001',
'province' => 'MAZOWIECKIE',
],
'publication' => [
'status' => 'INACTIVE',
],
];
$ch = curl_init($base . '/sale/product-offers');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('ALLEE_API_KEY'),
'Accept: application/vnd.allegro.public.v1+json',
'Content-Type: application/vnd.allegro.public.v1+json',
],
CURLOPT_POSTFIELDS => json_encode($body, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES),
CURLOPT_RETURNTRANSFER => true,
]);
$odp = curl_exec($ch);
echo 'HTTP ', curl_getinfo($ch, CURLINFO_RESPONSE_CODE), "\n", $odp, "\n";# allee API: POST /sale/product-offers (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 = {
"productSet": [
{
"product": {
"name": "Metropolis DVD wydanie odrestaurowane",
"category": {
"id": "20585",
},
"parameters": [
{
"id": "225693",
"values": [
"5901234123457",
],
},
{
"id": "237218",
"values": [
"Podróż na Księżyc",
],
},
{
"id": "246845",
"valuesIds": [
"246845_622165",
],
},
{
"id": "250077",
"valuesIds": [
"250077_1797493",
],
},
],
"images": [
"https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp",
],
},
"responsibleProducer": {
"type": "ID",
"id": "472bad66-e704-4344-a2d6-9bd85b1f9a5e",
},
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu. Przechowywać z dala od źródeł ciepła.",
},
},
],
"parameters": [
{
"id": "11323",
"valuesIds": [
"11323_1",
],
},
],
"sellingMode": {
"format": "BUY_NOW",
"price": {
"amount": "49.90",
"currency": "PLN",
},
},
"stock": {
"available": 10,
"unit": "UNIT",
},
"external": {
"id": "FILM-21ef85-2",
},
"description": {
"sections": [
{
"items": [
{
"type": "TEXT",
"content": "<h2>Opis</h2><p>Film na płycie DVD, wydanie kolekcjonerskie, nowy w folii.</p><ul><li>Region 2</li><li>Język: polski</li></ul>",
},
],
},
],
},
"delivery": {
"handlingTime": "PT24H",
"shippingRates": {
"id": "797d2e65-cb23-4a16-98e9-d6f2a399839a",
},
},
"afterSalesServices": {
"returnPolicy": {
"id": "0d2fcf15-119d-479c-9d97-ba1794013def",
},
"impliedWarranty": {
"id": "d82f8496-f284-4cdf-9575-242222870c5f",
},
},
"taxSettings": {
"rates": [
{
"rate": "23.00",
"countryCode": "PL",
},
],
},
"payments": {
"invoice": "VAT",
},
"location": {
"city": "Warszawa",
"countryCode": "PL",
"postCode": "00-001",
"province": "MAZOWIECKIE",
},
"publication": {
"status": "INACTIVE",
},
}
r = requests.request("POST", BASE + "/sale/product-offers", headers=headers, json=body, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: POST /sale/product-offers (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const body = {
"productSet": [
{
"product": {
"name": "Metropolis DVD wydanie odrestaurowane",
"category": {
"id": "20585"
},
"parameters": [
{
"id": "225693",
"values": [
"5901234123457"
]
},
{
"id": "237218",
"values": [
"Podróż na Księżyc"
]
},
{
"id": "246845",
"valuesIds": [
"246845_622165"
]
},
{
"id": "250077",
"valuesIds": [
"250077_1797493"
]
}
],
"images": [
"https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp"
]
},
"responsibleProducer": {
"type": "ID",
"id": "472bad66-e704-4344-a2d6-9bd85b1f9a5e"
},
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu. Przechowywać z dala od źródeł ciepła."
}
}
],
"parameters": [
{
"id": "11323",
"valuesIds": [
"11323_1"
]
}
],
"sellingMode": {
"format": "BUY_NOW",
"price": {
"amount": "49.90",
"currency": "PLN"
}
},
"stock": {
"available": 10,
"unit": "UNIT"
},
"external": {
"id": "FILM-21ef85-2"
},
"description": {
"sections": [
{
"items": [
{
"type": "TEXT",
"content": "<h2>Opis</h2><p>Film na płycie DVD, wydanie kolekcjonerskie, nowy w folii.</p><ul><li>Region 2</li><li>Język: polski</li></ul>"
}
]
}
]
},
"delivery": {
"handlingTime": "PT24H",
"shippingRates": {
"id": "797d2e65-cb23-4a16-98e9-d6f2a399839a"
}
},
"afterSalesServices": {
"returnPolicy": {
"id": "0d2fcf15-119d-479c-9d97-ba1794013def"
},
"impliedWarranty": {
"id": "d82f8496-f284-4cdf-9575-242222870c5f"
}
},
"taxSettings": {
"rates": [
{
"rate": "23.00",
"countryCode": "PL"
}
]
},
"payments": {
"invoice": "VAT"
},
"location": {
"city": "Warszawa",
"countryCode": "PL",
"postCode": "00-001",
"province": "MAZOWIECKIE"
},
"publication": {
"status": "INACTIVE"
}
};
const res = await fetch(`${BASE}/sale/product-offers`, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.ALLEE_API_KEY}`,
"Accept": "application/vnd.allegro.public.v1+json",
"Content-Type": "application/vnd.allegro.public.v1+json",
},
body: JSON.stringify(body),
redirect: "manual",
});
console.log("HTTP", res.status);
console.log(await res.text());// allee API: POST /sale/product-offers (C#, .NET 8+, HttpClient)
using System.Net.Http.Headers;
using System.Text;
var baseUrl = Environment.GetEnvironmentVariable("ALLEE_API_URL") ?? "https://api.allee.pl";
using var http = new HttpClient(new HttpClientHandler { AllowAutoRedirect = false });
using var req = new HttpRequestMessage(new HttpMethod("POST"), baseUrl + "/sale/product-offers");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALLEE_API_KEY"));
req.Headers.Accept.ParseAdd("application/vnd.allegro.public.v1+json");
var json = """
{
"productSet": [
{
"product": {
"name": "Metropolis DVD wydanie odrestaurowane",
"category": {
"id": "20585"
},
"parameters": [
{
"id": "225693",
"values": [
"5901234123457"
]
},
{
"id": "237218",
"values": [
"Podróż na Księżyc"
]
},
{
"id": "246845",
"valuesIds": [
"246845_622165"
]
},
{
"id": "250077",
"valuesIds": [
"250077_1797493"
]
}
],
"images": [
"https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp"
]
},
"responsibleProducer": {
"type": "ID",
"id": "472bad66-e704-4344-a2d6-9bd85b1f9a5e"
},
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu. Przechowywać z dala od źródeł ciepła."
}
}
],
"parameters": [
{
"id": "11323",
"valuesIds": [
"11323_1"
]
}
],
"sellingMode": {
"format": "BUY_NOW",
"price": {
"amount": "49.90",
"currency": "PLN"
}
},
"stock": {
"available": 10,
"unit": "UNIT"
},
"external": {
"id": "FILM-21ef85-2"
},
"description": {
"sections": [
{
"items": [
{
"type": "TEXT",
"content": "<h2>Opis</h2><p>Film na płycie DVD, wydanie kolekcjonerskie, nowy w folii.</p><ul><li>Region 2</li><li>Język: polski</li></ul>"
}
]
}
]
},
"delivery": {
"handlingTime": "PT24H",
"shippingRates": {
"id": "797d2e65-cb23-4a16-98e9-d6f2a399839a"
}
},
"afterSalesServices": {
"returnPolicy": {
"id": "0d2fcf15-119d-479c-9d97-ba1794013def"
},
"impliedWarranty": {
"id": "d82f8496-f284-4cdf-9575-242222870c5f"
}
},
"taxSettings": {
"rates": [
{
"rate": "23.00",
"countryCode": "PL"
}
]
},
"payments": {
"invoice": "VAT"
},
"location": {
"city": "Warszawa",
"countryCode": "PL",
"postCode": "00-001",
"province": "MAZOWIECKIE"
},
"publication": {
"status": "INACTIVE"
}
}
""";
req.Content = new StringContent(json, Encoding.UTF8);
req.Content.Headers.ContentType = new MediaTypeHeaderValue("application/vnd.allegro.public.v1+json");
using var res = await http.SendAsync(req);
Console.WriteLine($"HTTP {(int)res.StatusCode}");
Console.WriteLine(await res.Content.ReadAsStringAsync());// allee API: POST /sale/product-offers (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 = """
{
"productSet": [
{
"product": {
"name": "Metropolis DVD wydanie odrestaurowane",
"category": {
"id": "20585"
},
"parameters": [
{
"id": "225693",
"values": [
"5901234123457"
]
},
{
"id": "237218",
"values": [
"Podróż na Księżyc"
]
},
{
"id": "246845",
"valuesIds": [
"246845_622165"
]
},
{
"id": "250077",
"valuesIds": [
"250077_1797493"
]
}
],
"images": [
"https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp"
]
},
"responsibleProducer": {
"type": "ID",
"id": "472bad66-e704-4344-a2d6-9bd85b1f9a5e"
},
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu. Przechowywać z dala od źródeł ciepła."
}
}
],
"parameters": [
{
"id": "11323",
"valuesIds": [
"11323_1"
]
}
],
"sellingMode": {
"format": "BUY_NOW",
"price": {
"amount": "49.90",
"currency": "PLN"
}
},
"stock": {
"available": 10,
"unit": "UNIT"
},
"external": {
"id": "FILM-21ef85-2"
},
"description": {
"sections": [
{
"items": [
{
"type": "TEXT",
"content": "<h2>Opis</h2><p>Film na płycie DVD, wydanie kolekcjonerskie, nowy w folii.</p><ul><li>Region 2</li><li>Język: polski</li></ul>"
}
]
}
]
},
"delivery": {
"handlingTime": "PT24H",
"shippingRates": {
"id": "797d2e65-cb23-4a16-98e9-d6f2a399839a"
}
},
"afterSalesServices": {
"returnPolicy": {
"id": "0d2fcf15-119d-479c-9d97-ba1794013def"
},
"impliedWarranty": {
"id": "d82f8496-f284-4cdf-9575-242222870c5f"
}
},
"taxSettings": {
"rates": [
{
"rate": "23.00",
"countryCode": "PL"
}
]
},
"payments": {
"invoice": "VAT"
},
"location": {
"city": "Warszawa",
"countryCode": "PL",
"postCode": "00-001",
"province": "MAZOWIECKIE"
},
"publication": {
"status": "INACTIVE"
}
}
""";
HttpRequest req = HttpRequest.newBuilder(URI.create(base + "/sale/product-offers"))
.header("Authorization", "Bearer " + System.getenv("ALLEE_API_KEY"))
.header("Accept", "application/vnd.allegro.public.v1+json")
.header("Content-Type", "application/vnd.allegro.public.v1+json")
.method("POST", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpClient http = HttpClient.newBuilder().version(HttpClient.Version.HTTP_1_1).build();
HttpResponse<String> res = http.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println("HTTP " + res.statusCode());
System.out.println(res.body());
}
}// allee API: POST /sale/product-offers (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 := `{
"productSet": [
{
"product": {
"name": "Metropolis DVD wydanie odrestaurowane",
"category": {
"id": "20585"
},
"parameters": [
{
"id": "225693",
"values": [
"5901234123457"
]
},
{
"id": "237218",
"values": [
"Podróż na Księżyc"
]
},
{
"id": "246845",
"valuesIds": [
"246845_622165"
]
},
{
"id": "250077",
"valuesIds": [
"250077_1797493"
]
}
],
"images": [
"https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp"
]
},
"responsibleProducer": {
"type": "ID",
"id": "472bad66-e704-4344-a2d6-9bd85b1f9a5e"
},
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu. Przechowywać z dala od źródeł ciepła."
}
}
],
"parameters": [
{
"id": "11323",
"valuesIds": [
"11323_1"
]
}
],
"sellingMode": {
"format": "BUY_NOW",
"price": {
"amount": "49.90",
"currency": "PLN"
}
},
"stock": {
"available": 10,
"unit": "UNIT"
},
"external": {
"id": "FILM-21ef85-2"
},
"description": {
"sections": [
{
"items": [
{
"type": "TEXT",
"content": "<h2>Opis</h2><p>Film na płycie DVD, wydanie kolekcjonerskie, nowy w folii.</p><ul><li>Region 2</li><li>Język: polski</li></ul>"
}
]
}
]
},
"delivery": {
"handlingTime": "PT24H",
"shippingRates": {
"id": "797d2e65-cb23-4a16-98e9-d6f2a399839a"
}
},
"afterSalesServices": {
"returnPolicy": {
"id": "0d2fcf15-119d-479c-9d97-ba1794013def"
},
"impliedWarranty": {
"id": "d82f8496-f284-4cdf-9575-242222870c5f"
}
},
"taxSettings": {
"rates": [
{
"rate": "23.00",
"countryCode": "PL"
}
]
},
"payments": {
"invoice": "VAT"
},
"location": {
"city": "Warszawa",
"countryCode": "PL",
"postCode": "00-001",
"province": "MAZOWIECKIE"
},
"publication": {
"status": "INACTIVE"
}
}`
req, err := http.NewRequest("POST", base+"/sale/product-offers", 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": "900000000000022",
"name": "Metropolis DVD wydanie odrestaurowane",
"category": {
"id": "20585",
"alleeId": 35
},
"productSet": [
{
"product": {
"name": "Metropolis DVD wydanie odrestaurowane",
"category": {
"id": "20585",
"alleeId": 35
},
"parameters": [
{
"id": "246845",
"alleeId": 8973,
"name": "Nośnik",
"valuesIds": [
"246845_622165"
],
"alleeValuesIds": [
79216
],
"values": [
"płyta DVD"
],
"rangeValue": null
},
{
"id": "250077",
"alleeId": 10923,
"name": "Gatunek",
"valuesIds": [
"250077_1797493"
],
"alleeValuesIds": [
258674
],
"values": [
"anime"
],
"rangeValue": null
},
{
"id": "225693",
"alleeId": 5967,
"name": "EAN (GTIN)",
"valuesIds": [],
"values": [
"5901234123457"
],
"rangeValue": null
},
{
"id": "237218",
"alleeId": 7939,
"name": "Tytuł",
"valuesIds": [],
"values": [
"Podróż na Księżyc"
],
"rangeValue": null
}
],
"images": [
"https://cdn.allee.pl/img/sandbox/9a16623650ab051ba0d7-1200.webp"
]
},
"responsibleProducer": {
"type": "ID",
"id": "472bad66-e704-4344-a2d6-9bd85b1f9a5e"
},
"responsiblePerson": null,
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu. Przechowywać z dala od źródeł ciepła."
}
}
],
"parameters": [
{
"id": "11323",
"alleeId": 669,
"name": "Stan",
"valuesIds": [
"11323_1"
],
"alleeValuesIds": [
6386
],
"values": [
"Nowy"
],
"rangeValue": null
}
],
"sellingMode": {
"format": "BUY_NOW",
"price": {
"amount": "49.90",
"currency": "PLN"
}
},
"stock": {
"available": 10,
"unit": "UNIT"
},
"publication": {
"status": "INACTIVE",
"endedBy": null
},
"external": {
"id": "FILM-21ef85-2"
},
"delivery": {
"handlingTime": "PT24H",
"shippingRates": {
"id": "797d2e65-cb23-4a16-98e9-d6f2a399839a"
}
},
"afterSalesServices": {
"returnPolicy": {
"id": "0d2fcf15-119d-479c-9d97-ba1794013def"
},
"warranty": null,
"impliedWarranty": {
"id": "d82f8496-f284-4cdf-9575-242222870c5f"
}
},
"taxSettings": {
"rates": [
{
"rate": "23.00",
"countryCode": "PL"
}
]
},
"payments": {
"invoice": "VAT"
},
"images": [
"https://cdn.allee.pl/img/sandbox/9a16623650ab051ba0d7-1200.webp"
],
"description": {
"sections": [
{
"items": [
{
"type": "TEXT",
"content": "<p>Opis</p><p>Film na płycie DVD, wydanie kolekcjonerskie, nowy w folii.</p><p>• Region 2<br>• Język: polski</p>"
}
]
}
]
},
"location": {
"city": "Warszawa",
"countryCode": "PL",
"postCode": "00-001",
"province": "MAZOWIECKIE"
},
"validation": {
"errors": [],
"warnings": []
},
"createdAt": "2026-11-10T11:10:04.000Z",
"updatedAt": "2026-11-10T11:10:04.000Z",
"allee": {
"url": "https://allee.pl/oferta/metropolis-dvd-wydanie-odrestaurowane-900000000000022",
"endedReason": null,
"imagesPending": 0,
"categorySource": "allegro"
}
}Przykład: Druga oferta tego samego filmu (wariant)
curl -sS -X POST "${ALLEE_API_URL:-https://api.allee.pl}/sale/product-offers" \
-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'
{
"productSet": [
{
"product": {
"name": "Podróż na Księżyc Blu-ray wydanie kolekcjonerskie",
"category": {
"id": "20585"
},
"parameters": [
{
"id": "225693",
"values": [
"5901234123457"
]
},
{
"id": "237218",
"values": [
"Podróż na Księżyc"
]
},
{
"id": "246845",
"valuesIds": [
"246845_622165"
]
},
{
"id": "250077",
"valuesIds": [
"250077_1797493"
]
}
],
"images": [
"https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp"
]
},
"responsibleProducer": {
"type": "ID",
"id": "472bad66-e704-4344-a2d6-9bd85b1f9a5e"
},
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu. Przechowywać z dala od źródeł ciepła."
}
}
],
"parameters": [
{
"id": "11323",
"valuesIds": [
"11323_1"
]
}
],
"sellingMode": {
"format": "BUY_NOW",
"price": {
"amount": "49.90",
"currency": "PLN"
}
},
"stock": {
"available": 10,
"unit": "UNIT"
},
"external": {
"id": "FILM-21ef85-WAR"
},
"description": {
"sections": [
{
"items": [
{
"type": "TEXT",
"content": "<h2>Opis</h2><p>Film na płycie DVD, wydanie kolekcjonerskie, nowy w folii.</p><ul><li>Region 2</li><li>Język: polski</li></ul>"
}
]
}
]
},
"delivery": {
"handlingTime": "PT24H",
"shippingRates": {
"id": "797d2e65-cb23-4a16-98e9-d6f2a399839a"
}
},
"afterSalesServices": {
"returnPolicy": {
"id": "0d2fcf15-119d-479c-9d97-ba1794013def"
},
"impliedWarranty": {
"id": "d82f8496-f284-4cdf-9575-242222870c5f"
}
},
"taxSettings": {
"rates": [
{
"rate": "23.00",
"countryCode": "PL"
}
]
},
"payments": {
"invoice": "VAT"
},
"location": {
"city": "Warszawa",
"countryCode": "PL",
"postCode": "00-001",
"province": "MAZOWIECKIE"
},
"publication": {
"status": "ACTIVE"
}
}
JSON<?php
// allee API: POST /sale/product-offers (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$body = [
'productSet' => [
[
'product' => [
'name' => 'Podróż na Księżyc Blu-ray wydanie kolekcjonerskie',
'category' => [
'id' => '20585',
],
'parameters' => [
[
'id' => '225693',
'values' => [
'5901234123457',
],
],
[
'id' => '237218',
'values' => [
'Podróż na Księżyc',
],
],
[
'id' => '246845',
'valuesIds' => [
'246845_622165',
],
],
[
'id' => '250077',
'valuesIds' => [
'250077_1797493',
],
],
],
'images' => [
'https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp',
],
],
'responsibleProducer' => [
'type' => 'ID',
'id' => '472bad66-e704-4344-a2d6-9bd85b1f9a5e',
],
'safetyInformation' => [
'type' => 'TEXT',
'description' => 'Produkt bezpieczny w normalnym użytkowaniu. Przechowywać z dala od źródeł ciepła.',
],
],
],
'parameters' => [
[
'id' => '11323',
'valuesIds' => [
'11323_1',
],
],
],
'sellingMode' => [
'format' => 'BUY_NOW',
'price' => [
'amount' => '49.90',
'currency' => 'PLN',
],
],
'stock' => [
'available' => 10,
'unit' => 'UNIT',
],
'external' => [
'id' => 'FILM-21ef85-WAR',
],
'description' => [
'sections' => [
[
'items' => [
[
'type' => 'TEXT',
'content' => '<h2>Opis</h2><p>Film na płycie DVD, wydanie kolekcjonerskie, nowy w folii.</p><ul><li>Region 2</li><li>Język: polski</li></ul>',
],
],
],
],
],
'delivery' => [
'handlingTime' => 'PT24H',
'shippingRates' => [
'id' => '797d2e65-cb23-4a16-98e9-d6f2a399839a',
],
],
'afterSalesServices' => [
'returnPolicy' => [
'id' => '0d2fcf15-119d-479c-9d97-ba1794013def',
],
'impliedWarranty' => [
'id' => 'd82f8496-f284-4cdf-9575-242222870c5f',
],
],
'taxSettings' => [
'rates' => [
[
'rate' => '23.00',
'countryCode' => 'PL',
],
],
],
'payments' => [
'invoice' => 'VAT',
],
'location' => [
'city' => 'Warszawa',
'countryCode' => 'PL',
'postCode' => '00-001',
'province' => 'MAZOWIECKIE',
],
'publication' => [
'status' => 'ACTIVE',
],
];
$ch = curl_init($base . '/sale/product-offers');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('ALLEE_API_KEY'),
'Accept: application/vnd.allegro.public.v1+json',
'Content-Type: application/vnd.allegro.public.v1+json',
],
CURLOPT_POSTFIELDS => json_encode($body, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES),
CURLOPT_RETURNTRANSFER => true,
]);
$odp = curl_exec($ch);
echo 'HTTP ', curl_getinfo($ch, CURLINFO_RESPONSE_CODE), "\n", $odp, "\n";# allee API: POST /sale/product-offers (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 = {
"productSet": [
{
"product": {
"name": "Podróż na Księżyc Blu-ray wydanie kolekcjonerskie",
"category": {
"id": "20585",
},
"parameters": [
{
"id": "225693",
"values": [
"5901234123457",
],
},
{
"id": "237218",
"values": [
"Podróż na Księżyc",
],
},
{
"id": "246845",
"valuesIds": [
"246845_622165",
],
},
{
"id": "250077",
"valuesIds": [
"250077_1797493",
],
},
],
"images": [
"https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp",
],
},
"responsibleProducer": {
"type": "ID",
"id": "472bad66-e704-4344-a2d6-9bd85b1f9a5e",
},
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu. Przechowywać z dala od źródeł ciepła.",
},
},
],
"parameters": [
{
"id": "11323",
"valuesIds": [
"11323_1",
],
},
],
"sellingMode": {
"format": "BUY_NOW",
"price": {
"amount": "49.90",
"currency": "PLN",
},
},
"stock": {
"available": 10,
"unit": "UNIT",
},
"external": {
"id": "FILM-21ef85-WAR",
},
"description": {
"sections": [
{
"items": [
{
"type": "TEXT",
"content": "<h2>Opis</h2><p>Film na płycie DVD, wydanie kolekcjonerskie, nowy w folii.</p><ul><li>Region 2</li><li>Język: polski</li></ul>",
},
],
},
],
},
"delivery": {
"handlingTime": "PT24H",
"shippingRates": {
"id": "797d2e65-cb23-4a16-98e9-d6f2a399839a",
},
},
"afterSalesServices": {
"returnPolicy": {
"id": "0d2fcf15-119d-479c-9d97-ba1794013def",
},
"impliedWarranty": {
"id": "d82f8496-f284-4cdf-9575-242222870c5f",
},
},
"taxSettings": {
"rates": [
{
"rate": "23.00",
"countryCode": "PL",
},
],
},
"payments": {
"invoice": "VAT",
},
"location": {
"city": "Warszawa",
"countryCode": "PL",
"postCode": "00-001",
"province": "MAZOWIECKIE",
},
"publication": {
"status": "ACTIVE",
},
}
r = requests.request("POST", BASE + "/sale/product-offers", headers=headers, json=body, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: POST /sale/product-offers (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const body = {
"productSet": [
{
"product": {
"name": "Podróż na Księżyc Blu-ray wydanie kolekcjonerskie",
"category": {
"id": "20585"
},
"parameters": [
{
"id": "225693",
"values": [
"5901234123457"
]
},
{
"id": "237218",
"values": [
"Podróż na Księżyc"
]
},
{
"id": "246845",
"valuesIds": [
"246845_622165"
]
},
{
"id": "250077",
"valuesIds": [
"250077_1797493"
]
}
],
"images": [
"https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp"
]
},
"responsibleProducer": {
"type": "ID",
"id": "472bad66-e704-4344-a2d6-9bd85b1f9a5e"
},
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu. Przechowywać z dala od źródeł ciepła."
}
}
],
"parameters": [
{
"id": "11323",
"valuesIds": [
"11323_1"
]
}
],
"sellingMode": {
"format": "BUY_NOW",
"price": {
"amount": "49.90",
"currency": "PLN"
}
},
"stock": {
"available": 10,
"unit": "UNIT"
},
"external": {
"id": "FILM-21ef85-WAR"
},
"description": {
"sections": [
{
"items": [
{
"type": "TEXT",
"content": "<h2>Opis</h2><p>Film na płycie DVD, wydanie kolekcjonerskie, nowy w folii.</p><ul><li>Region 2</li><li>Język: polski</li></ul>"
}
]
}
]
},
"delivery": {
"handlingTime": "PT24H",
"shippingRates": {
"id": "797d2e65-cb23-4a16-98e9-d6f2a399839a"
}
},
"afterSalesServices": {
"returnPolicy": {
"id": "0d2fcf15-119d-479c-9d97-ba1794013def"
},
"impliedWarranty": {
"id": "d82f8496-f284-4cdf-9575-242222870c5f"
}
},
"taxSettings": {
"rates": [
{
"rate": "23.00",
"countryCode": "PL"
}
]
},
"payments": {
"invoice": "VAT"
},
"location": {
"city": "Warszawa",
"countryCode": "PL",
"postCode": "00-001",
"province": "MAZOWIECKIE"
},
"publication": {
"status": "ACTIVE"
}
};
const res = await fetch(`${BASE}/sale/product-offers`, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.ALLEE_API_KEY}`,
"Accept": "application/vnd.allegro.public.v1+json",
"Content-Type": "application/vnd.allegro.public.v1+json",
},
body: JSON.stringify(body),
redirect: "manual",
});
console.log("HTTP", res.status);
console.log(await res.text());// allee API: POST /sale/product-offers (C#, .NET 8+, HttpClient)
using System.Net.Http.Headers;
using System.Text;
var baseUrl = Environment.GetEnvironmentVariable("ALLEE_API_URL") ?? "https://api.allee.pl";
using var http = new HttpClient(new HttpClientHandler { AllowAutoRedirect = false });
using var req = new HttpRequestMessage(new HttpMethod("POST"), baseUrl + "/sale/product-offers");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALLEE_API_KEY"));
req.Headers.Accept.ParseAdd("application/vnd.allegro.public.v1+json");
var json = """
{
"productSet": [
{
"product": {
"name": "Podróż na Księżyc Blu-ray wydanie kolekcjonerskie",
"category": {
"id": "20585"
},
"parameters": [
{
"id": "225693",
"values": [
"5901234123457"
]
},
{
"id": "237218",
"values": [
"Podróż na Księżyc"
]
},
{
"id": "246845",
"valuesIds": [
"246845_622165"
]
},
{
"id": "250077",
"valuesIds": [
"250077_1797493"
]
}
],
"images": [
"https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp"
]
},
"responsibleProducer": {
"type": "ID",
"id": "472bad66-e704-4344-a2d6-9bd85b1f9a5e"
},
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu. Przechowywać z dala od źródeł ciepła."
}
}
],
"parameters": [
{
"id": "11323",
"valuesIds": [
"11323_1"
]
}
],
"sellingMode": {
"format": "BUY_NOW",
"price": {
"amount": "49.90",
"currency": "PLN"
}
},
"stock": {
"available": 10,
"unit": "UNIT"
},
"external": {
"id": "FILM-21ef85-WAR"
},
"description": {
"sections": [
{
"items": [
{
"type": "TEXT",
"content": "<h2>Opis</h2><p>Film na płycie DVD, wydanie kolekcjonerskie, nowy w folii.</p><ul><li>Region 2</li><li>Język: polski</li></ul>"
}
]
}
]
},
"delivery": {
"handlingTime": "PT24H",
"shippingRates": {
"id": "797d2e65-cb23-4a16-98e9-d6f2a399839a"
}
},
"afterSalesServices": {
"returnPolicy": {
"id": "0d2fcf15-119d-479c-9d97-ba1794013def"
},
"impliedWarranty": {
"id": "d82f8496-f284-4cdf-9575-242222870c5f"
}
},
"taxSettings": {
"rates": [
{
"rate": "23.00",
"countryCode": "PL"
}
]
},
"payments": {
"invoice": "VAT"
},
"location": {
"city": "Warszawa",
"countryCode": "PL",
"postCode": "00-001",
"province": "MAZOWIECKIE"
},
"publication": {
"status": "ACTIVE"
}
}
""";
req.Content = new StringContent(json, Encoding.UTF8);
req.Content.Headers.ContentType = new MediaTypeHeaderValue("application/vnd.allegro.public.v1+json");
using var res = await http.SendAsync(req);
Console.WriteLine($"HTTP {(int)res.StatusCode}");
Console.WriteLine(await res.Content.ReadAsStringAsync());// allee API: POST /sale/product-offers (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 = """
{
"productSet": [
{
"product": {
"name": "Podróż na Księżyc Blu-ray wydanie kolekcjonerskie",
"category": {
"id": "20585"
},
"parameters": [
{
"id": "225693",
"values": [
"5901234123457"
]
},
{
"id": "237218",
"values": [
"Podróż na Księżyc"
]
},
{
"id": "246845",
"valuesIds": [
"246845_622165"
]
},
{
"id": "250077",
"valuesIds": [
"250077_1797493"
]
}
],
"images": [
"https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp"
]
},
"responsibleProducer": {
"type": "ID",
"id": "472bad66-e704-4344-a2d6-9bd85b1f9a5e"
},
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu. Przechowywać z dala od źródeł ciepła."
}
}
],
"parameters": [
{
"id": "11323",
"valuesIds": [
"11323_1"
]
}
],
"sellingMode": {
"format": "BUY_NOW",
"price": {
"amount": "49.90",
"currency": "PLN"
}
},
"stock": {
"available": 10,
"unit": "UNIT"
},
"external": {
"id": "FILM-21ef85-WAR"
},
"description": {
"sections": [
{
"items": [
{
"type": "TEXT",
"content": "<h2>Opis</h2><p>Film na płycie DVD, wydanie kolekcjonerskie, nowy w folii.</p><ul><li>Region 2</li><li>Język: polski</li></ul>"
}
]
}
]
},
"delivery": {
"handlingTime": "PT24H",
"shippingRates": {
"id": "797d2e65-cb23-4a16-98e9-d6f2a399839a"
}
},
"afterSalesServices": {
"returnPolicy": {
"id": "0d2fcf15-119d-479c-9d97-ba1794013def"
},
"impliedWarranty": {
"id": "d82f8496-f284-4cdf-9575-242222870c5f"
}
},
"taxSettings": {
"rates": [
{
"rate": "23.00",
"countryCode": "PL"
}
]
},
"payments": {
"invoice": "VAT"
},
"location": {
"city": "Warszawa",
"countryCode": "PL",
"postCode": "00-001",
"province": "MAZOWIECKIE"
},
"publication": {
"status": "ACTIVE"
}
}
""";
HttpRequest req = HttpRequest.newBuilder(URI.create(base + "/sale/product-offers"))
.header("Authorization", "Bearer " + System.getenv("ALLEE_API_KEY"))
.header("Accept", "application/vnd.allegro.public.v1+json")
.header("Content-Type", "application/vnd.allegro.public.v1+json")
.method("POST", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpClient http = HttpClient.newBuilder().version(HttpClient.Version.HTTP_1_1).build();
HttpResponse<String> res = http.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println("HTTP " + res.statusCode());
System.out.println(res.body());
}
}// allee API: POST /sale/product-offers (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 := `{
"productSet": [
{
"product": {
"name": "Podróż na Księżyc Blu-ray wydanie kolekcjonerskie",
"category": {
"id": "20585"
},
"parameters": [
{
"id": "225693",
"values": [
"5901234123457"
]
},
{
"id": "237218",
"values": [
"Podróż na Księżyc"
]
},
{
"id": "246845",
"valuesIds": [
"246845_622165"
]
},
{
"id": "250077",
"valuesIds": [
"250077_1797493"
]
}
],
"images": [
"https://cdn.allee.pl/img/a/webe/1930/10001318-0-1200.webp"
]
},
"responsibleProducer": {
"type": "ID",
"id": "472bad66-e704-4344-a2d6-9bd85b1f9a5e"
},
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu. Przechowywać z dala od źródeł ciepła."
}
}
],
"parameters": [
{
"id": "11323",
"valuesIds": [
"11323_1"
]
}
],
"sellingMode": {
"format": "BUY_NOW",
"price": {
"amount": "49.90",
"currency": "PLN"
}
},
"stock": {
"available": 10,
"unit": "UNIT"
},
"external": {
"id": "FILM-21ef85-WAR"
},
"description": {
"sections": [
{
"items": [
{
"type": "TEXT",
"content": "<h2>Opis</h2><p>Film na płycie DVD, wydanie kolekcjonerskie, nowy w folii.</p><ul><li>Region 2</li><li>Język: polski</li></ul>"
}
]
}
]
},
"delivery": {
"handlingTime": "PT24H",
"shippingRates": {
"id": "797d2e65-cb23-4a16-98e9-d6f2a399839a"
}
},
"afterSalesServices": {
"returnPolicy": {
"id": "0d2fcf15-119d-479c-9d97-ba1794013def"
},
"impliedWarranty": {
"id": "d82f8496-f284-4cdf-9575-242222870c5f"
}
},
"taxSettings": {
"rates": [
{
"rate": "23.00",
"countryCode": "PL"
}
]
},
"payments": {
"invoice": "VAT"
},
"location": {
"city": "Warszawa",
"countryCode": "PL",
"postCode": "00-001",
"province": "MAZOWIECKIE"
},
"publication": {
"status": "ACTIVE"
}
}`
req, err := http.NewRequest("POST", base+"/sale/product-offers", 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": "900000000000023",
"name": "Podróż na Księżyc Blu-ray wydanie kolekcjonerskie",
"category": {
"id": "20585",
"alleeId": 35
},
"productSet": [
{
"product": {
"name": "Podróż na Księżyc Blu-ray wydanie kolekcjonerskie",
"category": {
"id": "20585",
"alleeId": 35
},
"parameters": [
{
"id": "246845",
"alleeId": 8973,
"name": "Nośnik",
"valuesIds": [
"246845_622165"
],
"alleeValuesIds": [
79216
],
"values": [
"płyta DVD"
],
"rangeValue": null
},
{
"id": "250077",
"alleeId": 10923,
"name": "Gatunek",
"valuesIds": [
"250077_1797493"
],
"alleeValuesIds": [
258674
],
"values": [
"anime"
],
"rangeValue": null
},
{
"id": "225693",
"alleeId": 5967,
"name": "EAN (GTIN)",
"valuesIds": [],
"values": [
"5901234123457"
],
"rangeValue": null
},
{
"id": "237218",
"alleeId": 7939,
"name": "Tytuł",
"valuesIds": [],
"values": [
"Podróż na Księżyc"
],
"rangeValue": null
}
],
"images": [
"https://cdn.allee.pl/img/sandbox/9a16623650ab051ba0d7-1200.webp"
]
},
"responsibleProducer": {
"type": "ID",
"id": "472bad66-e704-4344-a2d6-9bd85b1f9a5e"
},
"responsiblePerson": null,
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu. Przechowywać z dala od źródeł ciepła."
}
}
],
"parameters": [
{
"id": "11323",
"alleeId": 669,
"name": "Stan",
"valuesIds": [
"11323_1"
],
"alleeValuesIds": [
6386
],
"values": [
"Nowy"
],
"rangeValue": null
}
],
"sellingMode": {
"format": "BUY_NOW",
"price": {
"amount": "49.90",
"currency": "PLN"
}
},
"stock": {
"available": 10,
"unit": "UNIT"
},
"publication": {
"status": "ACTIVE",
"endedBy": null
},
"external": {
"id": "FILM-21ef85-WAR"
},
"delivery": {
"handlingTime": "PT24H",
"shippingRates": {
"id": "797d2e65-cb23-4a16-98e9-d6f2a399839a"
}
},
"afterSalesServices": {
"returnPolicy": {
"id": "0d2fcf15-119d-479c-9d97-ba1794013def"
},
"warranty": null,
"impliedWarranty": {
"id": "d82f8496-f284-4cdf-9575-242222870c5f"
}
},
"taxSettings": {
"rates": [
{
"rate": "23.00",
"countryCode": "PL"
}
]
},
"payments": {
"invoice": "VAT"
},
"images": [
"https://cdn.allee.pl/img/sandbox/9a16623650ab051ba0d7-1200.webp"
],
"description": {
"sections": [
{
"items": [
{
"type": "TEXT",
"content": "<p>Opis</p><p>Film na płycie DVD, wydanie kolekcjonerskie, nowy w folii.</p><p>• Region 2<br>• Język: polski</p>"
}
]
}
]
},
"location": {
"city": "Warszawa",
"countryCode": "PL",
"postCode": "00-001",
"province": "MAZOWIECKIE"
},
"validation": {
"errors": [],
"warnings": []
},
"createdAt": "2026-11-10T11:10:04.000Z",
"updatedAt": "2026-11-10T11:10:04.000Z",
"allee": {
"url": "https://allee.pl/oferta/podroz-na-ksiezyc-blu-ray-wydanie-kolekcjonerskie-900000000000023",
"endedReason": null,
"imagesPending": 0,
"categorySource": "allegro"
}
}Oferta
GET /sale/product-offers/{offerId}
Allegro + rozszerzeniaallegro:api:sale:offers:readlimit: read
Pełna oferta. validation.errors = prawdziwe problemy (np. nieudane zdjęcia). Cudza → 403, brak → 404.
Zgodność: zgodna z Allegro REST API, z rozszerzeniami allee (pola allee.*, alleeId) — GET /sale/product-offers/{offerId}.
Uprawnienie: zakres allegro:api:sale:offers:read.
Grupa limitu: read.
Parametry ścieżki
offerId string wymaganyIdentyfikator oferty (liczba w tekście).
Odpowiedzi
200 Oferta. · ProductOffer
id string zawszeIdentyfikator oferty.
name string zawszeTytuł oferty.
category CategoryRef zawszeKategoria — oba identyfikatory.
Pola obiektu
id string · null zawszeIdentyfikator kategorii Allegro (bywa liczbą, bywa UUID).
alleeId integer zawszeIdentyfikator kategorii allee.
productSet array<object> zawszeZawsze dokładnie 1 element.
Pola obiektu
product object zawszePola obiektu
name string zawszecategory CategoryRef zawszeKategoria — oba identyfikatory.
Pola obiektu
id string · null zawszeIdentyfikator kategorii Allegro (bywa liczbą, bywa UUID).
alleeId integer zawszeIdentyfikator kategorii allee.
parameters array<OfferParameter> zawszeParametry produktu (bez Stanu).
Pola obiektu
id string zawszeIdentyfikator parametru Allegro.
alleeId integer zawszename string zawszevaluesIds array<string> zawszeIdentyfikatory wartości słownika Allegro (puste dla parametrów liczbowych/tekstowych).
alleeValuesIds array<integer>Identyfikatory wartości allee (tylko słownikowe).
values array<string> zawszeWartości tekstowo.
rangeValue any · null zawszeZawsze null (zakresy nieobsługiwane).
images array<string · uri> zawszeZdjęcia po przetworzeniu (cdn.allee.pl, WebP 1200 px).
responsibleProducer object · null zawszeProducent GPSR.
Pola obiektu
type string zawszeIDid string · uuid zawszeresponsiblePerson IdRef · null zawszeOsoba odpowiedzialna GPSR.
Pola obiektu
id string zawszesafetyInformation SafetyInformation · null zawszePola obiektu
type string zawszeTEXT, NO_SAFETY_INFORMATION, ATTACHMENTSdescription stringTreść informacji (dla TEXT).
parameters array<OfferParameter> zawszeParametry oferty — tu jest Stan (11323).
Pola obiektu
id string zawszeIdentyfikator parametru Allegro.
alleeId integer zawszename string zawszevaluesIds array<string> zawszeIdentyfikatory wartości słownika Allegro (puste dla parametrów liczbowych/tekstowych).
alleeValuesIds array<integer>Identyfikatory wartości allee (tylko słownikowe).
values array<string> zawszeWartości tekstowo.
rangeValue any · null zawszeZawsze null (zakresy nieobsługiwane).
sellingMode object zawszePola obiektu
format string zawszeOferty przez API: BUY_NOW (licytacje tylko z panelu).
BUY_NOW, AUCTIONprice Money zawszeKwota (kształt Allegro).
Pola obiektu
amount string zawszeKwota z dwoma miejscami po przecinku, kropka dziesiętna.
currency string zawszeWaluta (allee.pl: tylko PLN).
PLNstock object zawszePola obiektu
available integer zawszeDostępne sztuki (0–99 999).
unit string zawszeUNITpublication object zawszePola obiektu
status PublicationStatus zawszeINACTIVE = szkic, ACTIVATING = czeka na zdjęcia, ACTIVE = widoczna i kupowalna, ENDED = zakończona.
INACTIVE, ACTIVATING, ACTIVE, ENDEDendedBy string · null zawszeKto zakończył (tylko przy ENDED).
USER, EMPTY_STOCK, ADMIN, EXPIRATION, nullexternal object · null zawszePola obiektu
id string zawszeSKU sprzedawcy (unikalne na koncie).
delivery object zawszePola obiektu
handlingTime string · null zawszeCzas wysyłki.
PT0S, PT24H, P2D, P3D, P4D, P5D, P7D, P10D, P14D, P21D, P30D, P60D, nullshippingRates IdRef · null zawszeCennik dostawy.
Pola obiektu
id string zawszeafterSalesServices object zawszePola obiektu
returnPolicy IdRef · null zawszePola obiektu
id string zawszewarranty IdRef · null zawszePola obiektu
id string zawszeimpliedWarranty IdRef · null zawszePola obiektu
id string zawszetaxSettings object · null zawszeStawka VAT.
Pola obiektu
rates array<object> zawszePola obiektu
rate string zawsze0.00, 5.00, 8.00, 23.00countryCode string zawszePLpayments object zawszePola obiektu
invoice string · null zawszeRodzaj dokumentu sprzedaży.
VAT, VAT_MARGIN, WITHOUT_VAT, NO_INVOICE, nullimages array<string · uri> zawszeTo samo co productSet[0].product.images.
description OfferDescription zawszeOpis w sekcjach Allegro. allee zapisuje go jako tekst (znaczniki formatowania, skrypty i style znikają); odczyt zwraca jedną sekcję TEXT z odtworzonym prostym HTML: akapity <p> i <br>, a nagłówek tuż przed listą wraca jako <h2> + <ul><li>. Nie porównuj opisu 1:1 z wysłanym.
Pola obiektu
sections array<object> zawszePola obiektu
items array<object> zawszePola obiektu
type string zawszeTEXT, IMAGEcontent stringHTML (TEXT).
url stringAdres obrazka (IMAGE — pomijany).
location object · null zawszeLokalizacja (zapisana 1:1, zwykle city, countryCode, postCode, province).
validation object zawszePola obiektu
errors array<Error> zawszePrawdziwe problemy oferty, np. nieudane zdjęcia; puste = brak problemów.
Pola obiektu
code string zawszeKod maszynowy błędu — na nim opieraj obsługę (lista: przewodnik „Błędy”).
message string zawszeOpis dla programisty (po polsku).
details any zawszeDane dodatkowe albo null — np. id istniejącej oferty przy OfferDuplicate, {"current": "SENT"} przy błędzie statusu, {"retryAfterMs": 1200} przy limicie.
path string · null zawszePole żądania, którego dotyczy błąd, np. productSet[0].product.parameters.
userMessage string zawszeKomunikat, który można pokazać sprzedawcy.
warnings array<Error> zawszeTylko w odpowiedzi POST/PATCH: co allee dopasowało zamiast odrzucić (np. czas wysyłki zaokrąglony w górę, parametr jednowartościowy obcięty do pierwszej wartości). W GET puste.
Pola obiektu
code string zawszeKod maszynowy błędu — na nim opieraj obsługę (lista: przewodnik „Błędy”).
message string zawszeOpis dla programisty (po polsku).
details any zawszeDane dodatkowe albo null — np. id istniejącej oferty przy OfferDuplicate, {"current": "SENT"} przy błędzie statusu, {"retryAfterMs": 1200} przy limicie.
path string · null zawszePole żądania, którego dotyczy błąd, np. productSet[0].product.parameters.
userMessage string zawszeKomunikat, który można pokazać sprzedawcy.
createdAt string · date-time zawszeupdatedAt string · date-time zawszeallee object zawszeRozszerzenie allee.
Pola obiektu
url string · uri zawszeAdres oferty na allee.pl.
endedReason string · null zawszePowód zakończenia nadany przez allee (np. R2 = 0 sztuk).
imagesPending integer zawszeZdjęcia czekające na pobranie przez allee.
categorySource stringTylko w odpowiedzi POST: która kategoria została użyta.
allegro, allee, allee (podano obie — allee ma pierwszeństwo)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. |
curl -sS -X GET "${ALLEE_API_URL:-https://api.allee.pl}/sale/product-offers/900000000000021" \
-H "Authorization: Bearer $ALLEE_API_KEY" \
-H "Accept: application/vnd.allegro.public.v1+json" \
-w '\nHTTP %{http_code}\n'<?php
// allee API: GET /sale/product-offers/900000000000021 (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$ch = curl_init($base . '/sale/product-offers/900000000000021');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('ALLEE_API_KEY'),
'Accept: application/vnd.allegro.public.v1+json',
],
CURLOPT_RETURNTRANSFER => true,
]);
$odp = curl_exec($ch);
echo 'HTTP ', curl_getinfo($ch, CURLINFO_RESPONSE_CODE), "\n", $odp, "\n";# allee API: GET /sale/product-offers/900000000000021 (Python 3, biblioteka requests)
import os
import requests
BASE = os.environ.get("ALLEE_API_URL", "https://api.allee.pl")
headers = {
"Authorization": "Bearer " + os.environ["ALLEE_API_KEY"],
"Accept": "application/vnd.allegro.public.v1+json",
}
r = requests.request("GET", BASE + "/sale/product-offers/900000000000021", headers=headers, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: GET /sale/product-offers/900000000000021 (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const res = await fetch(`${BASE}/sale/product-offers/900000000000021`, {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.ALLEE_API_KEY}`,
"Accept": "application/vnd.allegro.public.v1+json",
},
redirect: "manual",
});
console.log("HTTP", res.status);
console.log(await res.text());// allee API: GET /sale/product-offers/900000000000021 (C#, .NET 8+, HttpClient)
using System.Net.Http.Headers;
using System.Text;
var baseUrl = Environment.GetEnvironmentVariable("ALLEE_API_URL") ?? "https://api.allee.pl";
using var http = new HttpClient(new HttpClientHandler { AllowAutoRedirect = false });
using var req = new HttpRequestMessage(new HttpMethod("GET"), baseUrl + "/sale/product-offers/900000000000021");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALLEE_API_KEY"));
req.Headers.Accept.ParseAdd("application/vnd.allegro.public.v1+json");
using var res = await http.SendAsync(req);
Console.WriteLine($"HTTP {(int)res.StatusCode}");
Console.WriteLine(await res.Content.ReadAsStringAsync());// allee API: GET /sale/product-offers/900000000000021 (Java 11+, java.net.http; uruchom: java Main.java)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String base = System.getenv().getOrDefault("ALLEE_API_URL", "https://api.allee.pl");
HttpRequest req = HttpRequest.newBuilder(URI.create(base + "/sale/product-offers/900000000000021"))
.header("Authorization", "Bearer " + System.getenv("ALLEE_API_KEY"))
.header("Accept", "application/vnd.allegro.public.v1+json")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpClient http = HttpClient.newBuilder().version(HttpClient.Version.HTTP_1_1).build();
HttpResponse<String> res = http.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println("HTTP " + res.statusCode());
System.out.println(res.body());
}
}// allee API: GET /sale/product-offers/900000000000021 (Go 1.20+, net/http; uruchom: go run main.go)
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
base := os.Getenv("ALLEE_API_URL")
if base == "" {
base = "https://api.allee.pl"
}
req, err := http.NewRequest("GET", base+"/sale/product-offers/900000000000021", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("ALLEE_API_KEY"))
req.Header.Set("Accept", "application/vnd.allegro.public.v1+json")
klient := &http.Client{CheckRedirect: func(*http.Request, []*http.Request) error { return http.ErrUseLastResponse }}
res, err := klient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
dane, err := io.ReadAll(res.Body)
if err != nil {
panic(err)
}
fmt.Println("HTTP", res.StatusCode)
fmt.Println(string(dane))
}application/vnd.allegro.public.v1+json{
"id": "900000000000021",
"name": "Podróż na Księżyc DVD wydanie kolekcjonerskie",
"category": {
"id": "20585",
"alleeId": 35
},
"productSet": [
{
"product": {
"name": "Podróż na Księżyc DVD wydanie kolekcjonerskie",
"category": {
"id": "20585",
"alleeId": 35
},
"parameters": [
{
"id": "246845",
"alleeId": 8973,
"name": "Nośnik",
"valuesIds": [
"246845_622165"
],
"alleeValuesIds": [
79216
],
"values": [
"płyta DVD"
],
"rangeValue": null
},
{
"id": "250077",
"alleeId": 10923,
"name": "Gatunek",
"valuesIds": [
"250077_1797493"
],
"alleeValuesIds": [
258674
],
"values": [
"anime"
],
"rangeValue": null
},
{
"id": "225693",
"alleeId": 5967,
"name": "EAN (GTIN)",
"valuesIds": [],
"values": [
"5901234123457"
],
"rangeValue": null
},
{
"id": "237218",
"alleeId": 7939,
"name": "Tytuł",
"valuesIds": [],
"values": [
"Podróż na Księżyc"
],
"rangeValue": null
}
],
"images": [
"https://cdn.allee.pl/img/sandbox/9a16623650ab051ba0d7-1200.webp"
]
},
"responsibleProducer": {
"type": "ID",
"id": "472bad66-e704-4344-a2d6-9bd85b1f9a5e"
},
"responsiblePerson": null,
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu. Przechowywać z dala od źródeł ciepła."
}
}
],
"parameters": [
{
"id": "11323",
"alleeId": 669,
"name": "Stan",
"valuesIds": [
"11323_1"
],
"alleeValuesIds": [
6386
],
"values": [
"Nowy"
],
"rangeValue": null
}
],
"sellingMode": {
"format": "BUY_NOW",
"price": {
"amount": "49.90",
"currency": "PLN"
}
},
"stock": {
"available": 10,
"unit": "UNIT"
},
"publication": {
"status": "ACTIVE",
"endedBy": null
},
"external": {
"id": "FILM-21ef85-1"
},
"delivery": {
"handlingTime": "PT24H",
"shippingRates": {
"id": "797d2e65-cb23-4a16-98e9-d6f2a399839a"
}
},
"afterSalesServices": {
"returnPolicy": {
"id": "0d2fcf15-119d-479c-9d97-ba1794013def"
},
"warranty": null,
"impliedWarranty": {
"id": "d82f8496-f284-4cdf-9575-242222870c5f"
}
},
"taxSettings": {
"rates": [
{
"rate": "23.00",
"countryCode": "PL"
}
]
},
"payments": {
"invoice": "VAT"
},
"images": [
"https://cdn.allee.pl/img/sandbox/9a16623650ab051ba0d7-1200.webp"
],
"description": {
"sections": [
{
"items": [
{
"type": "TEXT",
"content": "<p>Opis</p><p>Film na płycie DVD, wydanie kolekcjonerskie, nowy w folii.</p><p>• Region 2<br>• Język: polski</p>"
}
]
}
]
},
"location": {
"city": "Warszawa",
"countryCode": "PL",
"postCode": "00-001",
"province": "MAZOWIECKIE"
},
"validation": {
"errors": [],
"warnings": []
},
"createdAt": "2026-11-10T11:10:03.000Z",
"updatedAt": "2026-11-10T11:10:03.000Z",
"allee": {
"url": "https://allee.pl/oferta/podroz-na-ksiezyc-dvd-wydanie-kolekcjonerskie-900000000000021",
"endedReason": null,
"imagesPending": 0
}
}Zmiana oferty
PATCH /sale/product-offers/{offerId}
Allegro + rozszerzeniaallegro:api:sale:offers:writelimit: write
Zmieniasz tylko podane pola; odpowiedź 200 z pełną ofertą.
- Szybka ścieżka: ciało tylko ze
stocki/lubsellingMode.price— bez pełnej walidacji treści (masowe aktualizacje). - Parametry są scalane (podane zastępują te same parametry, reszta zostaje).
- Status publikacji zmieniasz poleceniem
PUT /sale/offer-publication-commands/{id}(polepublication→ 422). stock.available = 0na aktywnej ofercie kończy ją (ENDED,endedBy: EMPTY_STOCK).?validateOnly=true— podgląd bez zapisu.
Zgodność: zgodna z Allegro REST API, z rozszerzeniami allee (pola allee.*, alleeId) — PATCH /sale/product-offers/{offerId}.
Uprawnienie: zakres allegro:api:sale:offers:write.
Grupa limitu: write.
Parametry ścieżki
offerId string wymaganyIdentyfikator oferty (liczba w tekście).
Parametry zapytania
validateOnly booleantrue = tylko walidacja.
Treść żądania application/vnd.allegro.public.v1+json
productSet array<object> wymaganeDokładnie 1 element.
Pola obiektu
product object wymaganePola obiektu
name stringTytuł: 10–75 znaków, żadne słowo dłuższe niż 30 znaków.
category objectPola obiektu
id stringId kategorii Allegro.
alleeId integer|stringId allee — gdy podano oba, wygrywa alleeId.
parameters array<OfferParameterInput>Pola obiektu
id stringId parametru Allegro.
alleeId integer|stringId parametru allee.
name stringAlbo nazwa parametru w kategorii (bez względu na wielkość liter).
valuesIds array<string>alleeValuesIds array<integer|string>values array<string|number>Tekst (słownik dopasowywany bez względu na wielkość liter), liczba albo tekst.
rangeValue anyNieobsługiwane → 422 ConstraintViolationException.RangeValueNotSupported.
images array<string · uri | object>1–16 adresów https: lista tekstów albo obiektów {url} (jak w odczycie Allegro).
id stringKarta produktu Allegro — pomijana; samo id bez danych → 422 CATALOG_PRODUCT_NOT_SUPPORTED.
responsibleProducer object · nullPola obiektu
type string wymaganeIDid string · uuid wymaganeresponsiblePerson IdRef · nullPola obiektu
id string wymaganesafetyInformation SafetyInformation · nullPola obiektu
type string wymaganeTEXT, NO_SAFETY_INFORMATION, ATTACHMENTSdescription stringTreść informacji (dla TEXT).
parameters array<OfferParameterInput>Parametry oferty (Stan 11323 — przyjmowany w każdej kategorii).
Pola obiektu
id stringId parametru Allegro.
alleeId integer|stringId parametru allee.
name stringAlbo nazwa parametru w kategorii (bez względu na wielkość liter).
valuesIds array<string>alleeValuesIds array<integer|string>values array<string|number>Tekst (słownik dopasowywany bez względu na wielkość liter), liczba albo tekst.
rangeValue anyNieobsługiwane → 422 ConstraintViolationException.RangeValueNotSupported.
sellingMode objectCena wymagana: 1,00–10 000 000,00 zł.
Pola obiektu
format stringBUY_NOWprice MoneyInputKwota w żądaniu.
Pola obiektu
amount string|number wymaganeKwota jako tekst „123.45” (zalecane) albo liczba.
currency stringWaluta: tylko PLN (domyślnie PLN).
PLNstock objectPola obiektu
available integer|string0–99 999 (przy POST co najmniej 1).
unit stringUNITexternal object · nullPola obiektu
id string|integerSKU (do 100 znaków), unikalne na koncie — dubel → 409 OfferDuplicate.
description OfferDescriptionOpis w sekcjach Allegro. allee zapisuje go jako tekst (znaczniki formatowania, skrypty i style znikają); odczyt zwraca jedną sekcję TEXT z odtworzonym prostym HTML: akapity <p> i <br>, a nagłówek tuż przed listą wraca jako <h2> + <ul><li>. Nie porównuj opisu 1:1 z wysłanym.
Pola obiektu
sections array<object> wymaganePola obiektu
items array<object> wymaganePola obiektu
type string wymaganeTEXT, IMAGEcontent stringHTML (TEXT).
url stringAdres obrazka (IMAGE — pomijany).
publication objectPola obiektu
status stringTylko w POST; brak = INACTIVE (szkic).
ACTIVE, INACTIVEdelivery objectPola obiektu
handlingTime string · nullCzas ISO 8601 do 60 dni, np. PT24H, P3D, PT72H (jak w odczycie Allegro). Zapisywany jako jedna z wartości PT0S, PT24H, P2D, P3D, P4D, P5D, P7D, P10D, P14D, P21D, P30D, P60D; wartość pośrednia — w górę, z ostrzeżeniem w validation.warnings.
shippingRates IdRef · nullTwój cennik — wymagany w POST.
Pola obiektu
id string wymaganeadditionalInfo anyBez skutku.
shipmentDate anyBez skutku.
afterSalesServices objectPola obiektu
returnPolicy IdRef · nullPola obiektu
id string wymaganewarranty IdRef · nullPola obiektu
id string wymaganeimpliedWarranty IdRef · nullPola obiektu
id string wymaganetaxSettings object · nullPola obiektu
rates array<object> wymaganePola obiektu
rate string wymaganeTekst, nie liczba.
0.00, 5.00, 8.00, 23.00countryCode stringpayments objectPola obiektu
invoice string · nullVAT, VAT_MARGIN, WITHOUT_VAT, NO_INVOICE, nulllocation object · nullDo 300 znaków JSON.
images array<string>Alternatywnie zdjęcia na wierzchu.
category objectAlternatywnie kategoria na wierzchu.
Pola obiektu
id stringalleeId integer|stringname stringTytuł oferty (jak Allegro) — w POST i PATCH; ma pierwszeństwo przed productSet[0].product.name.
id anyTylko do odczytu — pomijane.
validation anyTylko do odczytu — pomijane.
warnings anyTylko do odczytu — pomijane.
createdAt anyTylko do odczytu — pomijane.
updatedAt anyTylko do odczytu — pomijane.
aiCoCreatedContent anyTylko do odczytu — pomijane.
allee anyTylko do odczytu — pomijane.
language anyPrzyjmowane bez skutku.
additionalMarketplaces anyBez skutku.
b2b anyBez skutku.
discounts anyBez skutku.
compatibilityList anyBez skutku.
tecdocSpecification anyBez skutku.
contact anyBez skutku.
messageToSellerSettings anyBez skutku.
attachments anyBez skutku.
fundraisingCampaign anyBez skutku.
additionalServices anyBez skutku.
sizeTable anyBez skutku.
promotion anyBez skutku.
Odpowiedzi
200 Zmieniono (albo wynik validateOnly). · ProductOffer | ValidationResult
id string zawszeIdentyfikator oferty.
name string zawszeTytuł oferty.
category CategoryRef zawszeKategoria — oba identyfikatory.
Pola obiektu
id string · null zawszeIdentyfikator kategorii Allegro (bywa liczbą, bywa UUID).
alleeId integer zawszeIdentyfikator kategorii allee.
productSet array<object> zawszeZawsze dokładnie 1 element.
Pola obiektu
product object zawszePola obiektu
name string zawszecategory CategoryRef zawszeKategoria — oba identyfikatory.
Pola obiektu
id string · null zawszeIdentyfikator kategorii Allegro (bywa liczbą, bywa UUID).
alleeId integer zawszeIdentyfikator kategorii allee.
parameters array<OfferParameter> zawszeParametry produktu (bez Stanu).
Pola obiektu
id string zawszeIdentyfikator parametru Allegro.
alleeId integer zawszename string zawszevaluesIds array<string> zawszeIdentyfikatory wartości słownika Allegro (puste dla parametrów liczbowych/tekstowych).
alleeValuesIds array<integer>Identyfikatory wartości allee (tylko słownikowe).
values array<string> zawszeWartości tekstowo.
rangeValue any · null zawszeZawsze null (zakresy nieobsługiwane).
images array<string · uri> zawszeZdjęcia po przetworzeniu (cdn.allee.pl, WebP 1200 px).
responsibleProducer object · null zawszeProducent GPSR.
Pola obiektu
type string zawszeIDid string · uuid zawszeresponsiblePerson IdRef · null zawszeOsoba odpowiedzialna GPSR.
Pola obiektu
id string zawszesafetyInformation SafetyInformation · null zawszePola obiektu
type string zawszeTEXT, NO_SAFETY_INFORMATION, ATTACHMENTSdescription stringTreść informacji (dla TEXT).
parameters array<OfferParameter> zawszeParametry oferty — tu jest Stan (11323).
Pola obiektu
id string zawszeIdentyfikator parametru Allegro.
alleeId integer zawszename string zawszevaluesIds array<string> zawszeIdentyfikatory wartości słownika Allegro (puste dla parametrów liczbowych/tekstowych).
alleeValuesIds array<integer>Identyfikatory wartości allee (tylko słownikowe).
values array<string> zawszeWartości tekstowo.
rangeValue any · null zawszeZawsze null (zakresy nieobsługiwane).
sellingMode object zawszePola obiektu
format string zawszeOferty przez API: BUY_NOW (licytacje tylko z panelu).
BUY_NOW, AUCTIONprice Money zawszeKwota (kształt Allegro).
Pola obiektu
amount string zawszeKwota z dwoma miejscami po przecinku, kropka dziesiętna.
currency string zawszeWaluta (allee.pl: tylko PLN).
PLNstock object zawszePola obiektu
available integer zawszeDostępne sztuki (0–99 999).
unit string zawszeUNITpublication object zawszePola obiektu
status PublicationStatus zawszeINACTIVE = szkic, ACTIVATING = czeka na zdjęcia, ACTIVE = widoczna i kupowalna, ENDED = zakończona.
INACTIVE, ACTIVATING, ACTIVE, ENDEDendedBy string · null zawszeKto zakończył (tylko przy ENDED).
USER, EMPTY_STOCK, ADMIN, EXPIRATION, nullexternal object · null zawszePola obiektu
id string zawszeSKU sprzedawcy (unikalne na koncie).
delivery object zawszePola obiektu
handlingTime string · null zawszeCzas wysyłki.
PT0S, PT24H, P2D, P3D, P4D, P5D, P7D, P10D, P14D, P21D, P30D, P60D, nullshippingRates IdRef · null zawszeCennik dostawy.
Pola obiektu
id string zawszeafterSalesServices object zawszePola obiektu
returnPolicy IdRef · null zawszePola obiektu
id string zawszewarranty IdRef · null zawszePola obiektu
id string zawszeimpliedWarranty IdRef · null zawszePola obiektu
id string zawszetaxSettings object · null zawszeStawka VAT.
Pola obiektu
rates array<object> zawszePola obiektu
rate string zawsze0.00, 5.00, 8.00, 23.00countryCode string zawszePLpayments object zawszePola obiektu
invoice string · null zawszeRodzaj dokumentu sprzedaży.
VAT, VAT_MARGIN, WITHOUT_VAT, NO_INVOICE, nullimages array<string · uri> zawszeTo samo co productSet[0].product.images.
description OfferDescription zawszeOpis w sekcjach Allegro. allee zapisuje go jako tekst (znaczniki formatowania, skrypty i style znikają); odczyt zwraca jedną sekcję TEXT z odtworzonym prostym HTML: akapity <p> i <br>, a nagłówek tuż przed listą wraca jako <h2> + <ul><li>. Nie porównuj opisu 1:1 z wysłanym.
Pola obiektu
sections array<object> zawszePola obiektu
items array<object> zawszePola obiektu
type string zawszeTEXT, IMAGEcontent stringHTML (TEXT).
url stringAdres obrazka (IMAGE — pomijany).
location object · null zawszeLokalizacja (zapisana 1:1, zwykle city, countryCode, postCode, province).
validation object zawszePola obiektu
errors array<Error> zawszePrawdziwe problemy oferty, np. nieudane zdjęcia; puste = brak problemów.
Pola obiektu
code string zawszeKod maszynowy błędu — na nim opieraj obsługę (lista: przewodnik „Błędy”).
message string zawszeOpis dla programisty (po polsku).
details any zawszeDane dodatkowe albo null — np. id istniejącej oferty przy OfferDuplicate, {"current": "SENT"} przy błędzie statusu, {"retryAfterMs": 1200} przy limicie.
path string · null zawszePole żądania, którego dotyczy błąd, np. productSet[0].product.parameters.
userMessage string zawszeKomunikat, który można pokazać sprzedawcy.
warnings array<Error> zawszeTylko w odpowiedzi POST/PATCH: co allee dopasowało zamiast odrzucić (np. czas wysyłki zaokrąglony w górę, parametr jednowartościowy obcięty do pierwszej wartości). W GET puste.
Pola obiektu
code string zawszeKod maszynowy błędu — na nim opieraj obsługę (lista: przewodnik „Błędy”).
message string zawszeOpis dla programisty (po polsku).
details any zawszeDane dodatkowe albo null — np. id istniejącej oferty przy OfferDuplicate, {"current": "SENT"} przy błędzie statusu, {"retryAfterMs": 1200} przy limicie.
path string · null zawszePole żądania, którego dotyczy błąd, np. productSet[0].product.parameters.
userMessage string zawszeKomunikat, który można pokazać sprzedawcy.
createdAt string · date-time zawszeupdatedAt string · date-time zawszeallee object zawszeRozszerzenie allee.
Pola obiektu
url string · uri zawszeAdres oferty na allee.pl.
endedReason string · null zawszePowód zakończenia nadany przez allee (np. R2 = 0 sztuk).
imagesPending integer zawszeZdjęcia czekające na pobranie przez allee.
categorySource stringTylko w odpowiedzi POST: która kategoria została użyta.
allegro, allee, allee (podano obie — allee ma pierwszeństwo)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ę). |
| 403 | OFFER_ENDED_BY_ADMIN | Ofertę zakończyła moderacja allee — nie można jej zmienić ani wznowić. |
| 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 | OfferDuplicate | Oferta z tym external.id (SKU) już istnieje — details = jej id. |
| 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 | ATTACHMENTS_NOT_SUPPORTED | allee nie przyjmuje załączników w wiadomościach. |
| 422 | CATALOG_PRODUCT_NOT_SUPPORTED | Sama karta produktu Allegro bez danych. |
| 422 | CATEGORY_NOT_FOUND | Nie ma takiej kategorii. |
| 422 | CATEGORY_NOT_LEAF | Kategoria nie jest liściem. |
| 422 | ConstraintViolationException.MissingRequiredParameters | Brak wymaganego parametru lub pola (details = id parametru). |
| 422 | ConstraintViolationException.RangeValueNotSupported | rangeValue nieobsługiwane. |
| 422 | ConstraintViolationException.TooManyValues | Kilka wartości przy multipleChoices: false. |
| 422 | DictionaryParameterValueNotFound | Wartość spoza słownika kategorii (albo Stan nieobsługiwany przez allee). |
| 422 | IMAGE_DOWNLOAD_FAILED | Adres zdjęcia niedozwolony albo nie da się go pobrać (path = które zdjęcie). |
| 422 | INVALID_QUANTITY | Liczba sztuk poza zakresem. |
| 422 | JsonMappingException | Treść nie jest poprawnym JSON albo ma zły kształt (np. images jako obiekty). |
| 422 | ParameterCategoryException | Parametr nie należy do kategorii. |
| 422 | RESPONSIBLE_PRODUCER_NOT_SPECIFIED | Publikacja bez producenta GPSR. |
| 422 | SAFETY_INFO_NOT_DEFINED | Publikacja bez informacji o bezpieczeństwie (GPSR). |
| 422 | UnknownJSONProperty | Pole nieznane w tym miejscu (path wskazuje które). |
| 422 | VALIDATION_ERROR | Zła wartość parametru zapytania (400) albo pola treści (422); path wskazuje miejsce. |
| 429 | TOO_MANY_REQUESTS | Przekroczony limit (minutowy, grupy operacji albo IP). |
| 500 | INTERNAL_ERROR | Błąd serwera allee. |
curl -sS -X PATCH "${ALLEE_API_URL:-https://api.allee.pl}/sale/product-offers/900000000000021" \
-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'
{
"sellingMode": {
"price": {
"amount": "44.90",
"currency": "PLN"
}
},
"stock": {
"available": 8
}
}
JSON<?php
// allee API: PATCH /sale/product-offers/900000000000021 (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$body = [
'sellingMode' => [
'price' => [
'amount' => '44.90',
'currency' => 'PLN',
],
],
'stock' => [
'available' => 8,
],
];
$ch = curl_init($base . '/sale/product-offers/900000000000021');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PATCH',
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: PATCH /sale/product-offers/900000000000021 (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 = {
"sellingMode": {
"price": {
"amount": "44.90",
"currency": "PLN",
},
},
"stock": {
"available": 8,
},
}
r = requests.request("PATCH", BASE + "/sale/product-offers/900000000000021", headers=headers, json=body, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: PATCH /sale/product-offers/900000000000021 (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const body = {
"sellingMode": {
"price": {
"amount": "44.90",
"currency": "PLN"
}
},
"stock": {
"available": 8
}
};
const res = await fetch(`${BASE}/sale/product-offers/900000000000021`, {
method: "PATCH",
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: PATCH /sale/product-offers/900000000000021 (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("PATCH"), baseUrl + "/sale/product-offers/900000000000021");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALLEE_API_KEY"));
req.Headers.Accept.ParseAdd("application/vnd.allegro.public.v1+json");
var json = """
{
"sellingMode": {
"price": {
"amount": "44.90",
"currency": "PLN"
}
},
"stock": {
"available": 8
}
}
""";
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: PATCH /sale/product-offers/900000000000021 (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 = """
{
"sellingMode": {
"price": {
"amount": "44.90",
"currency": "PLN"
}
},
"stock": {
"available": 8
}
}
""";
HttpRequest req = HttpRequest.newBuilder(URI.create(base + "/sale/product-offers/900000000000021"))
.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("PATCH", 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: PATCH /sale/product-offers/900000000000021 (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 := `{
"sellingMode": {
"price": {
"amount": "44.90",
"currency": "PLN"
}
},
"stock": {
"available": 8
}
}`
req, err := http.NewRequest("PATCH", base+"/sale/product-offers/900000000000021", 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": "900000000000021",
"name": "Podróż na Księżyc DVD wydanie kolekcjonerskie",
"category": {
"id": "20585",
"alleeId": 35
},
"productSet": [
{
"product": {
"name": "Podróż na Księżyc DVD wydanie kolekcjonerskie",
"category": {
"id": "20585",
"alleeId": 35
},
"parameters": [
{
"id": "246845",
"alleeId": 8973,
"name": "Nośnik",
"valuesIds": [
"246845_622165"
],
"alleeValuesIds": [
79216
],
"values": [
"płyta DVD"
],
"rangeValue": null
},
{
"id": "250077",
"alleeId": 10923,
"name": "Gatunek",
"valuesIds": [
"250077_1797493"
],
"alleeValuesIds": [
258674
],
"values": [
"anime"
],
"rangeValue": null
},
{
"id": "225693",
"alleeId": 5967,
"name": "EAN (GTIN)",
"valuesIds": [],
"values": [
"5901234123457"
],
"rangeValue": null
},
{
"id": "237218",
"alleeId": 7939,
"name": "Tytuł",
"valuesIds": [],
"values": [
"Podróż na Księżyc"
],
"rangeValue": null
}
],
"images": [
"https://cdn.allee.pl/img/sandbox/9a16623650ab051ba0d7-1200.webp"
]
},
"responsibleProducer": {
"type": "ID",
"id": "472bad66-e704-4344-a2d6-9bd85b1f9a5e"
},
"responsiblePerson": null,
"safetyInformation": {
"type": "TEXT",
"description": "Produkt bezpieczny w normalnym użytkowaniu. Przechowywać z dala od źródeł ciepła."
}
}
],
"parameters": [
{
"id": "11323",
"alleeId": 669,
"name": "Stan",
"valuesIds": [
"11323_1"
],
"alleeValuesIds": [
6386
],
"values": [
"Nowy"
],
"rangeValue": null
}
],
"sellingMode": {
"format": "BUY_NOW",
"price": {
"amount": "44.90",
"currency": "PLN"
}
},
"stock": {
"available": 8,
"unit": "UNIT"
},
"publication": {
"status": "ACTIVE",
"endedBy": null
},
"external": {
"id": "FILM-21ef85-1"
},
"delivery": {
"handlingTime": "PT24H",
"shippingRates": {
"id": "797d2e65-cb23-4a16-98e9-d6f2a399839a"
}
},
"afterSalesServices": {
"returnPolicy": {
"id": "0d2fcf15-119d-479c-9d97-ba1794013def"
},
"warranty": null,
"impliedWarranty": {
"id": "d82f8496-f284-4cdf-9575-242222870c5f"
}
},
"taxSettings": {
"rates": [
{
"rate": "23.00",
"countryCode": "PL"
}
]
},
"payments": {
"invoice": "VAT"
},
"images": [
"https://cdn.allee.pl/img/sandbox/9a16623650ab051ba0d7-1200.webp"
],
"description": {
"sections": [
{
"items": [
{
"type": "TEXT",
"content": "<p>Opis</p><p>Film na płycie DVD, wydanie kolekcjonerskie, nowy w folii.</p><p>• Region 2<br>• Język: polski</p>"
}
]
}
]
},
"location": {
"city": "Warszawa",
"countryCode": "PL",
"postCode": "00-001",
"province": "MAZOWIECKIE"
},
"validation": {
"errors": [],
"warnings": []
},
"createdAt": "2026-11-10T11:10:03.000Z",
"updatedAt": "2026-11-10T11:10:03.000Z",
"allee": {
"url": "https://allee.pl/oferta/podroz-na-ksiezyc-dvd-wydanie-kolekcjonerskie-900000000000021",
"endedReason": null,
"imagesPending": 0
}
}Lista ofert
GET /sale/offers
Allegro + rozszerzeniaallegro:api:sale:offers:readlimit: read
Wszystkie oferty sprzedawcy (z API, panelu i integracji). Filtry jak w Allegro; parametry z wieloma wartościami możesz powtórzyć albo rozdzielić przecinkiem.
Zgodność: zgodna z Allegro REST API, z rozszerzeniami allee (pola allee.*, alleeId) — GET /sale/offers.
Uprawnienie: zakres allegro:api:sale:offers:read.
Grupa limitu: read.
Parametry zapytania
offset integerIle pozycji pominąć.
limit integerIle pozycji zwrócić (1–1000, domyślnie 100).
publication.status array<PublicationStatus>Status publikacji.
external.id array<string>SKU (do 1000).
offer.id array<string>Id ofert (do 1000).
name stringFragment tytułu (bez wielkości liter).
category.id array<string>Kategoria Allegro.
category.alleeId array<string>Kategoria allee.
sellingMode.format stringFormat.
BUY_NOW, AUCTIONsellingMode.price.amount.gte stringCena od.
sellingMode.price.amount.lte stringCena do.
stock.available.gte integerSztuk od.
stock.available.lte integerSztuk do.
delivery.shippingRates.id array<string>Cennik dostawy.
sort stringSortowanie („-” = malejąco); domyślnie po id.
sellingMode.price.amount, -sellingMode.price.amount, stock.available, -stock.available, stock.sold, -stock.soldOdpowiedzi
200 Oferty. · OfferList
offers array<OfferListItem> zawszePola obiektu
id string zawszename string zawszecategory CategoryRef zawszeKategoria — oba identyfikatory.
Pola obiektu
id string · null zawszeIdentyfikator kategorii Allegro (bywa liczbą, bywa UUID).
alleeId integer zawszeIdentyfikator kategorii allee.
primaryImage object · null zawszePola obiektu
url string · uri zawszesellingMode object zawszePola obiektu
format string zawszeBUY_NOW, AUCTIONprice Money zawszeKwota (kształt Allegro).
Pola obiektu
amount string zawszeKwota z dwoma miejscami po przecinku, kropka dziesiętna.
currency string zawszeWaluta (allee.pl: tylko PLN).
PLNstock object zawszePola obiektu
available integer zawszesold integer zawszeSprzedane w ostatnich 30 dniach (bez anulowanych i zwróconych).
publication object zawszePola obiektu
status PublicationStatus zawszeINACTIVE = szkic, ACTIVATING = czeka na zdjęcia, ACTIVE = widoczna i kupowalna, ENDED = zakończona.
INACTIVE, ACTIVATING, ACTIVE, ENDEDendedBy string · null zawszeUSER, EMPTY_STOCK, ADMIN, EXPIRATION, nullexternal object · null zawszePola obiektu
id string zawszecount integer zawszeOfert na tej stronie.
totalCount integer zawszeWszystkich pasujących.
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ę). |
| 429 | TOO_MANY_REQUESTS | Przekroczony limit (minutowy, grupy operacji albo IP). |
| 500 | INTERNAL_ERROR | Błąd serwera allee. |
curl -sS -X GET "${ALLEE_API_URL:-https://api.allee.pl}/sale/offers?publication.status=ACTIVE&limit=20&offset=0" \
-H "Authorization: Bearer $ALLEE_API_KEY" \
-H "Accept: application/vnd.allegro.public.v1+json" \
-w '\nHTTP %{http_code}\n'<?php
// allee API: GET /sale/offers (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$ch = curl_init($base . '/sale/offers?publication.status=ACTIVE&limit=20&offset=0');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('ALLEE_API_KEY'),
'Accept: application/vnd.allegro.public.v1+json',
],
CURLOPT_RETURNTRANSFER => true,
]);
$odp = curl_exec($ch);
echo 'HTTP ', curl_getinfo($ch, CURLINFO_RESPONSE_CODE), "\n", $odp, "\n";# allee API: GET /sale/offers (Python 3, biblioteka requests)
import os
import requests
BASE = os.environ.get("ALLEE_API_URL", "https://api.allee.pl")
headers = {
"Authorization": "Bearer " + os.environ["ALLEE_API_KEY"],
"Accept": "application/vnd.allegro.public.v1+json",
}
r = requests.request("GET", BASE + "/sale/offers?publication.status=ACTIVE&limit=20&offset=0", headers=headers, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: GET /sale/offers (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const res = await fetch(`${BASE}/sale/offers?publication.status=ACTIVE&limit=20&offset=0`, {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.ALLEE_API_KEY}`,
"Accept": "application/vnd.allegro.public.v1+json",
},
redirect: "manual",
});
console.log("HTTP", res.status);
console.log(await res.text());// allee API: GET /sale/offers (C#, .NET 8+, HttpClient)
using System.Net.Http.Headers;
using System.Text;
var baseUrl = Environment.GetEnvironmentVariable("ALLEE_API_URL") ?? "https://api.allee.pl";
using var http = new HttpClient(new HttpClientHandler { AllowAutoRedirect = false });
using var req = new HttpRequestMessage(new HttpMethod("GET"), baseUrl + "/sale/offers?publication.status=ACTIVE&limit=20&offset=0");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALLEE_API_KEY"));
req.Headers.Accept.ParseAdd("application/vnd.allegro.public.v1+json");
using var res = await http.SendAsync(req);
Console.WriteLine($"HTTP {(int)res.StatusCode}");
Console.WriteLine(await res.Content.ReadAsStringAsync());// allee API: GET /sale/offers (Java 11+, java.net.http; uruchom: java Main.java)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String base = System.getenv().getOrDefault("ALLEE_API_URL", "https://api.allee.pl");
HttpRequest req = HttpRequest.newBuilder(URI.create(base + "/sale/offers?publication.status=ACTIVE&limit=20&offset=0"))
.header("Authorization", "Bearer " + System.getenv("ALLEE_API_KEY"))
.header("Accept", "application/vnd.allegro.public.v1+json")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpClient http = HttpClient.newBuilder().version(HttpClient.Version.HTTP_1_1).build();
HttpResponse<String> res = http.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println("HTTP " + res.statusCode());
System.out.println(res.body());
}
}// allee API: GET /sale/offers (Go 1.20+, net/http; uruchom: go run main.go)
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
base := os.Getenv("ALLEE_API_URL")
if base == "" {
base = "https://api.allee.pl"
}
req, err := http.NewRequest("GET", base+"/sale/offers?publication.status=ACTIVE&limit=20&offset=0", 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{
"offers": [
{
"id": "900000000000001",
"name": "Produkt demo 01 – Projekty wnętrz",
"category": {
"id": "319697",
"alleeId": 941
},
"primaryImage": {
"url": "https://cdn.allee.pl/img/u/980000001/1f93e0d0ce5c0868cee3-1200.webp"
},
"sellingMode": {
"format": "BUY_NOW",
"price": {
"amount": "19.99",
"currency": "PLN"
}
},
"stock": {
"available": 25,
"sold": 0
},
"publication": {
"status": "ACTIVE",
"endedBy": null
},
"external": {
"id": "DEMO-01"
}
},
{
"id": "900000000000002",
"name": "Produkt demo 02 – Bulwy, cebulki, kłącza",
"category": {
"id": "12922",
"alleeId": 1739
},
"primaryImage": {
"url": "https://cdn.allee.pl/img/u/980000001/0108cb32c6569aad69db-1200.webp"
},
"sellingMode": {
"format": "BUY_NOW",
"price": {
"amount": "29.90",
"currency": "PLN"
}
},
"stock": {
"available": 25,
"sold": 0
},
"publication": {
"status": "ACTIVE",
"endedBy": null
},
"external": {
"id": "DEMO-02"
}
},
{
"id": "900000000000003",
"name": "Produkt demo 03 – Byliny ozdobne",
"category": {
"id": "99806",
"alleeId": 1755
},
"primaryImage": {
"url": "https://cdn.allee.pl/img/u/980000001/521d588b620db4503484-1200.webp"
},
"sellingMode": {
"format": "BUY_NOW",
"price": {
"amount": "49.00",
"currency": "PLN"
}
},
"stock": {
"available": 25,
"sold": 0
},
"publication": {
"status": "ACTIVE",
"endedBy": null
},
"external": {
"id": "DEMO-03"
}
},
{
"id": "900000000000004",
"name": "Produkt demo 04 – Drzewa i krzewy iglaste",
"category": {
"id": "99745",
"alleeId": 2123
},
"primaryImage": {
"url": "https://cdn.allee.pl/img/u/980000001/974af1fae322953c9a7e-1200.webp"
},
"sellingMode": {
"format": "BUY_NOW",
"price": {
"amount": "79.99",
"currency": "PLN"
}
},
"stock": {
"available": 25,
"sold": 0
},
"publication": {
"status": "ACTIVE",
"endedBy": null
},
"external": {
"id": "DEMO-04"
}
},
{
"id": "900000000000005",
"name": "Produkt demo 05 – Złote numery",
"category": {
"id": "310073",
"alleeId": 1296
},
"primaryImage": {
"url": "https://cdn.allee.pl/img/u/980000001/c57b491b20ba66fe8ff7-1200.webp"
},
"sellingMode": {
"format": "BUY_NOW",
"price": {
"amount": "99.00",
"currency": "PLN"
}
},
"stock": {
"available": 25,
"sold": 0
},
"publication": {
"status": "ACTIVE",
"endedBy": null
},
"external": {
"id": "DEMO-05"
}
},
{
"id": "900000000000006",
"name": "Produkt demo 06 – Etui i pokrowce",
"category": {
"id": "353",
"alleeId": 2220
},
"primaryImage": {
"url": "https://cdn.allee.pl/img/u/980000001/518b2c3652686f357b3b-1200.webp"
},
"sellingMode": {
"format": "BUY_NOW",
"price": {
"amount": "129.00",
"currency": "PLN"
}
},
"stock": {
"available": 25,
"sold": 0
},
"publication": {
"status": "ACTIVE",
"endedBy": null
},
"external": {
"id": "DEMO-06"
}
},
{
"id": "900000000000007",
"name": "Produkt demo 07 – Dresy kompletne",
"category": {
"id": "76039",
"alleeId": 2103
},
"primaryImage": {
"url": "https://cdn.allee.pl/img/u/980000001/29d58c570b4c85084c70-1200.webp"
},
"sellingMode": {
"format": "BUY_NOW",
"price": {
"amount": "15.50",
"currency": "PLN"
}
},
"stock": {
"available": 25,
"sold": 0
},
"publication": {
"status": "ACTIVE",
"endedBy": null
},
"external": {
"id": "DEMO-07"
}
},
{
"id": "900000000000008",
"name": "Produkt demo 08 – Dresy kompletne",
"category": {
"id": "87844",
"alleeId": 2104
},
"primaryImage": {
"url": "https://cdn.allee.pl/img/u/980000001/5b602fdfbcc60880f7b9-1200.webp"
},
"sellingMode": {
"format": "BUY_NOW",
"price": {
"amount": "249.00",
"currency": "PLN"
}
},
"stock": {
"available": 25,
"sold": 0
},
"publication": {
"status": "ACTIVE",
"endedBy": null
},
"external": {
"id": "DEMO-08"
}
},
{
"id": "900000000000009",
"name": "Produkt demo 09 – Wąsy i brody",
"category": {
"id": "319923",
"alleeId": 11907
},
"primaryImage": {
"url": "https://cdn.allee.pl/img/u/980000001/50e5775d08ce8523d94e-1200.webp"
},
"sellingMode": {
"format": "BUY_NOW",
"price": {
"amount": "9.99",
"currency": "PLN"
}
},
"stock": {
"available": 25,
"sold": 0
},
"publication": {
"status": "ACTIVE",
"endedBy": null
},
"external": {
"id": "DEMO-09"
}
},
{
"id": "900000000000010",
"name": "Produkt demo 10 – Gadżety kolekcjonerskie",
"category": {
"id": "321371",
"alleeId": 368
},
"
… (skrócono — pełna odpowiedź ma 12 KB)Oferty z brakującymi parametrami
GET /sale/offers/unfilled-parameters
zgodna z Allegroallegro:api:sale:offers:readlimit: read
Oferty, w których brakuje parametrów kategorii (wymaganych albo zalecanych) — uzupełnij je PATCH-em, by poprawić widoczność.
Zgodność: zgodna z Allegro REST API (ten sam kształt) — GET /sale/offers/unfilled-parameters.
Uprawnienie: zakres allegro:api:sale:offers:read.
Grupa limitu: read.
Parametry zapytania
offset integerIle pozycji pominąć.
limit integerIle pozycji zwrócić (1–1000, domyślnie 100).
offer.id array<string>Tylko te oferty.
parameterType stringRodzaj parametrów.
REQUIRED, NON_REQUIREDOdpowiedzi
200 Oferty i brakujące parametry. · UnfilledParametersList
offers array<object> zawszePola obiektu
id string zawszeparameters array<object> zawszePola obiektu
id string zawszealleeId integer zawszename string zawszerequired boolean zawszecount integer zawszetotalCount integer 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. |
curl -sS -X GET "${ALLEE_API_URL:-https://api.allee.pl}/sale/offers/unfilled-parameters?limit=20" \
-H "Authorization: Bearer $ALLEE_API_KEY" \
-H "Accept: application/vnd.allegro.public.v1+json" \
-w '\nHTTP %{http_code}\n'<?php
// allee API: GET /sale/offers/unfilled-parameters (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$ch = curl_init($base . '/sale/offers/unfilled-parameters?limit=20');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('ALLEE_API_KEY'),
'Accept: application/vnd.allegro.public.v1+json',
],
CURLOPT_RETURNTRANSFER => true,
]);
$odp = curl_exec($ch);
echo 'HTTP ', curl_getinfo($ch, CURLINFO_RESPONSE_CODE), "\n", $odp, "\n";# allee API: GET /sale/offers/unfilled-parameters (Python 3, biblioteka requests)
import os
import requests
BASE = os.environ.get("ALLEE_API_URL", "https://api.allee.pl")
headers = {
"Authorization": "Bearer " + os.environ["ALLEE_API_KEY"],
"Accept": "application/vnd.allegro.public.v1+json",
}
r = requests.request("GET", BASE + "/sale/offers/unfilled-parameters?limit=20", headers=headers, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: GET /sale/offers/unfilled-parameters (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const res = await fetch(`${BASE}/sale/offers/unfilled-parameters?limit=20`, {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.ALLEE_API_KEY}`,
"Accept": "application/vnd.allegro.public.v1+json",
},
redirect: "manual",
});
console.log("HTTP", res.status);
console.log(await res.text());// allee API: GET /sale/offers/unfilled-parameters (C#, .NET 8+, HttpClient)
using System.Net.Http.Headers;
using System.Text;
var baseUrl = Environment.GetEnvironmentVariable("ALLEE_API_URL") ?? "https://api.allee.pl";
using var http = new HttpClient(new HttpClientHandler { AllowAutoRedirect = false });
using var req = new HttpRequestMessage(new HttpMethod("GET"), baseUrl + "/sale/offers/unfilled-parameters?limit=20");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALLEE_API_KEY"));
req.Headers.Accept.ParseAdd("application/vnd.allegro.public.v1+json");
using var res = await http.SendAsync(req);
Console.WriteLine($"HTTP {(int)res.StatusCode}");
Console.WriteLine(await res.Content.ReadAsStringAsync());// allee API: GET /sale/offers/unfilled-parameters (Java 11+, java.net.http; uruchom: java Main.java)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String base = System.getenv().getOrDefault("ALLEE_API_URL", "https://api.allee.pl");
HttpRequest req = HttpRequest.newBuilder(URI.create(base + "/sale/offers/unfilled-parameters?limit=20"))
.header("Authorization", "Bearer " + System.getenv("ALLEE_API_KEY"))
.header("Accept", "application/vnd.allegro.public.v1+json")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpClient http = HttpClient.newBuilder().version(HttpClient.Version.HTTP_1_1).build();
HttpResponse<String> res = http.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println("HTTP " + res.statusCode());
System.out.println(res.body());
}
}// allee API: GET /sale/offers/unfilled-parameters (Go 1.20+, net/http; uruchom: go run main.go)
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
base := os.Getenv("ALLEE_API_URL")
if base == "" {
base = "https://api.allee.pl"
}
req, err := http.NewRequest("GET", base+"/sale/offers/unfilled-parameters?limit=20", 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{
"offers": [
{
"id": "900000000000001",
"parameters": [
{
"id": "225693",
"alleeId": 5967,
"name": "EAN (GTIN)",
"required": false
},
{
"id": "224017",
"alleeId": 5647,
"name": "Kod producenta",
"required": false
},
{
"id": "250792",
"alleeId": 11529,
"name": "Kod taryfy celnej",
"required": false
},
{
"id": "17448",
"alleeId": 811,
"name": "Waga produktu z opakowaniem jednostkowym",
"required": false
}
]
},
{
"id": "900000000000002",
"parameters": [
{
"id": "447",
"alleeId": 121,
"name": "Cykl rozwojowy rośliny",
"required": false
},
{
"id": "5187",
"alleeId": 354,
"name": "Czas sadzenia",
"required": false
},
{
"id": "229205",
"alleeId": 6525,
"name": "Stan opakowania",
"required": false
},
{
"id": "212686",
"alleeId": 3824,
"name": "Styl",
"required": false
},
{
"id": "247345",
"alleeId": 9062,
"name": "Cechy charakterystyczne",
"required": false
},
{
"id": "25548",
"alleeId": 1053,
"name": "Roślina w postaci",
"required": false
},
{
"id": "249248",
"alleeId": 10304,
"name": "Kraj",
"required": false
},
{
"id": "249410",
"alleeId": 10418,
"name": "Nazwa łacińska",
"required": false
},
{
"id": "225693",
"alleeId": 5967,
"name": "EAN (GTIN)",
"required": false
},
{
"id": "224017",
"alleeId": 5647,
"name": "Kod producenta",
"required": false
},
{
"id": "250792",
"alleeId": 11529,
"name": "Kod taryfy celnej",
"required": false
},
{
"id": "247632",
"alleeId": 9132,
"name": "Liczba sztuk w opakowaniu",
"required": false
},
{
"id": "249511",
"alleeId": 10488,
"name": "Numer paszportu (sekcja C)",
"required": false
},
{
"id": "17448",
"alleeId": 811,
"name": "Waga produktu z opakowaniem jednostkowym",
"required": false
}
]
},
{
"id": "900000000000003",
"parameters": [
{
"id": "447",
"alleeId": 121,
"name": "Cykl rozwojowy rośliny",
"required": false
},
{
"id": "229205",
"alleeId": 6525,
"name": "Stan opakowania",
"required": false
},
{
"id": "212686",
"alleeId": 3824,
"name": "Styl",
"required": false
},
{
"id": "247345",
"alleeId": 9062,
"name": "Cechy charakterystyczne",
"required": false
},
{
"id": "249248",
"alleeId": 10304,
"name": "Kraj",
"required": false
},
{
"id": "249410",
"alleeId": 10418,
"name": "Nazwa łacińska",
"required": false
},
{
"id": "225693",
"alleeId": 5967,
"name": "EAN (GTIN)",
"required": false
},
{
"id": "224017",
"alleeId": 5647,
"name": "Kod producenta",
"required": false
},
{
"id": "250792",
"alleeId": 11529,
"name": "Kod taryfy celnej",
"required": false
},
{
"id": "249511",
"alleeId": 10488,
"name": "Numer paszportu (sekcja C)",
"required": false
},
{
"id": "17448",
"alleeId": 811,
"name": "Waga produktu z opakowaniem jednostkowym",
"required": false
},
{
"id": "11865",
"alleeId": 699,
"name": "Wysokość sadzonki",
"required": false
}
]
},
{
"id": "900000000000004",
"parameters": [
{
"id": "229205",
"alleeId": 6525,
"name": "Stan opakowania",
"required": false
},
{
"id": "212686",
"alleeId": 3824,
"name": "Styl",
"required": false
},
{
"id": "247345",
"alleeId": 9062,
"name": "Cechy charakterystyczne",
"required": false
},
{
"id": "249248",
"alleeId": 10304,
"name": "Kraj",
"required": false
},
{
"id": "249410",
"alleeId": 10418,
"name": "Nazwa łacińska",
"required": false
},
{
"id": "248914",
"alleeId": 10076,
"name": "Producent",
"required": false
},
{
"id": "225693",
"alleeId": 5967,
"name": "EAN (GTIN)",
"required": false
},
{
"id": "224017",
"alleeId": 5647,
"name": "Kod producenta",
"required": false
},
{
"id": "250792",
"alleeId": 11529,
"name": "Kod taryfy celnej",
"required": false
},
{
"id": "249511",
"alleeId": 10488,
"name": "Numer paszportu (sekcja C)",
"required": false
},
{
"id": "17448",
"alleeId": 811,
"na
… (skrócono — pełna odpowiedź ma 34 KB)Czy oferta da się kupić
GET /sale/offers/{offerId}/buyability
tylko alleeallegro:api:sale:offers:readlimit: read
Problemy liczone z prawdziwego stanu oferty: nieaktywna, brak sztuk, brak GPSR, brak cennika.
Zgodność: tylko allee — Rozszerzenie allee.
Uprawnienie: zakres allegro:api:sale:offers:read.
Grupa limitu: read.
Parametry ścieżki
offerId string wymaganyIdentyfikator oferty (liczba w tekście).
Odpowiedzi
200 Wynik. · Buyability
buyable boolean zawszeCzy oferta da się teraz kupić.
problems array<object> zawszePola obiektu
code string zawszeOFFER_NOT_ACTIVE, OUT_OF_STOCK, RESPONSIBLE_PRODUCER_NOT_SPECIFIED, SAFETY_INFO_NOT_DEFINED, SHIPPING_RATES_NOT_FOUND, DELIVERY_NOT_CONFIGUREDmessage 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ę). |
| 404 | NOT_FOUND | Nie ma takiego zasobu (albo należy do innego sprzedawcy — dla wątków, zwrotów i spraw odpowiedź jest ta sama). |
| 429 | TOO_MANY_REQUESTS | Przekroczony limit (minutowy, grupy operacji albo IP). |
| 500 | INTERNAL_ERROR | Błąd serwera allee. |
curl -sS -X GET "${ALLEE_API_URL:-https://api.allee.pl}/sale/offers/900000000000021/buyability" \
-H "Authorization: Bearer $ALLEE_API_KEY" \
-H "Accept: application/vnd.allegro.public.v1+json" \
-w '\nHTTP %{http_code}\n'<?php
// allee API: GET /sale/offers/900000000000021/buyability (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$ch = curl_init($base . '/sale/offers/900000000000021/buyability');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('ALLEE_API_KEY'),
'Accept: application/vnd.allegro.public.v1+json',
],
CURLOPT_RETURNTRANSFER => true,
]);
$odp = curl_exec($ch);
echo 'HTTP ', curl_getinfo($ch, CURLINFO_RESPONSE_CODE), "\n", $odp, "\n";# allee API: GET /sale/offers/900000000000021/buyability (Python 3, biblioteka requests)
import os
import requests
BASE = os.environ.get("ALLEE_API_URL", "https://api.allee.pl")
headers = {
"Authorization": "Bearer " + os.environ["ALLEE_API_KEY"],
"Accept": "application/vnd.allegro.public.v1+json",
}
r = requests.request("GET", BASE + "/sale/offers/900000000000021/buyability", headers=headers, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: GET /sale/offers/900000000000021/buyability (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const res = await fetch(`${BASE}/sale/offers/900000000000021/buyability`, {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.ALLEE_API_KEY}`,
"Accept": "application/vnd.allegro.public.v1+json",
},
redirect: "manual",
});
console.log("HTTP", res.status);
console.log(await res.text());// allee API: GET /sale/offers/900000000000021/buyability (C#, .NET 8+, HttpClient)
using System.Net.Http.Headers;
using System.Text;
var baseUrl = Environment.GetEnvironmentVariable("ALLEE_API_URL") ?? "https://api.allee.pl";
using var http = new HttpClient(new HttpClientHandler { AllowAutoRedirect = false });
using var req = new HttpRequestMessage(new HttpMethod("GET"), baseUrl + "/sale/offers/900000000000021/buyability");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALLEE_API_KEY"));
req.Headers.Accept.ParseAdd("application/vnd.allegro.public.v1+json");
using var res = await http.SendAsync(req);
Console.WriteLine($"HTTP {(int)res.StatusCode}");
Console.WriteLine(await res.Content.ReadAsStringAsync());// allee API: GET /sale/offers/900000000000021/buyability (Java 11+, java.net.http; uruchom: java Main.java)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String base = System.getenv().getOrDefault("ALLEE_API_URL", "https://api.allee.pl");
HttpRequest req = HttpRequest.newBuilder(URI.create(base + "/sale/offers/900000000000021/buyability"))
.header("Authorization", "Bearer " + System.getenv("ALLEE_API_KEY"))
.header("Accept", "application/vnd.allegro.public.v1+json")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpClient http = HttpClient.newBuilder().version(HttpClient.Version.HTTP_1_1).build();
HttpResponse<String> res = http.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println("HTTP " + res.statusCode());
System.out.println(res.body());
}
}// allee API: GET /sale/offers/900000000000021/buyability (Go 1.20+, net/http; uruchom: go run main.go)
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
base := os.Getenv("ALLEE_API_URL")
if base == "" {
base = "https://api.allee.pl"
}
req, err := http.NewRequest("GET", base+"/sale/offers/900000000000021/buyability", 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{
"buyable": true,
"problems": []
}Usunięcie szkicu oferty
DELETE /sale/offers/{offerId}
zgodna z Allegroallegro:api:sale:offers:writelimit: write
Usuwa wyłącznie szkic, który nigdy nie był opublikowany. Ofertę opublikowaną kończysz poleceniem END → inaczej 409 OFFER_NOT_DRAFT.
Zgodność: zgodna z Allegro REST API (ten sam kształt) — DELETE /sale/offers/{offerId}.
Uprawnienie: zakres allegro:api:sale:offers:write.
Grupa limitu: write.
Parametry ścieżki
offerId string wymaganyIdentyfikator oferty (liczba w tekście).
Odpowiedzi
204 Usunięto.
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 | OFFER_NOT_DRAFT | Usuwać można tylko szkic nigdy nieopublikowany. |
| 429 | TOO_MANY_REQUESTS | Przekroczony limit (minutowy, grupy operacji albo IP). |
| 500 | INTERNAL_ERROR | Błąd serwera allee. |
curl -sS -X DELETE "${ALLEE_API_URL:-https://api.allee.pl}/sale/offers/900000000000022" \
-H "Authorization: Bearer $ALLEE_API_KEY" \
-H "Accept: application/vnd.allegro.public.v1+json" \
-w '\nHTTP %{http_code}\n'<?php
// allee API: DELETE /sale/offers/900000000000022 (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$ch = curl_init($base . '/sale/offers/900000000000022');
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 /sale/offers/900000000000022 (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 + "/sale/offers/900000000000022", headers=headers, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: DELETE /sale/offers/900000000000022 (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const res = await fetch(`${BASE}/sale/offers/900000000000022`, {
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 /sale/offers/900000000000022 (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 + "/sale/offers/900000000000022");
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 /sale/offers/900000000000022 (Java 11+, java.net.http; uruchom: java Main.java)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String base = System.getenv().getOrDefault("ALLEE_API_URL", "https://api.allee.pl");
HttpRequest req = HttpRequest.newBuilder(URI.create(base + "/sale/offers/900000000000022"))
.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 /sale/offers/900000000000022 (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+"/sale/offers/900000000000022", 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))
}text/html; charset=UTF-8(0 B: text/html; charset=UTF-8)Zdarzenia ofert
GET /sale/offer-events
Allegro + rozszerzeniaallegro:api:sale:offers:readlimit: read
Dziennik zmian Twoich ofert: aktywacja, zmiana, zakończenie, zmiana stanu i ceny. Bez from — ostatnie 24 h; dalej odpytuj z from = id ostatniego zdarzenia. Zdarzenia pojawiają się po 5 s.
allee.reason mówi, dlaczego allee zmieniło ofertę (MODERATION, EMPTY_STOCK, IMAGE_FAILED).
Zgodność: zgodna z Allegro REST API, z rozszerzeniami allee (pola allee.*, alleeId) — GET /sale/offer-events.
Uprawnienie: zakres allegro:api:sale:offers:read.
Grupa limitu: read.
Parametry zapytania
from stringKursor: zdarzenia po tym id.
limit integer1–1000.
type array<string>Filtr typów (powtórz parametr).
Odpowiedzi
200 Zdarzenia. · OfferEventList
offerEvents array<object> zawszePola obiektu
id string zawszeKursor zdarzenia (do parametru from).
type string zawszeOFFER_ACTIVATED, OFFER_CHANGED, OFFER_ENDED, OFFER_STOCK_CHANGED, OFFER_PRICE_CHANGED, OFFER_ARCHIVEDoccurredAt string · date-time zawszeoffer object zawszePola obiektu
id string zawszeexternal object · nullPola obiektu
id string zawszeallee objectPola obiektu
reason string · nullPowód zmiany nadany przez allee.
MODERATION, EMPTY_STOCK, IMAGE_FAILED, nullfrom string · nullto string · nullBłę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. |
curl -sS -X GET "${ALLEE_API_URL:-https://api.allee.pl}/sale/offer-events?type=OFFER_ACTIVATED&type=OFFER_PRICE_CHANGED&type=OFFER_STOCK_CHANGED&limit=100" \
-H "Authorization: Bearer $ALLEE_API_KEY" \
-H "Accept: application/vnd.allegro.public.v1+json" \
-w '\nHTTP %{http_code}\n'<?php
// allee API: GET /sale/offer-events (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$ch = curl_init($base . '/sale/offer-events?type=OFFER_ACTIVATED&type=OFFER_PRICE_CHANGED&type=OFFER_STOCK_CHANGED&limit=100');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('ALLEE_API_KEY'),
'Accept: application/vnd.allegro.public.v1+json',
],
CURLOPT_RETURNTRANSFER => true,
]);
$odp = curl_exec($ch);
echo 'HTTP ', curl_getinfo($ch, CURLINFO_RESPONSE_CODE), "\n", $odp, "\n";# allee API: GET /sale/offer-events (Python 3, biblioteka requests)
import os
import requests
BASE = os.environ.get("ALLEE_API_URL", "https://api.allee.pl")
headers = {
"Authorization": "Bearer " + os.environ["ALLEE_API_KEY"],
"Accept": "application/vnd.allegro.public.v1+json",
}
r = requests.request("GET", BASE + "/sale/offer-events?type=OFFER_ACTIVATED&type=OFFER_PRICE_CHANGED&type=OFFER_STOCK_CHANGED&limit=100", headers=headers, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: GET /sale/offer-events (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const res = await fetch(`${BASE}/sale/offer-events?type=OFFER_ACTIVATED&type=OFFER_PRICE_CHANGED&type=OFFER_STOCK_CHANGED&limit=100`, {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.ALLEE_API_KEY}`,
"Accept": "application/vnd.allegro.public.v1+json",
},
redirect: "manual",
});
console.log("HTTP", res.status);
console.log(await res.text());// allee API: GET /sale/offer-events (C#, .NET 8+, HttpClient)
using System.Net.Http.Headers;
using System.Text;
var baseUrl = Environment.GetEnvironmentVariable("ALLEE_API_URL") ?? "https://api.allee.pl";
using var http = new HttpClient(new HttpClientHandler { AllowAutoRedirect = false });
using var req = new HttpRequestMessage(new HttpMethod("GET"), baseUrl + "/sale/offer-events?type=OFFER_ACTIVATED&type=OFFER_PRICE_CHANGED&type=OFFER_STOCK_CHANGED&limit=100");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALLEE_API_KEY"));
req.Headers.Accept.ParseAdd("application/vnd.allegro.public.v1+json");
using var res = await http.SendAsync(req);
Console.WriteLine($"HTTP {(int)res.StatusCode}");
Console.WriteLine(await res.Content.ReadAsStringAsync());// allee API: GET /sale/offer-events (Java 11+, java.net.http; uruchom: java Main.java)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String base = System.getenv().getOrDefault("ALLEE_API_URL", "https://api.allee.pl");
HttpRequest req = HttpRequest.newBuilder(URI.create(base + "/sale/offer-events?type=OFFER_ACTIVATED&type=OFFER_PRICE_CHANGED&type=OFFER_STOCK_CHANGED&limit=100"))
.header("Authorization", "Bearer " + System.getenv("ALLEE_API_KEY"))
.header("Accept", "application/vnd.allegro.public.v1+json")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpClient http = HttpClient.newBuilder().version(HttpClient.Version.HTTP_1_1).build();
HttpResponse<String> res = http.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println("HTTP " + res.statusCode());
System.out.println(res.body());
}
}// allee API: GET /sale/offer-events (Go 1.20+, net/http; uruchom: go run main.go)
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
base := os.Getenv("ALLEE_API_URL")
if base == "" {
base = "https://api.allee.pl"
}
req, err := http.NewRequest("GET", base+"/sale/offer-events?type=OFFER_ACTIVATED&type=OFFER_PRICE_CHANGED&type=OFFER_STOCK_CHANGED&limit=100", 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{
"offerEvents": [
{
"id": "1",
"occurredAt": "2026-11-10T11:09:53.374Z",
"type": "OFFER_ACTIVATED",
"offer": {
"id": "900000000000001",
"external": {
"id": "DEMO-01"
}
},
"allee": {
"reason": null,
"from": null,
"to": "ACTIVE",
"source": "app"
}
},
{
"id": "2",
"occurredAt": "2026-11-10T11:09:53.382Z",
"type": "OFFER_ACTIVATED",
"offer": {
"id": "900000000000002",
"external": {
"id": "DEMO-02"
}
},
"allee": {
"reason": null,
"from": null,
"to": "ACTIVE",
"source": "app"
}
},
{
"id": "3",
"occurredAt": "2026-11-10T11:09:53.385Z",
"type": "OFFER_ACTIVATED",
"offer": {
"id": "900000000000003",
"external": {
"id": "DEMO-03"
}
},
"allee": {
"reason": null,
"from": null,
"to": "ACTIVE",
"source": "app"
}
},
{
"id": "4",
"occurredAt": "2026-11-10T11:09:53.387Z",
"type": "OFFER_ACTIVATED",
"offer": {
"id": "900000000000004",
"external": {
"id": "DEMO-04"
}
},
"allee": {
"reason": null,
"from": null,
"to": "ACTIVE",
"source": "app"
}
},
{
"id": "5",
"occurredAt": "2026-11-10T11:09:53.391Z",
"type": "OFFER_ACTIVATED",
"offer": {
"id": "900000000000005",
"external": {
"id": "DEMO-05"
}
},
"allee": {
"reason": null,
"from": null,
"to": "ACTIVE",
"source": "app"
}
},
{
"id": "6",
"occurredAt": "2026-11-10T11:09:53.398Z",
"type": "OFFER_ACTIVATED",
"offer": {
"id": "900000000000006",
"external": {
"id": "DEMO-06"
}
},
"allee": {
"reason": null,
"from": null,
"to": "ACTIVE",
"source": "app"
}
},
{
"id": "7",
"occurredAt": "2026-11-10T11:09:53.404Z",
"type": "OFFER_ACTIVATED",
"offer": {
"id": "900000000000007",
"external": {
"id": "DEMO-07"
}
},
"allee": {
"reason": null,
"from": null,
"to": "ACTIVE",
"source": "app"
}
},
{
"id": "8",
"occurredAt": "2026-11-10T11:09:53.413Z",
"type": "OFFER_ACTIVATED",
"offer": {
"id": "900000000000008",
"external": {
"id": "DEMO-08"
}
},
"allee": {
"reason": null,
"from": null,
"to": "ACTIVE",
"source": "app"
}
},
{
"id": "9",
"occurredAt": "2026-11-10T11:09:53.417Z",
"type": "OFFER_ACTIVATED",
"offer": {
"id": "900000000000009",
"external": {
"id": "DEMO-09"
}
},
"allee": {
"reason": null,
"from": null,
"to": "ACTIVE",
"source": "app"
}
},
{
"id": "10",
"occurredAt": "2026-11-10T11:09:53.420Z",
"type": "OFFER_ACTIVATED",
"offer": {
"id": "900000000000010",
"external": {
"id": "DEMO-10"
}
},
"allee": {
"reason": null,
"from": null,
"to": "ACTIVE",
"source": "app"
}
},
{
"id": "11",
"occurredAt": "2026-11-10T11:09:53.424Z",
"type": "OFFER_ACTIVATED",
"offer": {
"id": "900000000000011",
"external": {
"id": "DEMO-11"
}
},
"allee": {
"reason": null,
"from": null,
"to": "ACTIVE",
"source": "app"
}
},
{
"id": "12",
"occurredAt": "2026-11-10T11:09:53.429Z",
"type": "OFFER_ACTIVATED",
"offer": {
"id": "900000000000012",
"external": {
"id": "DEMO-12"
}
},
"allee": {
"reason": null,
"from": null,
"to": "ACTIVE",
"source": "app"
}
},
{
"id": "13",
"occurredAt": "2026-11-10T11:09:53.435Z",
"type": "OFFER_ACTIVATED",
"offer": {
"id": "900000000000013",
"external": {
"id": "DEMO-13"
}
},
"allee": {
"reason": null,
"from": null,
"to": "ACTIVE",
"source": "app"
}
},
{
"id": "14",
"occurredAt": "2026-11-10T11:09:53.441Z",
"type": "OFFER_ACTIVATED",
"offer": {
"id": "900000000000014",
"external": {
"id": "DEMO-14"
}
},
"allee": {
"reason": null,
"from": null,
"to": "ACTIVE",
"source": "app"
}
},
{
"id": "15",
"occurredAt": "2026-11-10T11:09:53.446Z",
"type": "OFFER_ACTIVATED",
"offer": {
"id": "900000000000015",
"external": {
"id": "DEMO-15"
}
},
"allee": {
"reason": null,
"from": null,
"to": "ACTIVE",
"source": "app"
}
},
{
"id": "16",
"occurredAt": "2026-11-10T11:09:53.451Z",
"type": "OFFER_ACTIVATED",
"offer": {
"id": "900000000000016",
"external": {
"id": "DEMO-16"
}
},
"allee": {
"reason": null,
"from": null,
"to": "ACTIVE",
"source": "app"
}
},
{
"id": "17",
"occurredAt": "2026-11-10T11:09:53.454Z",
"type": "OFFER_ACTIVATED",
"offer": {
"id": "900000000000017",
"external": {
"id": "DEMO-17"
}
},
"allee": {
"reason": null,
"from": null,
"to": "ACTIVE",
"source": "app"
}
},
{
"id": "18",
"occurredAt": "2026-11-10T11:09:53.457Z",
… (skrócono — pełna odpowiedź ma 7 KB)