Polecenia wsadowe
Zmiana ceny, liczby sztuk, ustawień i publikacji wielu ofert naraz.
- PUT
/sale/offer-quantity-change-commands/{commandId}— Polecenie zmiany liczby sztuk - GET
/sale/offer-quantity-change-commands/{commandId}— Wynik polecenia zmiany liczby sztuk - GET
/sale/offer-quantity-change-commands/{commandId}/tasks— Zadania polecenia zmiany liczby sztuk - PUT
/sale/offer-price-change-commands/{commandId}— Polecenie zmiany ceny - GET
/sale/offer-price-change-commands/{commandId}— Wynik polecenia zmiany ceny - GET
/sale/offer-price-change-commands/{commandId}/tasks— Zadania polecenia zmiany ceny - PUT
/sale/offer-modification-commands/{commandId}— Polecenie zmiany ustawień ofert - GET
/sale/offer-modification-commands/{commandId}— Wynik polecenia zmiany ustawień ofert - GET
/sale/offer-modification-commands/{commandId}/tasks— Zadania polecenia zmiany ustawień ofert - PUT
/sale/offer-publication-commands/{commandId}— Polecenie publikacji (ACTIVATE / END) - GET
/sale/offer-publication-commands/{commandId}— Wynik polecenia publikacji (ACTIVATE / END) - GET
/sale/offer-publication-commands/{commandId}/tasks— Zadania polecenia publikacji (ACTIVATE / END) - POST
/sale/offer-bulk-modification-commands— Wsad cen i stanów (kształt Allegro)
Polecenie zmiany liczby sztuk
PUT /sale/offer-quantity-change-commands/{commandId}
Allegro + rozszerzeniaallegro:api:sale:offers:writelimit: bulk
Do 1000 ofert (offerCriteria typu CONTAINS_OFFERS). allee wykonuje polecenie od razu: odpowiedź 201 ma ostateczne taskCount, a zadania mają statusy SUCCESS/FAIL (bez NEW/RUNNING).
Ten sam commandId w poleceniu innego rodzaju → 409 COMMAND_ID_CONFLICT. Oferta cudza albo nieistniejąca → zadanie FAIL (reszta się wykonuje). Błąd całego polecenia → 422 i nic się nie wykonuje.
Zgodność: zgodna z Allegro REST API, z rozszerzeniami allee (pola allee.*, alleeId) — PUT /sale/offer-quantity-change-commands/{commandId}.
Uprawnienie: zakres allegro:api:sale:offers:write.
Grupa limitu: bulk.
Parametry ścieżki
commandId string · uuid wymaganyTwój identyfikator polecenia (UUID) — powtórzony PUT zwraca zapisany wynik i niczego nie wykonuje drugi raz.
Treść żądania application/vnd.allegro.public.v1+json
modification object wymaganePola obiektu
changeType string wymaganeFIXED = ustaw, GAIN = dodaj (może być ujemne).
FIXED, GAINvalue integer wymaganeofferCriteria OfferCriteria wymaganeWybór ofert polecenia.
Pola obiektu
type string wymaganeCONTAINS_OFFERSoffers array<IdRef> wymaganeNajwyżej 1000 różnych ofert.
Pola obiektu
id string wymaganeOdpowiedzi
201 Wykonano. · CommandResult
id string · uuid zawszecommandId (UUID).
taskCount object zawszePola obiektu
total integer zawszesuccess integer zawszefailed integer zawszecreatedAt string · date-time 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ę). |
| 409 | COMMAND_ID_CONFLICT | Ten commandId użyto w poleceniu innego rodzaju albo u innego sprzedawcy. |
| 413 | PAYLOAD_TOO_LARGE | Treść żądania za duża (JSON 5 MB, faktura PDF 3 MB). |
| 415 | UNSUPPORTED_MEDIA_TYPE | Zły Content-Type treści. |
| 422 | JsonMappingException | Treść nie jest poprawnym JSON albo ma zły kształt (np. images jako obiekty). |
| 422 | VALIDATION_ERROR | Zła wartość parametru zapytania (400) albo pola treści (422); path wskazuje miejsce. |
| 429 | TOO_MANY_CONCURRENT | Za dużo ciężkich operacji naraz (wsady, raporty, duże polecenia). |
| 429 | TOO_MANY_REQUESTS | Przekroczony limit (minutowy, grupy operacji albo IP). |
| 500 | INTERNAL_ERROR | Błąd serwera allee. |
curl -sS -X PUT "${ALLEE_API_URL:-https://api.allee.pl}/sale/offer-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891" \
-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'
{
"modification": {
"changeType": "FIXED",
"value": 12
},
"offerCriteria": [
{
"type": "CONTAINS_OFFERS",
"offers": [
{
"id": "900000000000021"
}
]
}
]
}
JSON<?php
// allee API: PUT /sale/offer-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891 (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$body = [
'modification' => [
'changeType' => 'FIXED',
'value' => 12,
],
'offerCriteria' => [
[
'type' => 'CONTAINS_OFFERS',
'offers' => [
[
'id' => '900000000000021',
],
],
],
],
];
$ch = curl_init($base . '/sale/offer-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('ALLEE_API_KEY'),
'Accept: application/vnd.allegro.public.v1+json',
'Content-Type: application/vnd.allegro.public.v1+json',
],
CURLOPT_POSTFIELDS => json_encode($body, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES),
CURLOPT_RETURNTRANSFER => true,
]);
$odp = curl_exec($ch);
echo 'HTTP ', curl_getinfo($ch, CURLINFO_RESPONSE_CODE), "\n", $odp, "\n";# allee API: PUT /sale/offer-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891 (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 = {
"modification": {
"changeType": "FIXED",
"value": 12,
},
"offerCriteria": [
{
"type": "CONTAINS_OFFERS",
"offers": [
{
"id": "900000000000021",
},
],
},
],
}
r = requests.request("PUT", BASE + "/sale/offer-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891", headers=headers, json=body, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: PUT /sale/offer-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891 (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const body = {
"modification": {
"changeType": "FIXED",
"value": 12
},
"offerCriteria": [
{
"type": "CONTAINS_OFFERS",
"offers": [
{
"id": "900000000000021"
}
]
}
]
};
const res = await fetch(`${BASE}/sale/offer-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891`, {
method: "PUT",
headers: {
Authorization: `Bearer ${process.env.ALLEE_API_KEY}`,
"Accept": "application/vnd.allegro.public.v1+json",
"Content-Type": "application/vnd.allegro.public.v1+json",
},
body: JSON.stringify(body),
redirect: "manual",
});
console.log("HTTP", res.status);
console.log(await res.text());// allee API: PUT /sale/offer-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891 (C#, .NET 8+, HttpClient)
using System.Net.Http.Headers;
using System.Text;
var baseUrl = Environment.GetEnvironmentVariable("ALLEE_API_URL") ?? "https://api.allee.pl";
using var http = new HttpClient(new HttpClientHandler { AllowAutoRedirect = false });
using var req = new HttpRequestMessage(new HttpMethod("PUT"), baseUrl + "/sale/offer-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALLEE_API_KEY"));
req.Headers.Accept.ParseAdd("application/vnd.allegro.public.v1+json");
var json = """
{
"modification": {
"changeType": "FIXED",
"value": 12
},
"offerCriteria": [
{
"type": "CONTAINS_OFFERS",
"offers": [
{
"id": "900000000000021"
}
]
}
]
}
""";
req.Content = new StringContent(json, Encoding.UTF8);
req.Content.Headers.ContentType = new MediaTypeHeaderValue("application/vnd.allegro.public.v1+json");
using var res = await http.SendAsync(req);
Console.WriteLine($"HTTP {(int)res.StatusCode}");
Console.WriteLine(await res.Content.ReadAsStringAsync());// allee API: PUT /sale/offer-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891 (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 = """
{
"modification": {
"changeType": "FIXED",
"value": 12
},
"offerCriteria": [
{
"type": "CONTAINS_OFFERS",
"offers": [
{
"id": "900000000000021"
}
]
}
]
}
""";
HttpRequest req = HttpRequest.newBuilder(URI.create(base + "/sale/offer-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891"))
.header("Authorization", "Bearer " + System.getenv("ALLEE_API_KEY"))
.header("Accept", "application/vnd.allegro.public.v1+json")
.header("Content-Type", "application/vnd.allegro.public.v1+json")
.method("PUT", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpClient http = HttpClient.newBuilder().version(HttpClient.Version.HTTP_1_1).build();
HttpResponse<String> res = http.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println("HTTP " + res.statusCode());
System.out.println(res.body());
}
}// allee API: PUT /sale/offer-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891 (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 := `{
"modification": {
"changeType": "FIXED",
"value": 12
},
"offerCriteria": [
{
"type": "CONTAINS_OFFERS",
"offers": [
{
"id": "900000000000021"
}
]
}
]
}`
req, err := http.NewRequest("PUT", base+"/sale/offer-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891", 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": "ff689dde-05d2-451d-ad17-4673a2939891",
"taskCount": {
"total": 1,
"success": 1,
"failed": 0
},
"createdAt": "2026-11-10T11:10:04.415Z"
}Wynik polecenia zmiany liczby sztuk
GET /sale/offer-quantity-change-commands/{commandId}
zgodna z Allegroallegro:api:sale:offers:readlimit: read
Podsumowanie polecenia (liczniki zadań).
Zgodność: zgodna z Allegro REST API (ten sam kształt) — GET /sale/offer-quantity-change-commands/{commandId}.
Uprawnienie: zakres allegro:api:sale:offers:read.
Grupa limitu: read.
Parametry ścieżki
commandId string · uuid wymaganyTwój identyfikator polecenia (UUID) — powtórzony PUT zwraca zapisany wynik i niczego nie wykonuje drugi raz.
Odpowiedzi
200 Wynik. · CommandResult
id string · uuid zawszecommandId (UUID).
taskCount object zawszePola obiektu
total integer zawszesuccess integer zawszefailed integer zawszecreatedAt string · date-time 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/offer-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891" \
-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-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891 (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$ch = curl_init($base . '/sale/offer-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891');
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-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891 (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-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891", headers=headers, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: GET /sale/offer-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891 (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-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891`, {
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-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891 (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-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891");
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-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891 (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-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891"))
.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-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891 (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-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891", 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": "ff689dde-05d2-451d-ad17-4673a2939891",
"taskCount": {
"total": 1,
"success": 1,
"failed": 0
},
"createdAt": "2026-11-10T11:10:04.415Z"
}Zadania polecenia zmiany liczby sztuk
GET /sale/offer-quantity-change-commands/{commandId}/tasks
zgodna z Allegroallegro:api:sale:offers:readlimit: read
Wynik dla każdej oferty: SUCCESS albo FAIL z błędami.
Zgodność: zgodna z Allegro REST API (ten sam kształt) — GET /sale/offer-quantity-change-commands/{commandId}/tasks.
Uprawnienie: zakres allegro:api:sale:offers:read.
Grupa limitu: read.
Parametry ścieżki
commandId string · uuid wymaganyTwój identyfikator polecenia (UUID) — powtórzony PUT zwraca zapisany wynik i niczego nie wykonuje drugi raz.
Parametry zapytania
offset integerIle pozycji pominąć.
limit integerIle pozycji zwrócić (1–1000, domyślnie 100).
Odpowiedzi
200 Zadania. · CommandTaskList
tasks array<object> zawszePola obiektu
offer IdRef zawszeOdwołanie po identyfikatorze.
Pola obiektu
id string zawszestatus string zawszeSUCCESS, FAILmessage string zawszeerrors array<Error> zawszePola 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.
finishedAt string · date-time 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ę). |
| 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/offer-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891/tasks?limit=100&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/offer-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891/tasks (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$ch = curl_init($base . '/sale/offer-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891/tasks?limit=100&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/offer-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891/tasks (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-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891/tasks?limit=100&offset=0", headers=headers, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: GET /sale/offer-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891/tasks (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-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891/tasks?limit=100&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/offer-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891/tasks (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-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891/tasks?limit=100&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/offer-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891/tasks (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-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891/tasks?limit=100&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/offer-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891/tasks (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-quantity-change-commands/ff689dde-05d2-451d-ad17-4673a2939891/tasks?limit=100&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{
"tasks": [
{
"offer": {
"id": "900000000000021"
},
"status": "SUCCESS",
"message": "Zmieniono.",
"errors": [],
"finishedAt": "2026-11-10T11:10:04.415Z"
}
]
}Polecenie zmiany ceny
PUT /sale/offer-price-change-commands/{commandId}
Allegro + rozszerzeniaallegro:api:sale:offers:writelimit: bulk
Do 1000 ofert (offerCriteria typu CONTAINS_OFFERS). allee wykonuje polecenie od razu: odpowiedź 201 ma ostateczne taskCount, a zadania mają statusy SUCCESS/FAIL (bez NEW/RUNNING).
Ten sam commandId w poleceniu innego rodzaju → 409 COMMAND_ID_CONFLICT. Oferta cudza albo nieistniejąca → zadanie FAIL (reszta się wykonuje). Błąd całego polecenia → 422 i nic się nie wykonuje.
Zgodność: zgodna z Allegro REST API, z rozszerzeniami allee (pola allee.*, alleeId) — PUT /sale/offer-price-change-commands/{commandId}.
Uprawnienie: zakres allegro:api:sale:offers:write.
Grupa limitu: bulk.
Parametry ścieżki
commandId string · uuid wymaganyTwój identyfikator polecenia (UUID) — powtórzony PUT zwraca zapisany wynik i niczego nie wykonuje drugi raz.
Treść żądania application/vnd.allegro.public.v1+json
modification object wymaganePola obiektu
type string wymaganeFIXED_PRICEprice MoneyInput wymaganeKwota w żądaniu.
Pola obiektu
amount string|number wymaganeKwota jako tekst „123.45” (zalecane) albo liczba.
currency stringWaluta: tylko PLN (domyślnie PLN).
PLNofferCriteria OfferCriteria wymaganeWybór ofert polecenia.
Pola obiektu
type string wymaganeCONTAINS_OFFERSoffers array<IdRef> wymaganeNajwyżej 1000 różnych ofert.
Pola obiektu
id string wymaganeOdpowiedzi
201 Wykonano. · CommandResult
id string · uuid zawszecommandId (UUID).
taskCount object zawszePola obiektu
total integer zawszesuccess integer zawszefailed integer zawszecreatedAt string · date-time 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ę). |
| 409 | COMMAND_ID_CONFLICT | Ten commandId użyto w poleceniu innego rodzaju albo u innego sprzedawcy. |
| 413 | PAYLOAD_TOO_LARGE | Treść żądania za duża (JSON 5 MB, faktura PDF 3 MB). |
| 415 | UNSUPPORTED_MEDIA_TYPE | Zły Content-Type treści. |
| 422 | JsonMappingException | Treść nie jest poprawnym JSON albo ma zły kształt (np. images jako obiekty). |
| 422 | VALIDATION_ERROR | Zła wartość parametru zapytania (400) albo pola treści (422); path wskazuje miejsce. |
| 429 | TOO_MANY_CONCURRENT | Za dużo ciężkich operacji naraz (wsady, raporty, duże polecenia). |
| 429 | TOO_MANY_REQUESTS | Przekroczony limit (minutowy, grupy operacji albo IP). |
| 500 | INTERNAL_ERROR | Błąd serwera allee. |
curl -sS -X PUT "${ALLEE_API_URL:-https://api.allee.pl}/sale/offer-price-change-commands/12e4b766-0096-4404-9546-167845ebb846" \
-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'
{
"modification": {
"type": "FIXED_PRICE",
"price": {
"amount": "42.90",
"currency": "PLN"
}
},
"offerCriteria": [
{
"type": "CONTAINS_OFFERS",
"offers": [
{
"id": "900000000000021"
}
]
}
]
}
JSON<?php
// allee API: PUT /sale/offer-price-change-commands/12e4b766-0096-4404-9546-167845ebb846 (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$body = [
'modification' => [
'type' => 'FIXED_PRICE',
'price' => [
'amount' => '42.90',
'currency' => 'PLN',
],
],
'offerCriteria' => [
[
'type' => 'CONTAINS_OFFERS',
'offers' => [
[
'id' => '900000000000021',
],
],
],
],
];
$ch = curl_init($base . '/sale/offer-price-change-commands/12e4b766-0096-4404-9546-167845ebb846');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('ALLEE_API_KEY'),
'Accept: application/vnd.allegro.public.v1+json',
'Content-Type: application/vnd.allegro.public.v1+json',
],
CURLOPT_POSTFIELDS => json_encode($body, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES),
CURLOPT_RETURNTRANSFER => true,
]);
$odp = curl_exec($ch);
echo 'HTTP ', curl_getinfo($ch, CURLINFO_RESPONSE_CODE), "\n", $odp, "\n";# allee API: PUT /sale/offer-price-change-commands/12e4b766-0096-4404-9546-167845ebb846 (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 = {
"modification": {
"type": "FIXED_PRICE",
"price": {
"amount": "42.90",
"currency": "PLN",
},
},
"offerCriteria": [
{
"type": "CONTAINS_OFFERS",
"offers": [
{
"id": "900000000000021",
},
],
},
],
}
r = requests.request("PUT", BASE + "/sale/offer-price-change-commands/12e4b766-0096-4404-9546-167845ebb846", headers=headers, json=body, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: PUT /sale/offer-price-change-commands/12e4b766-0096-4404-9546-167845ebb846 (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const body = {
"modification": {
"type": "FIXED_PRICE",
"price": {
"amount": "42.90",
"currency": "PLN"
}
},
"offerCriteria": [
{
"type": "CONTAINS_OFFERS",
"offers": [
{
"id": "900000000000021"
}
]
}
]
};
const res = await fetch(`${BASE}/sale/offer-price-change-commands/12e4b766-0096-4404-9546-167845ebb846`, {
method: "PUT",
headers: {
Authorization: `Bearer ${process.env.ALLEE_API_KEY}`,
"Accept": "application/vnd.allegro.public.v1+json",
"Content-Type": "application/vnd.allegro.public.v1+json",
},
body: JSON.stringify(body),
redirect: "manual",
});
console.log("HTTP", res.status);
console.log(await res.text());// allee API: PUT /sale/offer-price-change-commands/12e4b766-0096-4404-9546-167845ebb846 (C#, .NET 8+, HttpClient)
using System.Net.Http.Headers;
using System.Text;
var baseUrl = Environment.GetEnvironmentVariable("ALLEE_API_URL") ?? "https://api.allee.pl";
using var http = new HttpClient(new HttpClientHandler { AllowAutoRedirect = false });
using var req = new HttpRequestMessage(new HttpMethod("PUT"), baseUrl + "/sale/offer-price-change-commands/12e4b766-0096-4404-9546-167845ebb846");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALLEE_API_KEY"));
req.Headers.Accept.ParseAdd("application/vnd.allegro.public.v1+json");
var json = """
{
"modification": {
"type": "FIXED_PRICE",
"price": {
"amount": "42.90",
"currency": "PLN"
}
},
"offerCriteria": [
{
"type": "CONTAINS_OFFERS",
"offers": [
{
"id": "900000000000021"
}
]
}
]
}
""";
req.Content = new StringContent(json, Encoding.UTF8);
req.Content.Headers.ContentType = new MediaTypeHeaderValue("application/vnd.allegro.public.v1+json");
using var res = await http.SendAsync(req);
Console.WriteLine($"HTTP {(int)res.StatusCode}");
Console.WriteLine(await res.Content.ReadAsStringAsync());// allee API: PUT /sale/offer-price-change-commands/12e4b766-0096-4404-9546-167845ebb846 (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 = """
{
"modification": {
"type": "FIXED_PRICE",
"price": {
"amount": "42.90",
"currency": "PLN"
}
},
"offerCriteria": [
{
"type": "CONTAINS_OFFERS",
"offers": [
{
"id": "900000000000021"
}
]
}
]
}
""";
HttpRequest req = HttpRequest.newBuilder(URI.create(base + "/sale/offer-price-change-commands/12e4b766-0096-4404-9546-167845ebb846"))
.header("Authorization", "Bearer " + System.getenv("ALLEE_API_KEY"))
.header("Accept", "application/vnd.allegro.public.v1+json")
.header("Content-Type", "application/vnd.allegro.public.v1+json")
.method("PUT", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpClient http = HttpClient.newBuilder().version(HttpClient.Version.HTTP_1_1).build();
HttpResponse<String> res = http.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println("HTTP " + res.statusCode());
System.out.println(res.body());
}
}// allee API: PUT /sale/offer-price-change-commands/12e4b766-0096-4404-9546-167845ebb846 (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 := `{
"modification": {
"type": "FIXED_PRICE",
"price": {
"amount": "42.90",
"currency": "PLN"
}
},
"offerCriteria": [
{
"type": "CONTAINS_OFFERS",
"offers": [
{
"id": "900000000000021"
}
]
}
]
}`
req, err := http.NewRequest("PUT", base+"/sale/offer-price-change-commands/12e4b766-0096-4404-9546-167845ebb846", 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": "12e4b766-0096-4404-9546-167845ebb846",
"taskCount": {
"total": 1,
"success": 1,
"failed": 0
},
"createdAt": "2026-11-10T11:10:04.426Z"
}Wynik polecenia zmiany ceny
GET /sale/offer-price-change-commands/{commandId}
zgodna z Allegroallegro:api:sale:offers:readlimit: read
Podsumowanie polecenia (liczniki zadań).
Zgodność: zgodna z Allegro REST API (ten sam kształt) — GET /sale/offer-price-change-commands/{commandId}.
Uprawnienie: zakres allegro:api:sale:offers:read.
Grupa limitu: read.
Parametry ścieżki
commandId string · uuid wymaganyTwój identyfikator polecenia (UUID) — powtórzony PUT zwraca zapisany wynik i niczego nie wykonuje drugi raz.
Odpowiedzi
200 Wynik. · CommandResult
id string · uuid zawszecommandId (UUID).
taskCount object zawszePola obiektu
total integer zawszesuccess integer zawszefailed integer zawszecreatedAt string · date-time 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/offer-price-change-commands/12e4b766-0096-4404-9546-167845ebb846" \
-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-price-change-commands/12e4b766-0096-4404-9546-167845ebb846 (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$ch = curl_init($base . '/sale/offer-price-change-commands/12e4b766-0096-4404-9546-167845ebb846');
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-price-change-commands/12e4b766-0096-4404-9546-167845ebb846 (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-price-change-commands/12e4b766-0096-4404-9546-167845ebb846", headers=headers, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: GET /sale/offer-price-change-commands/12e4b766-0096-4404-9546-167845ebb846 (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-price-change-commands/12e4b766-0096-4404-9546-167845ebb846`, {
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-price-change-commands/12e4b766-0096-4404-9546-167845ebb846 (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-price-change-commands/12e4b766-0096-4404-9546-167845ebb846");
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-price-change-commands/12e4b766-0096-4404-9546-167845ebb846 (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-price-change-commands/12e4b766-0096-4404-9546-167845ebb846"))
.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-price-change-commands/12e4b766-0096-4404-9546-167845ebb846 (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-price-change-commands/12e4b766-0096-4404-9546-167845ebb846", 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": "12e4b766-0096-4404-9546-167845ebb846",
"taskCount": {
"total": 1,
"success": 1,
"failed": 0
},
"createdAt": "2026-11-10T11:10:04.426Z"
}Zadania polecenia zmiany ceny
GET /sale/offer-price-change-commands/{commandId}/tasks
zgodna z Allegroallegro:api:sale:offers:readlimit: read
Wynik dla każdej oferty: SUCCESS albo FAIL z błędami.
Zgodność: zgodna z Allegro REST API (ten sam kształt) — GET /sale/offer-price-change-commands/{commandId}/tasks.
Uprawnienie: zakres allegro:api:sale:offers:read.
Grupa limitu: read.
Parametry ścieżki
commandId string · uuid wymaganyTwój identyfikator polecenia (UUID) — powtórzony PUT zwraca zapisany wynik i niczego nie wykonuje drugi raz.
Parametry zapytania
offset integerIle pozycji pominąć.
limit integerIle pozycji zwrócić (1–1000, domyślnie 100).
Odpowiedzi
200 Zadania. · CommandTaskList
tasks array<object> zawszePola obiektu
offer IdRef zawszeOdwołanie po identyfikatorze.
Pola obiektu
id string zawszestatus string zawszeSUCCESS, FAILmessage string zawszeerrors array<Error> zawszePola 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.
finishedAt string · date-time 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ę). |
| 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/offer-price-change-commands/12e4b766-0096-4404-9546-167845ebb846/tasks" \
-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-price-change-commands/12e4b766-0096-4404-9546-167845ebb846/tasks (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$ch = curl_init($base . '/sale/offer-price-change-commands/12e4b766-0096-4404-9546-167845ebb846/tasks');
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-price-change-commands/12e4b766-0096-4404-9546-167845ebb846/tasks (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-price-change-commands/12e4b766-0096-4404-9546-167845ebb846/tasks", headers=headers, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: GET /sale/offer-price-change-commands/12e4b766-0096-4404-9546-167845ebb846/tasks (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-price-change-commands/12e4b766-0096-4404-9546-167845ebb846/tasks`, {
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-price-change-commands/12e4b766-0096-4404-9546-167845ebb846/tasks (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-price-change-commands/12e4b766-0096-4404-9546-167845ebb846/tasks");
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-price-change-commands/12e4b766-0096-4404-9546-167845ebb846/tasks (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-price-change-commands/12e4b766-0096-4404-9546-167845ebb846/tasks"))
.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-price-change-commands/12e4b766-0096-4404-9546-167845ebb846/tasks (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-price-change-commands/12e4b766-0096-4404-9546-167845ebb846/tasks", 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{
"tasks": [
{
"offer": {
"id": "900000000000021"
},
"status": "SUCCESS",
"message": "Zmieniono.",
"errors": [],
"finishedAt": "2026-11-10T11:10:04.426Z"
}
]
}Polecenie zmiany ustawień ofert
PUT /sale/offer-modification-commands/{commandId}
Allegro + rozszerzeniaallegro:api:sale:offers:writelimit: bulk
Do 1000 ofert (offerCriteria typu CONTAINS_OFFERS). allee wykonuje polecenie od razu: odpowiedź 201 ma ostateczne taskCount, a zadania mają statusy SUCCESS/FAIL (bez NEW/RUNNING).
Ten sam commandId w poleceniu innego rodzaju → 409 COMMAND_ID_CONFLICT. Oferta cudza albo nieistniejąca → zadanie FAIL (reszta się wykonuje). Błąd całego polecenia → 422 i nic się nie wykonuje.
Zmieniane pola: tylko delivery (handlingTime, shippingRates) i afterSalesServices.
Zgodność: zgodna z Allegro REST API, z rozszerzeniami allee (pola allee.*, alleeId) — PUT /sale/offer-modification-commands/{commandId}.
Uprawnienie: zakres allegro:api:sale:offers:write.
Grupa limitu: bulk.
Parametry ścieżki
commandId string · uuid wymaganyTwój identyfikator polecenia (UUID) — powtórzony PUT zwraca zapisany wynik i niczego nie wykonuje drugi raz.
Treść żądania application/vnd.allegro.public.v1+json
modification object wymaganeTylko delivery i afterSalesServices (inne pole → zadanie FAIL UnknownJSONProperty).
Pola obiektu
delivery objectPola obiektu
handlingTime stringshippingRates IdRefOdwołanie po identyfikatorze.
Pola obiektu
id string wymaganeafterSalesServices objectPola obiektu
returnPolicy IdRef · nullPola obiektu
id string wymaganewarranty IdRef · nullPola obiektu
id string wymaganeimpliedWarranty IdRef · nullPola obiektu
id string wymaganeofferCriteria OfferCriteria wymaganeWybór ofert polecenia.
Pola obiektu
type string wymaganeCONTAINS_OFFERSoffers array<IdRef> wymaganeNajwyżej 1000 różnych ofert.
Pola obiektu
id string wymaganeOdpowiedzi
201 Wykonano. · CommandResult
id string · uuid zawszecommandId (UUID).
taskCount object zawszePola obiektu
total integer zawszesuccess integer zawszefailed integer zawszecreatedAt string · date-time 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ę). |
| 409 | COMMAND_ID_CONFLICT | Ten commandId użyto w poleceniu innego rodzaju albo u innego sprzedawcy. |
| 413 | PAYLOAD_TOO_LARGE | Treść żądania za duża (JSON 5 MB, faktura PDF 3 MB). |
| 415 | UNSUPPORTED_MEDIA_TYPE | Zły Content-Type treści. |
| 422 | JsonMappingException | Treść nie jest poprawnym JSON albo ma zły kształt (np. images jako obiekty). |
| 422 | VALIDATION_ERROR | Zła wartość parametru zapytania (400) albo pola treści (422); path wskazuje miejsce. |
| 429 | TOO_MANY_CONCURRENT | Za dużo ciężkich operacji naraz (wsady, raporty, duże polecenia). |
| 429 | TOO_MANY_REQUESTS | Przekroczony limit (minutowy, grupy operacji albo IP). |
| 500 | INTERNAL_ERROR | Błąd serwera allee. |
curl -sS -X PUT "${ALLEE_API_URL:-https://api.allee.pl}/sale/offer-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced" \
-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'
{
"modification": {
"delivery": {
"handlingTime": "P2D"
},
"afterSalesServices": {
"warranty": {
"id": "5be961ca-7c55-4d2a-9332-93d58877d4a2"
}
}
},
"offerCriteria": [
{
"type": "CONTAINS_OFFERS",
"offers": [
{
"id": "900000000000021"
}
]
}
]
}
JSON<?php
// allee API: PUT /sale/offer-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$body = [
'modification' => [
'delivery' => [
'handlingTime' => 'P2D',
],
'afterSalesServices' => [
'warranty' => [
'id' => '5be961ca-7c55-4d2a-9332-93d58877d4a2',
],
],
],
'offerCriteria' => [
[
'type' => 'CONTAINS_OFFERS',
'offers' => [
[
'id' => '900000000000021',
],
],
],
],
];
$ch = curl_init($base . '/sale/offer-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('ALLEE_API_KEY'),
'Accept: application/vnd.allegro.public.v1+json',
'Content-Type: application/vnd.allegro.public.v1+json',
],
CURLOPT_POSTFIELDS => json_encode($body, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES),
CURLOPT_RETURNTRANSFER => true,
]);
$odp = curl_exec($ch);
echo 'HTTP ', curl_getinfo($ch, CURLINFO_RESPONSE_CODE), "\n", $odp, "\n";# allee API: PUT /sale/offer-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced (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 = {
"modification": {
"delivery": {
"handlingTime": "P2D",
},
"afterSalesServices": {
"warranty": {
"id": "5be961ca-7c55-4d2a-9332-93d58877d4a2",
},
},
},
"offerCriteria": [
{
"type": "CONTAINS_OFFERS",
"offers": [
{
"id": "900000000000021",
},
],
},
],
}
r = requests.request("PUT", BASE + "/sale/offer-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced", headers=headers, json=body, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: PUT /sale/offer-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const body = {
"modification": {
"delivery": {
"handlingTime": "P2D"
},
"afterSalesServices": {
"warranty": {
"id": "5be961ca-7c55-4d2a-9332-93d58877d4a2"
}
}
},
"offerCriteria": [
{
"type": "CONTAINS_OFFERS",
"offers": [
{
"id": "900000000000021"
}
]
}
]
};
const res = await fetch(`${BASE}/sale/offer-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced`, {
method: "PUT",
headers: {
Authorization: `Bearer ${process.env.ALLEE_API_KEY}`,
"Accept": "application/vnd.allegro.public.v1+json",
"Content-Type": "application/vnd.allegro.public.v1+json",
},
body: JSON.stringify(body),
redirect: "manual",
});
console.log("HTTP", res.status);
console.log(await res.text());// allee API: PUT /sale/offer-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced (C#, .NET 8+, HttpClient)
using System.Net.Http.Headers;
using System.Text;
var baseUrl = Environment.GetEnvironmentVariable("ALLEE_API_URL") ?? "https://api.allee.pl";
using var http = new HttpClient(new HttpClientHandler { AllowAutoRedirect = false });
using var req = new HttpRequestMessage(new HttpMethod("PUT"), baseUrl + "/sale/offer-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALLEE_API_KEY"));
req.Headers.Accept.ParseAdd("application/vnd.allegro.public.v1+json");
var json = """
{
"modification": {
"delivery": {
"handlingTime": "P2D"
},
"afterSalesServices": {
"warranty": {
"id": "5be961ca-7c55-4d2a-9332-93d58877d4a2"
}
}
},
"offerCriteria": [
{
"type": "CONTAINS_OFFERS",
"offers": [
{
"id": "900000000000021"
}
]
}
]
}
""";
req.Content = new StringContent(json, Encoding.UTF8);
req.Content.Headers.ContentType = new MediaTypeHeaderValue("application/vnd.allegro.public.v1+json");
using var res = await http.SendAsync(req);
Console.WriteLine($"HTTP {(int)res.StatusCode}");
Console.WriteLine(await res.Content.ReadAsStringAsync());// allee API: PUT /sale/offer-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced (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 = """
{
"modification": {
"delivery": {
"handlingTime": "P2D"
},
"afterSalesServices": {
"warranty": {
"id": "5be961ca-7c55-4d2a-9332-93d58877d4a2"
}
}
},
"offerCriteria": [
{
"type": "CONTAINS_OFFERS",
"offers": [
{
"id": "900000000000021"
}
]
}
]
}
""";
HttpRequest req = HttpRequest.newBuilder(URI.create(base + "/sale/offer-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced"))
.header("Authorization", "Bearer " + System.getenv("ALLEE_API_KEY"))
.header("Accept", "application/vnd.allegro.public.v1+json")
.header("Content-Type", "application/vnd.allegro.public.v1+json")
.method("PUT", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpClient http = HttpClient.newBuilder().version(HttpClient.Version.HTTP_1_1).build();
HttpResponse<String> res = http.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println("HTTP " + res.statusCode());
System.out.println(res.body());
}
}// allee API: PUT /sale/offer-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced (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 := `{
"modification": {
"delivery": {
"handlingTime": "P2D"
},
"afterSalesServices": {
"warranty": {
"id": "5be961ca-7c55-4d2a-9332-93d58877d4a2"
}
}
},
"offerCriteria": [
{
"type": "CONTAINS_OFFERS",
"offers": [
{
"id": "900000000000021"
}
]
}
]
}`
req, err := http.NewRequest("PUT", base+"/sale/offer-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced", 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": "47e71c9d-d10c-4f7e-b9b8-14d98b923ced",
"taskCount": {
"total": 1,
"success": 1,
"failed": 0
},
"createdAt": "2026-11-10T11:10:04.436Z"
}Wynik polecenia zmiany ustawień ofert
GET /sale/offer-modification-commands/{commandId}
zgodna z Allegroallegro:api:sale:offers:readlimit: read
Podsumowanie polecenia (liczniki zadań).
Zgodność: zgodna z Allegro REST API (ten sam kształt) — GET /sale/offer-modification-commands/{commandId}.
Uprawnienie: zakres allegro:api:sale:offers:read.
Grupa limitu: read.
Parametry ścieżki
commandId string · uuid wymaganyTwój identyfikator polecenia (UUID) — powtórzony PUT zwraca zapisany wynik i niczego nie wykonuje drugi raz.
Odpowiedzi
200 Wynik. · CommandResult
id string · uuid zawszecommandId (UUID).
taskCount object zawszePola obiektu
total integer zawszesuccess integer zawszefailed integer zawszecreatedAt string · date-time 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/offer-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced" \
-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-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$ch = curl_init($base . '/sale/offer-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced');
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-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced (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-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced", headers=headers, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: GET /sale/offer-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced (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-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced`, {
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-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced (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-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced");
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-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced (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-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced"))
.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-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced (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-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced", 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": "47e71c9d-d10c-4f7e-b9b8-14d98b923ced",
"taskCount": {
"total": 1,
"success": 1,
"failed": 0
},
"createdAt": "2026-11-10T11:10:04.436Z"
}Zadania polecenia zmiany ustawień ofert
GET /sale/offer-modification-commands/{commandId}/tasks
zgodna z Allegroallegro:api:sale:offers:readlimit: read
Wynik dla każdej oferty: SUCCESS albo FAIL z błędami.
Zgodność: zgodna z Allegro REST API (ten sam kształt) — GET /sale/offer-modification-commands/{commandId}/tasks.
Uprawnienie: zakres allegro:api:sale:offers:read.
Grupa limitu: read.
Parametry ścieżki
commandId string · uuid wymaganyTwój identyfikator polecenia (UUID) — powtórzony PUT zwraca zapisany wynik i niczego nie wykonuje drugi raz.
Parametry zapytania
offset integerIle pozycji pominąć.
limit integerIle pozycji zwrócić (1–1000, domyślnie 100).
Odpowiedzi
200 Zadania. · CommandTaskList
tasks array<object> zawszePola obiektu
offer IdRef zawszeOdwołanie po identyfikatorze.
Pola obiektu
id string zawszestatus string zawszeSUCCESS, FAILmessage string zawszeerrors array<Error> zawszePola 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.
finishedAt string · date-time 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ę). |
| 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/offer-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced/tasks" \
-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-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced/tasks (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$ch = curl_init($base . '/sale/offer-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced/tasks');
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-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced/tasks (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-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced/tasks", headers=headers, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: GET /sale/offer-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced/tasks (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-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced/tasks`, {
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-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced/tasks (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-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced/tasks");
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-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced/tasks (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-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced/tasks"))
.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-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced/tasks (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-modification-commands/47e71c9d-d10c-4f7e-b9b8-14d98b923ced/tasks", 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{
"tasks": [
{
"offer": {
"id": "900000000000021"
},
"status": "SUCCESS",
"message": "Zmieniono.",
"errors": [],
"finishedAt": "2026-11-10T11:10:04.436Z"
}
]
}Polecenie publikacji (ACTIVATE / END)
PUT /sale/offer-publication-commands/{commandId}
Allegro + rozszerzeniaallegro:api:sale:offers:writelimit: bulk
Do 1000 ofert (offerCriteria typu CONTAINS_OFFERS). allee wykonuje polecenie od razu: odpowiedź 201 ma ostateczne taskCount, a zadania mają statusy SUCCESS/FAIL (bez NEW/RUNNING).
Ten sam commandId w poleceniu innego rodzaju → 409 COMMAND_ID_CONFLICT. Oferta cudza albo nieistniejąca → zadanie FAIL (reszta się wykonuje). Błąd całego polecenia → 422 i nic się nie wykonuje.
END: aktywna → ENDED (szkicu nie kończymy — zadanie FAIL INVALID_STATUS_TRANSITION). ACTIVATE: wymaga GPSR, zdjęcia i sztuk.
Zgodność: zgodna z Allegro REST API, z rozszerzeniami allee (pola allee.*, alleeId) — PUT /sale/offer-publication-commands/{commandId}.
Uprawnienie: zakres allegro:api:sale:offers:write.
Grupa limitu: bulk.
Parametry ścieżki
commandId string · uuid wymaganyTwój identyfikator polecenia (UUID) — powtórzony PUT zwraca zapisany wynik i niczego nie wykonuje drugi raz.
Treść żądania application/vnd.allegro.public.v1+json
publication object wymaganePola obiektu
action string wymaganeACTIVATE, ENDofferCriteria OfferCriteria wymaganeWybór ofert polecenia.
Pola obiektu
type string wymaganeCONTAINS_OFFERSoffers array<IdRef> wymaganeNajwyżej 1000 różnych ofert.
Pola obiektu
id string wymaganeOdpowiedzi
201 Wykonano. · CommandResult
id string · uuid zawszecommandId (UUID).
taskCount object zawszePola obiektu
total integer zawszesuccess integer zawszefailed integer zawszecreatedAt string · date-time 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ę). |
| 409 | COMMAND_ID_CONFLICT | Ten commandId użyto w poleceniu innego rodzaju albo u innego sprzedawcy. |
| 413 | PAYLOAD_TOO_LARGE | Treść żądania za duża (JSON 5 MB, faktura PDF 3 MB). |
| 415 | UNSUPPORTED_MEDIA_TYPE | Zły Content-Type treści. |
| 422 | JsonMappingException | Treść nie jest poprawnym JSON albo ma zły kształt (np. images jako obiekty). |
| 422 | VALIDATION_ERROR | Zła wartość parametru zapytania (400) albo pola treści (422); path wskazuje miejsce. |
| 429 | TOO_MANY_CONCURRENT | Za dużo ciężkich operacji naraz (wsady, raporty, duże polecenia). |
| 429 | TOO_MANY_REQUESTS | Przekroczony limit (minutowy, grupy operacji albo IP). |
| 500 | INTERNAL_ERROR | Błąd serwera allee. |
curl -sS -X PUT "${ALLEE_API_URL:-https://api.allee.pl}/sale/offer-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e" \
-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'
{
"publication": {
"action": "END"
},
"offerCriteria": [
{
"type": "CONTAINS_OFFERS",
"offers": [
{
"id": "900000000000021"
}
]
}
]
}
JSON<?php
// allee API: PUT /sale/offer-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$body = [
'publication' => [
'action' => 'END',
],
'offerCriteria' => [
[
'type' => 'CONTAINS_OFFERS',
'offers' => [
[
'id' => '900000000000021',
],
],
],
],
];
$ch = curl_init($base . '/sale/offer-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('ALLEE_API_KEY'),
'Accept: application/vnd.allegro.public.v1+json',
'Content-Type: application/vnd.allegro.public.v1+json',
],
CURLOPT_POSTFIELDS => json_encode($body, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES),
CURLOPT_RETURNTRANSFER => true,
]);
$odp = curl_exec($ch);
echo 'HTTP ', curl_getinfo($ch, CURLINFO_RESPONSE_CODE), "\n", $odp, "\n";# allee API: PUT /sale/offer-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e (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 = {
"publication": {
"action": "END",
},
"offerCriteria": [
{
"type": "CONTAINS_OFFERS",
"offers": [
{
"id": "900000000000021",
},
],
},
],
}
r = requests.request("PUT", BASE + "/sale/offer-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e", headers=headers, json=body, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: PUT /sale/offer-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const body = {
"publication": {
"action": "END"
},
"offerCriteria": [
{
"type": "CONTAINS_OFFERS",
"offers": [
{
"id": "900000000000021"
}
]
}
]
};
const res = await fetch(`${BASE}/sale/offer-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e`, {
method: "PUT",
headers: {
Authorization: `Bearer ${process.env.ALLEE_API_KEY}`,
"Accept": "application/vnd.allegro.public.v1+json",
"Content-Type": "application/vnd.allegro.public.v1+json",
},
body: JSON.stringify(body),
redirect: "manual",
});
console.log("HTTP", res.status);
console.log(await res.text());// allee API: PUT /sale/offer-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e (C#, .NET 8+, HttpClient)
using System.Net.Http.Headers;
using System.Text;
var baseUrl = Environment.GetEnvironmentVariable("ALLEE_API_URL") ?? "https://api.allee.pl";
using var http = new HttpClient(new HttpClientHandler { AllowAutoRedirect = false });
using var req = new HttpRequestMessage(new HttpMethod("PUT"), baseUrl + "/sale/offer-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALLEE_API_KEY"));
req.Headers.Accept.ParseAdd("application/vnd.allegro.public.v1+json");
var json = """
{
"publication": {
"action": "END"
},
"offerCriteria": [
{
"type": "CONTAINS_OFFERS",
"offers": [
{
"id": "900000000000021"
}
]
}
]
}
""";
req.Content = new StringContent(json, Encoding.UTF8);
req.Content.Headers.ContentType = new MediaTypeHeaderValue("application/vnd.allegro.public.v1+json");
using var res = await http.SendAsync(req);
Console.WriteLine($"HTTP {(int)res.StatusCode}");
Console.WriteLine(await res.Content.ReadAsStringAsync());// allee API: PUT /sale/offer-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e (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 = """
{
"publication": {
"action": "END"
},
"offerCriteria": [
{
"type": "CONTAINS_OFFERS",
"offers": [
{
"id": "900000000000021"
}
]
}
]
}
""";
HttpRequest req = HttpRequest.newBuilder(URI.create(base + "/sale/offer-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e"))
.header("Authorization", "Bearer " + System.getenv("ALLEE_API_KEY"))
.header("Accept", "application/vnd.allegro.public.v1+json")
.header("Content-Type", "application/vnd.allegro.public.v1+json")
.method("PUT", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpClient http = HttpClient.newBuilder().version(HttpClient.Version.HTTP_1_1).build();
HttpResponse<String> res = http.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println("HTTP " + res.statusCode());
System.out.println(res.body());
}
}// allee API: PUT /sale/offer-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e (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 := `{
"publication": {
"action": "END"
},
"offerCriteria": [
{
"type": "CONTAINS_OFFERS",
"offers": [
{
"id": "900000000000021"
}
]
}
]
}`
req, err := http.NewRequest("PUT", base+"/sale/offer-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e", 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": "c4ef5910-5a7e-4eec-bc50-54280523053e",
"taskCount": {
"total": 1,
"success": 1,
"failed": 0
},
"createdAt": "2026-11-10T11:10:04.445Z"
}Przykład: Wznowienie oferty (ACTIVATE)
curl -sS -X PUT "${ALLEE_API_URL:-https://api.allee.pl}/sale/offer-publication-commands/4a962451-036c-48e0-8f59-bca89121ab73" \
-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'
{
"publication": {
"action": "ACTIVATE"
},
"offerCriteria": [
{
"type": "CONTAINS_OFFERS",
"offers": [
{
"id": "900000000000021"
}
]
}
]
}
JSON<?php
// allee API: PUT /sale/offer-publication-commands/4a962451-036c-48e0-8f59-bca89121ab73 (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$body = [
'publication' => [
'action' => 'ACTIVATE',
],
'offerCriteria' => [
[
'type' => 'CONTAINS_OFFERS',
'offers' => [
[
'id' => '900000000000021',
],
],
],
],
];
$ch = curl_init($base . '/sale/offer-publication-commands/4a962451-036c-48e0-8f59-bca89121ab73');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('ALLEE_API_KEY'),
'Accept: application/vnd.allegro.public.v1+json',
'Content-Type: application/vnd.allegro.public.v1+json',
],
CURLOPT_POSTFIELDS => json_encode($body, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES),
CURLOPT_RETURNTRANSFER => true,
]);
$odp = curl_exec($ch);
echo 'HTTP ', curl_getinfo($ch, CURLINFO_RESPONSE_CODE), "\n", $odp, "\n";# allee API: PUT /sale/offer-publication-commands/4a962451-036c-48e0-8f59-bca89121ab73 (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 = {
"publication": {
"action": "ACTIVATE",
},
"offerCriteria": [
{
"type": "CONTAINS_OFFERS",
"offers": [
{
"id": "900000000000021",
},
],
},
],
}
r = requests.request("PUT", BASE + "/sale/offer-publication-commands/4a962451-036c-48e0-8f59-bca89121ab73", headers=headers, json=body, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: PUT /sale/offer-publication-commands/4a962451-036c-48e0-8f59-bca89121ab73 (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const body = {
"publication": {
"action": "ACTIVATE"
},
"offerCriteria": [
{
"type": "CONTAINS_OFFERS",
"offers": [
{
"id": "900000000000021"
}
]
}
]
};
const res = await fetch(`${BASE}/sale/offer-publication-commands/4a962451-036c-48e0-8f59-bca89121ab73`, {
method: "PUT",
headers: {
Authorization: `Bearer ${process.env.ALLEE_API_KEY}`,
"Accept": "application/vnd.allegro.public.v1+json",
"Content-Type": "application/vnd.allegro.public.v1+json",
},
body: JSON.stringify(body),
redirect: "manual",
});
console.log("HTTP", res.status);
console.log(await res.text());// allee API: PUT /sale/offer-publication-commands/4a962451-036c-48e0-8f59-bca89121ab73 (C#, .NET 8+, HttpClient)
using System.Net.Http.Headers;
using System.Text;
var baseUrl = Environment.GetEnvironmentVariable("ALLEE_API_URL") ?? "https://api.allee.pl";
using var http = new HttpClient(new HttpClientHandler { AllowAutoRedirect = false });
using var req = new HttpRequestMessage(new HttpMethod("PUT"), baseUrl + "/sale/offer-publication-commands/4a962451-036c-48e0-8f59-bca89121ab73");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALLEE_API_KEY"));
req.Headers.Accept.ParseAdd("application/vnd.allegro.public.v1+json");
var json = """
{
"publication": {
"action": "ACTIVATE"
},
"offerCriteria": [
{
"type": "CONTAINS_OFFERS",
"offers": [
{
"id": "900000000000021"
}
]
}
]
}
""";
req.Content = new StringContent(json, Encoding.UTF8);
req.Content.Headers.ContentType = new MediaTypeHeaderValue("application/vnd.allegro.public.v1+json");
using var res = await http.SendAsync(req);
Console.WriteLine($"HTTP {(int)res.StatusCode}");
Console.WriteLine(await res.Content.ReadAsStringAsync());// allee API: PUT /sale/offer-publication-commands/4a962451-036c-48e0-8f59-bca89121ab73 (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 = """
{
"publication": {
"action": "ACTIVATE"
},
"offerCriteria": [
{
"type": "CONTAINS_OFFERS",
"offers": [
{
"id": "900000000000021"
}
]
}
]
}
""";
HttpRequest req = HttpRequest.newBuilder(URI.create(base + "/sale/offer-publication-commands/4a962451-036c-48e0-8f59-bca89121ab73"))
.header("Authorization", "Bearer " + System.getenv("ALLEE_API_KEY"))
.header("Accept", "application/vnd.allegro.public.v1+json")
.header("Content-Type", "application/vnd.allegro.public.v1+json")
.method("PUT", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpClient http = HttpClient.newBuilder().version(HttpClient.Version.HTTP_1_1).build();
HttpResponse<String> res = http.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println("HTTP " + res.statusCode());
System.out.println(res.body());
}
}// allee API: PUT /sale/offer-publication-commands/4a962451-036c-48e0-8f59-bca89121ab73 (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 := `{
"publication": {
"action": "ACTIVATE"
},
"offerCriteria": [
{
"type": "CONTAINS_OFFERS",
"offers": [
{
"id": "900000000000021"
}
]
}
]
}`
req, err := http.NewRequest("PUT", base+"/sale/offer-publication-commands/4a962451-036c-48e0-8f59-bca89121ab73", 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": "4a962451-036c-48e0-8f59-bca89121ab73",
"taskCount": {
"total": 1,
"success": 1,
"failed": 0
},
"createdAt": "2026-11-10T11:10:04.454Z"
}Wynik polecenia publikacji (ACTIVATE / END)
GET /sale/offer-publication-commands/{commandId}
zgodna z Allegroallegro:api:sale:offers:readlimit: read
Podsumowanie polecenia (liczniki zadań).
Zgodność: zgodna z Allegro REST API (ten sam kształt) — GET /sale/offer-publication-commands/{commandId}.
Uprawnienie: zakres allegro:api:sale:offers:read.
Grupa limitu: read.
Parametry ścieżki
commandId string · uuid wymaganyTwój identyfikator polecenia (UUID) — powtórzony PUT zwraca zapisany wynik i niczego nie wykonuje drugi raz.
Odpowiedzi
200 Wynik. · CommandResult
id string · uuid zawszecommandId (UUID).
taskCount object zawszePola obiektu
total integer zawszesuccess integer zawszefailed integer zawszecreatedAt string · date-time 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/offer-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e" \
-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-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$ch = curl_init($base . '/sale/offer-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e');
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-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e (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-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e", headers=headers, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: GET /sale/offer-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e (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-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e`, {
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-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e (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-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e");
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-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e (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-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e"))
.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-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e (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-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e", 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": "c4ef5910-5a7e-4eec-bc50-54280523053e",
"taskCount": {
"total": 1,
"success": 1,
"failed": 0
},
"createdAt": "2026-11-10T11:10:04.445Z"
}Zadania polecenia publikacji (ACTIVATE / END)
GET /sale/offer-publication-commands/{commandId}/tasks
zgodna z Allegroallegro:api:sale:offers:readlimit: read
Wynik dla każdej oferty: SUCCESS albo FAIL z błędami.
Zgodność: zgodna z Allegro REST API (ten sam kształt) — GET /sale/offer-publication-commands/{commandId}/tasks.
Uprawnienie: zakres allegro:api:sale:offers:read.
Grupa limitu: read.
Parametry ścieżki
commandId string · uuid wymaganyTwój identyfikator polecenia (UUID) — powtórzony PUT zwraca zapisany wynik i niczego nie wykonuje drugi raz.
Parametry zapytania
offset integerIle pozycji pominąć.
limit integerIle pozycji zwrócić (1–1000, domyślnie 100).
Odpowiedzi
200 Zadania. · CommandTaskList
tasks array<object> zawszePola obiektu
offer IdRef zawszeOdwołanie po identyfikatorze.
Pola obiektu
id string zawszestatus string zawszeSUCCESS, FAILmessage string zawszeerrors array<Error> zawszePola 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.
finishedAt string · date-time 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ę). |
| 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/offer-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e/tasks" \
-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-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e/tasks (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$ch = curl_init($base . '/sale/offer-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e/tasks');
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-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e/tasks (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-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e/tasks", headers=headers, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: GET /sale/offer-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e/tasks (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-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e/tasks`, {
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-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e/tasks (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-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e/tasks");
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-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e/tasks (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-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e/tasks"))
.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-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e/tasks (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-publication-commands/c4ef5910-5a7e-4eec-bc50-54280523053e/tasks", 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{
"tasks": [
{
"offer": {
"id": "900000000000021"
},
"status": "SUCCESS",
"message": "Oferta zakończona.",
"errors": [],
"finishedAt": "2026-11-10T11:10:04.445Z"
}
]
}Wsad cen i stanów (kształt Allegro)
POST /sale/offer-bulk-modification-commands
tylko alleeallegro:api:sale:offers:writelimit: bulk
Ceny i liczby sztuk wielu ofert (do 10 000) w kształcie zbliżonym do poleceń Allegro: ofertę wskazujesz przez id albo external.id (SKU). Pod spodem to wsad PARTIAL_UPDATE — odpowiedź jak POST /allee/feeds.
Zgodność: tylko allee — allee: alias wsadu JSON_LISTINGS_FEED.
Uprawnienie: zakres allegro:api:sale:offers:write.
Grupa limitu: bulk.
Nagłówki
Idempotency-Key stringOchrona przed podwójnym wykonaniem (jak Stripe/Amazon): powtórzony POST z tym samym kluczem i tą samą treścią w ciągu 24 h zwraca zapisaną odpowiedź z nagłówkiem Idempotent-Replayed: true i niczego nie wykonuje drugi raz. Inna treść → 422 IDEMPOTENCY_KEY_REUSED; żądanie jeszcze trwa → 409 IDEMPOTENCY_KEY_IN_USE. 1–100 znaków ASCII (np. UUID).
Treść żądania application/vnd.allegro.public.v1+json
offers array<object> wymaganeDo 10 000 pozycji.
Pola obiektu
id stringId oferty.
external objectPola obiektu
id string wymaganeSKU.
sellingMode objectPola obiektu
price MoneyInput wymaganeKwota 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 wymaganeOdpowiedzi
202 Przyjęto. · Feed
feedId string · uuid zawszefeedType string zawszeJSON_LISTINGS_FEEDmarketplaceIds array<string> zawszecreatedTime string · date-time zawszeprocessingStatus string zawszeIN_QUEUE, IN_PROGRESS, DONE, CANCELLED, FATALprocessingStartTime string · date-time · null zawszeprocessingEndTime string · date-time · null zawszeresultFeedDocumentId string · null zawszeGdy DONE: wynik pod GET /allee/feeds/{feedId}/result.
allee object zawszePola obiektu
source string zawszeSkąd wsad: treść żądania, dokument, polecenie wsadowe Allegro.
INLINE, DOKUMENT, POLECENIEmessages object zawszePola obiektu
total integer zawszeprocessed integer zawszeaccepted integer zawszeinvalid integer zawszewithWarnings integer zawszefatalError string · null zawszePowód przerwania całego wsadu (FATAL).
Błędy
| HTTP | Kod | Znaczenie |
|---|---|---|
| 401 | invalid_token | Brak, zły, wygasły albo odwołany token lub klucz (format OAuth, nagłówek WWW-Authenticate). |
| 403 | ACCOUNT_INACTIVE | Konto sprzedawcy jest nieaktywne. |
| 403 | AccessDenied | Brak zakresu albo zasób innego sprzedawcy. |
| 403 | KEY_QUARANTINED | Kwarantanna: działa tylko odczyt (wykryto nietypowe użycie). |
| 403 | KEY_SUSPENDED | Klucz albo dostęp aplikacji wstrzymany (przez sprzedawcę albo ochronę). |
| 413 | PAYLOAD_TOO_LARGE | Treść żądania za duża (JSON 5 MB, faktura PDF 3 MB). |
| 415 | UNSUPPORTED_MEDIA_TYPE | Zły Content-Type treści. |
| 422 | JsonMappingException | Treść nie jest poprawnym JSON albo ma zły kształt (np. images jako obiekty). |
| 422 | UnknownJSONProperty | Pole nieznane w tym miejscu (path wskazuje które). |
| 422 | VALIDATION_ERROR | Zła wartość parametru zapytania (400) albo pola treści (422); path wskazuje miejsce. |
| 429 | TOO_MANY_CONCURRENT | Za dużo ciężkich operacji naraz (wsady, raporty, duże polecenia). |
| 429 | TOO_MANY_REQUESTS | Przekroczony limit (minutowy, grupy operacji albo IP). |
| 500 | INTERNAL_ERROR | Błąd serwera allee. |
| 503 | NOT_DEPLOYED | Funkcja jeszcze nie uruchomiona (np. sandbox, wsady). |
| 503 | QUEUE_UNAVAILABLE | Kolejka wsadów chwilowo nie działa. |
curl -sS -X POST "${ALLEE_API_URL:-https://api.allee.pl}/sale/offer-bulk-modification-commands" \
-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'
{
"offers": [
{
"external": {
"id": "FILM-21ef85-5"
},
"sellingMode": {
"price": {
"amount": "39.90",
"currency": "PLN"
}
},
"stock": {
"available": 20
}
},
{
"external": {
"id": "FILM-21ef85-6"
},
"stock": {
"available": 18
}
}
]
}
JSON<?php
// allee API: POST /sale/offer-bulk-modification-commands (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$body = [
'offers' => [
[
'external' => [
'id' => 'FILM-21ef85-5',
],
'sellingMode' => [
'price' => [
'amount' => '39.90',
'currency' => 'PLN',
],
],
'stock' => [
'available' => 20,
],
],
[
'external' => [
'id' => 'FILM-21ef85-6',
],
'stock' => [
'available' => 18,
],
],
],
];
$ch = curl_init($base . '/sale/offer-bulk-modification-commands');
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/offer-bulk-modification-commands (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 = {
"offers": [
{
"external": {
"id": "FILM-21ef85-5",
},
"sellingMode": {
"price": {
"amount": "39.90",
"currency": "PLN",
},
},
"stock": {
"available": 20,
},
},
{
"external": {
"id": "FILM-21ef85-6",
},
"stock": {
"available": 18,
},
},
],
}
r = requests.request("POST", BASE + "/sale/offer-bulk-modification-commands", headers=headers, json=body, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: POST /sale/offer-bulk-modification-commands (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const body = {
"offers": [
{
"external": {
"id": "FILM-21ef85-5"
},
"sellingMode": {
"price": {
"amount": "39.90",
"currency": "PLN"
}
},
"stock": {
"available": 20
}
},
{
"external": {
"id": "FILM-21ef85-6"
},
"stock": {
"available": 18
}
}
]
};
const res = await fetch(`${BASE}/sale/offer-bulk-modification-commands`, {
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/offer-bulk-modification-commands (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/offer-bulk-modification-commands");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALLEE_API_KEY"));
req.Headers.Accept.ParseAdd("application/vnd.allegro.public.v1+json");
var json = """
{
"offers": [
{
"external": {
"id": "FILM-21ef85-5"
},
"sellingMode": {
"price": {
"amount": "39.90",
"currency": "PLN"
}
},
"stock": {
"available": 20
}
},
{
"external": {
"id": "FILM-21ef85-6"
},
"stock": {
"available": 18
}
}
]
}
""";
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/offer-bulk-modification-commands (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 = """
{
"offers": [
{
"external": {
"id": "FILM-21ef85-5"
},
"sellingMode": {
"price": {
"amount": "39.90",
"currency": "PLN"
}
},
"stock": {
"available": 20
}
},
{
"external": {
"id": "FILM-21ef85-6"
},
"stock": {
"available": 18
}
}
]
}
""";
HttpRequest req = HttpRequest.newBuilder(URI.create(base + "/sale/offer-bulk-modification-commands"))
.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/offer-bulk-modification-commands (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 := `{
"offers": [
{
"external": {
"id": "FILM-21ef85-5"
},
"sellingMode": {
"price": {
"amount": "39.90",
"currency": "PLN"
}
},
"stock": {
"available": 20
}
},
{
"external": {
"id": "FILM-21ef85-6"
},
"stock": {
"available": 18
}
}
]
}`
req, err := http.NewRequest("POST", base+"/sale/offer-bulk-modification-commands", strings.NewReader(body))
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("ALLEE_API_KEY"))
req.Header.Set("Accept", "application/vnd.allegro.public.v1+json")
req.Header.Set("Content-Type", "application/vnd.allegro.public.v1+json")
klient := &http.Client{CheckRedirect: func(*http.Request, []*http.Request) error { return http.ErrUseLastResponse }}
res, err := klient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
dane, err := io.ReadAll(res.Body)
if err != nil {
panic(err)
}
fmt.Println("HTTP", res.StatusCode)
fmt.Println(string(dane))
}application/vnd.allegro.public.v1+json{
"feedId": "bc37f1f9-1e46-4824-a7e1-3e298893f79e",
"feedType": "JSON_LISTINGS_FEED",
"marketplaceIds": [
"allee-pl"
],
"createdTime": "2026-11-10T11:10:05.392Z",
"processingStatus": "DONE",
"processingStartTime": "2026-11-10T11:10:05.397Z",
"processingEndTime": "2026-11-10T11:10:05.404Z",
"resultFeedDocumentId": "bc37f1f9-1e46-4824-a7e1-3e298893f79e",
"allee": {
"source": "POLECENIE",
"messages": {
"total": 2,
"processed": 2,
"accepted": 2,
"invalid": 0,
"withWarnings": 0
},
"fatalError": null
}
}