Ustawienia sprzedaży
Domyślne ustawienia nowych ofert konta (cennik, zwroty, rękojmia, gwarancja, GPSR, czas wysyłki) — oferta, która ich nie podaje, dostaje je automatycznie. Od 26.11.2026.
Domyślne ustawienia nowych ofert
GET /allee/sellers/offer-defaults
tylko alleeallegro:api:sale:settings:readlimit: read
Cennik dostawy, zwroty, rękojmia, gwarancja, producent i osoba odpowiedzialna (GPSR), czas wysyłki i informacje o bezpieczeństwie ustawione raz dla konta. Oferta, która ich nie podaje (POST /sale/product-offers, PUT /allee/listings/{sku}, /allee/feeds), dostaje te wartości — podane w ofercie wygrywają.
Zgodność: tylko allee — — (allee; jak „domyślne” w panelu Allegro).
Uprawnienie: zakres allegro:api:sale:settings:read.
Grupa limitu: read.
Odpowiedzi
200 Ustawienia. · OfferDefaults
shippingRates IdRef · null zawszePola obiektu
id string zawszereturnPolicy IdRef · null zawszePola obiektu
id string zawszeimpliedWarranty IdRef · null zawszePola obiektu
id string zawszewarranty IdRef · null zawszePola obiektu
id string zawszeresponsibleProducer IdRef · null zawszePola obiektu
id string zawszeresponsiblePerson IdRef · null zawszePola obiektu
id string zawszehandlingTime string · null zawszeISO 8601, np. PT24H.
safetyInformation object · null zawszeallee object zawszePola obiektu
labels object zawszeusedWhenOfferOmits boolean zawszeBłędy
| HTTP | Kod | Znaczenie |
|---|---|---|
| 401 | invalid_token | Brak, zły, wygasły albo odwołany token lub klucz (format OAuth, nagłówek WWW-Authenticate). |
| 403 | ACCOUNT_INACTIVE | Konto sprzedawcy jest nieaktywne. |
| 403 | AccessDenied | Brak zakresu albo zasób innego sprzedawcy. |
| 403 | KEY_QUARANTINED | Kwarantanna: działa tylko odczyt (wykryto nietypowe użycie). |
| 403 | KEY_SUSPENDED | Klucz albo dostęp aplikacji wstrzymany (przez sprzedawcę albo ochronę). |
| 429 | TOO_MANY_REQUESTS | Przekroczony limit (minutowy, grupy operacji albo IP). |
| 500 | INTERNAL_ERROR | Błąd serwera allee. |
curl -sS -X GET "${ALLEE_API_URL:-https://api.allee.pl}/allee/sellers/offer-defaults" \
-H "Authorization: Bearer $ALLEE_API_KEY" \
-H "Accept: application/vnd.allegro.public.v1+json" \
-w '\nHTTP %{http_code}\n'<?php
// allee API: GET /allee/sellers/offer-defaults (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$ch = curl_init($base . '/allee/sellers/offer-defaults');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('ALLEE_API_KEY'),
'Accept: application/vnd.allegro.public.v1+json',
],
CURLOPT_RETURNTRANSFER => true,
]);
$odp = curl_exec($ch);
echo 'HTTP ', curl_getinfo($ch, CURLINFO_RESPONSE_CODE), "\n", $odp, "\n";# allee API: GET /allee/sellers/offer-defaults (Python 3, biblioteka requests)
import os
import requests
BASE = os.environ.get("ALLEE_API_URL", "https://api.allee.pl")
headers = {
"Authorization": "Bearer " + os.environ["ALLEE_API_KEY"],
"Accept": "application/vnd.allegro.public.v1+json",
}
r = requests.request("GET", BASE + "/allee/sellers/offer-defaults", headers=headers, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: GET /allee/sellers/offer-defaults (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const res = await fetch(`${BASE}/allee/sellers/offer-defaults`, {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.ALLEE_API_KEY}`,
"Accept": "application/vnd.allegro.public.v1+json",
},
redirect: "manual",
});
console.log("HTTP", res.status);
console.log(await res.text());// allee API: GET /allee/sellers/offer-defaults (C#, .NET 8+, HttpClient)
using System.Net.Http.Headers;
using System.Text;
var baseUrl = Environment.GetEnvironmentVariable("ALLEE_API_URL") ?? "https://api.allee.pl";
using var http = new HttpClient(new HttpClientHandler { AllowAutoRedirect = false });
using var req = new HttpRequestMessage(new HttpMethod("GET"), baseUrl + "/allee/sellers/offer-defaults");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALLEE_API_KEY"));
req.Headers.Accept.ParseAdd("application/vnd.allegro.public.v1+json");
using var res = await http.SendAsync(req);
Console.WriteLine($"HTTP {(int)res.StatusCode}");
Console.WriteLine(await res.Content.ReadAsStringAsync());// allee API: GET /allee/sellers/offer-defaults (Java 11+, java.net.http; uruchom: java Main.java)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String base = System.getenv().getOrDefault("ALLEE_API_URL", "https://api.allee.pl");
HttpRequest req = HttpRequest.newBuilder(URI.create(base + "/allee/sellers/offer-defaults"))
.header("Authorization", "Bearer " + System.getenv("ALLEE_API_KEY"))
.header("Accept", "application/vnd.allegro.public.v1+json")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpClient http = HttpClient.newBuilder().version(HttpClient.Version.HTTP_1_1).build();
HttpResponse<String> res = http.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println("HTTP " + res.statusCode());
System.out.println(res.body());
}
}// allee API: GET /allee/sellers/offer-defaults (Go 1.20+, net/http; uruchom: go run main.go)
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
base := os.Getenv("ALLEE_API_URL")
if base == "" {
base = "https://api.allee.pl"
}
req, err := http.NewRequest("GET", base+"/allee/sellers/offer-defaults", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("ALLEE_API_KEY"))
req.Header.Set("Accept", "application/vnd.allegro.public.v1+json")
klient := &http.Client{CheckRedirect: func(*http.Request, []*http.Request) error { return http.ErrUseLastResponse }}
res, err := klient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
dane, err := io.ReadAll(res.Body)
if err != nil {
panic(err)
}
fmt.Println("HTTP", res.StatusCode)
fmt.Println(string(dane))
}application/vnd.allegro.public.v1+json{
"shippingRates": {
"id": "c0d5f4be-8793-469d-8438-d1c097f622e5"
},
"returnPolicy": {
"id": "6e1c1b2a-3f4d-4e5f-8a9b-0c1d2e3f4a5b"
},
"impliedWarranty": {
"id": "7f2d2c3b-4a5e-4f6a-9b0c-1d2e3f4a5b6c"
},
"warranty": null,
"responsibleProducer": {
"id": "8a3e3d4c-5b6f-4a7b-8c1d-2e3f4a5b6c7d"
},
"responsiblePerson": null,
"handlingTime": "PT24H",
"safetyInformation": {
"type": "TEXT",
"description": "Przechowywać poza zasięgiem dzieci."
},
"allee": {
"labels": {
"shippingRates": "Kurier InPost"
},
"usedWhenOfferOmits": true
}
}Zmiana domyślnych ustawień ofert
PUT /allee/sellers/offer-defaults
tylko alleeallegro:api:sale:settings:writelimit: write
Tylko podane pola; null czyści wartość. Identyfikatory muszą należeć do konta i mieć właściwy rodzaj (cudzy/nieistniejący → 422 z path).
Zgodność: tylko allee.
Uprawnienie: zakres allegro:api:sale:settings:write.
Grupa limitu: write.
Treść żądania application/vnd.allegro.public.v1+json
shippingRates IdRef · nullPola obiektu
id string wymaganereturnPolicy IdRef · nullPola obiektu
id string wymaganeimpliedWarranty IdRef · nullPola obiektu
id string wymaganewarranty IdRef · nullPola obiektu
id string wymaganeresponsibleProducer IdRef · nullPola obiektu
id string wymaganeresponsiblePerson IdRef · nullPola obiektu
id string wymaganehandlingTime string · nullISO 8601, np. PT24H.
safetyInformation object · nullOdpowiedzi
200 Ustawienia po zmianie. · OfferDefaults
shippingRates IdRef · null zawszePola obiektu
id string zawszereturnPolicy IdRef · null zawszePola obiektu
id string zawszeimpliedWarranty IdRef · null zawszePola obiektu
id string zawszewarranty IdRef · null zawszePola obiektu
id string zawszeresponsibleProducer IdRef · null zawszePola obiektu
id string zawszeresponsiblePerson IdRef · null zawszePola obiektu
id string zawszehandlingTime string · null zawszeISO 8601, np. PT24H.
safetyInformation object · null zawszeallee object zawszePola obiektu
labels object zawszeusedWhenOfferOmits boolean 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ę). |
| 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_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}/allee/sellers/offer-defaults" \
-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'
{
"handlingTime": "PT24H"
}
JSON<?php
// allee API: PUT /allee/sellers/offer-defaults (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$body = [
'handlingTime' => 'PT24H',
];
$ch = curl_init($base . '/allee/sellers/offer-defaults');
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 /allee/sellers/offer-defaults (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 = {
"handlingTime": "PT24H",
}
r = requests.request("PUT", BASE + "/allee/sellers/offer-defaults", headers=headers, json=body, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: PUT /allee/sellers/offer-defaults (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const body = {
"handlingTime": "PT24H"
};
const res = await fetch(`${BASE}/allee/sellers/offer-defaults`, {
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 /allee/sellers/offer-defaults (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 + "/allee/sellers/offer-defaults");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALLEE_API_KEY"));
req.Headers.Accept.ParseAdd("application/vnd.allegro.public.v1+json");
var json = """
{
"handlingTime": "PT24H"
}
""";
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 /allee/sellers/offer-defaults (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 = """
{
"handlingTime": "PT24H"
}
""";
HttpRequest req = HttpRequest.newBuilder(URI.create(base + "/allee/sellers/offer-defaults"))
.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 /allee/sellers/offer-defaults (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 := `{
"handlingTime": "PT24H"
}`
req, err := http.NewRequest("PUT", base+"/allee/sellers/offer-defaults", 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{
"shippingRates": {
"id": "c0d5f4be-8793-469d-8438-d1c097f622e5"
},
"returnPolicy": {
"id": "6e1c1b2a-3f4d-4e5f-8a9b-0c1d2e3f4a5b"
},
"impliedWarranty": {
"id": "7f2d2c3b-4a5e-4f6a-9b0c-1d2e3f4a5b6c"
},
"warranty": null,
"responsibleProducer": {
"id": "8a3e3d4c-5b6f-4a7b-8c1d-2e3f4a5b6c7d"
},
"responsiblePerson": null,
"handlingTime": "PT24H",
"safetyInformation": {
"type": "TEXT",
"description": "Przechowywać poza zasięgiem dzieci."
},
"allee": {
"labels": {
"shippingRates": "Kurier InPost"
},
"usedWhenOfferOmits": true
}
}