Opłaty
Podgląd opłat za wystawienie i prowizji.
Podgląd opłat oferty
POST /pricing/offer-fee-preview
Allegro + rozszerzeniaallegro:api:sale:offers:readlimit: read
Opłata za wystawienie i prowizja dla istniejącej oferty (offer.id) albo dla danych nowej oferty (sellingMode, stock). Ta sama funkcja licząca co formularz wystawiania.
Zgodność: zgodna z Allegro REST API, z rozszerzeniami allee (pola allee.*, alleeId) — POST /pricing/offer-fee-preview.
Uprawnienie: zakres allegro:api:sale:offers:read.
Grupa limitu: read.
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
offer object wymaganePola obiektu
id stringsellingMode objectPola obiektu
format stringBUY_NOWprice 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 wymaganemarketplaceId stringallee-plclassifiedsPackages anyBez skutku (allee nie ma ogłoszeń płatnych).
Odpowiedzi
200 Opłaty. · FeePreview
commissions array<object> zawszePola obiektu
name string zawszetype string zawszefee Money zawszeKwota (kształt Allegro).
Pola obiektu
amount string zawszeKwota z dwoma miejscami po przecinku, kropka dziesiętna.
currency string zawszeWaluta (allee.pl: tylko PLN).
PLNquotes array<object> zawszePola obiektu
name string zawszetype string zawszefee Money zawszeKwota (kształt Allegro).
Pola obiektu
amount string zawszeKwota z dwoma miejscami po przecinku, kropka dziesiętna.
currency string zawszeWaluta (allee.pl: tylko PLN).
PLNcycleDuration string · null zawszeallee object zawszePola obiektu
total Money zawszeKwota (kształt Allegro).
Pola obiektu
amount string zawszeKwota z dwoma miejscami po przecinku, kropka dziesiętna.
currency string zawszeWaluta (allee.pl: tylko PLN).
PLNfeeScheduleVersion string zawszeWersja cennika opłat.
note string zawszeBłędy
| HTTP | Kod | Znaczenie |
|---|---|---|
| 401 | invalid_token | Brak, zły, wygasły albo odwołany token lub klucz (format OAuth, nagłówek WWW-Authenticate). |
| 403 | ACCOUNT_INACTIVE | Konto sprzedawcy jest nieaktywne. |
| 403 | AccessDenied | Brak zakresu albo zasób innego sprzedawcy. |
| 403 | KEY_QUARANTINED | Kwarantanna: działa tylko odczyt (wykryto nietypowe użycie). |
| 403 | KEY_SUSPENDED | Klucz albo dostęp aplikacji wstrzymany (przez sprzedawcę albo ochronę). |
| 413 | PAYLOAD_TOO_LARGE | Treść żądania za duża (JSON 5 MB, faktura PDF 3 MB). |
| 415 | UNSUPPORTED_MEDIA_TYPE | Zły Content-Type treści. |
| 422 | JsonMappingException | Treść nie jest poprawnym JSON albo ma zły kształt (np. images jako obiekty). |
| 422 | UnknownJSONProperty | Pole nieznane w tym miejscu (path wskazuje które). |
| 422 | VALIDATION_ERROR | Zła wartość parametru zapytania (400) albo pola treści (422); path wskazuje miejsce. |
| 429 | TOO_MANY_REQUESTS | Przekroczony limit (minutowy, grupy operacji albo IP). |
| 500 | INTERNAL_ERROR | Błąd serwera allee. |
curl -sS -X POST "${ALLEE_API_URL:-https://api.allee.pl}/pricing/offer-fee-preview" \
-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'
{
"offer": {
"id": "900000000000021"
}
}
JSON<?php
// allee API: POST /pricing/offer-fee-preview (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$body = [
'offer' => [
'id' => '900000000000021',
],
];
$ch = curl_init($base . '/pricing/offer-fee-preview');
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 /pricing/offer-fee-preview (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 = {
"offer": {
"id": "900000000000021",
},
}
r = requests.request("POST", BASE + "/pricing/offer-fee-preview", headers=headers, json=body, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: POST /pricing/offer-fee-preview (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const body = {
"offer": {
"id": "900000000000021"
}
};
const res = await fetch(`${BASE}/pricing/offer-fee-preview`, {
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 /pricing/offer-fee-preview (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 + "/pricing/offer-fee-preview");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALLEE_API_KEY"));
req.Headers.Accept.ParseAdd("application/vnd.allegro.public.v1+json");
var json = """
{
"offer": {
"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: POST /pricing/offer-fee-preview (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 = """
{
"offer": {
"id": "900000000000021"
}
}
""";
HttpRequest req = HttpRequest.newBuilder(URI.create(base + "/pricing/offer-fee-preview"))
.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 /pricing/offer-fee-preview (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 := `{
"offer": {
"id": "900000000000021"
}
}`
req, err := http.NewRequest("POST", base+"/pricing/offer-fee-preview", 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{
"commissions": [
{
"name": "Prowizja od sprzedaży",
"type": "SUCCESS_COMMISSION",
"fee": {
"amount": "0.00",
"currency": "PLN"
}
}
],
"quotes": [
{
"name": "Opłata za wystawienie",
"type": "LISTING_FEE",
"fee": {
"amount": "0.00",
"currency": "PLN"
},
"cycleDuration": null
}
],
"allee": {
"total": {
"amount": "0.00",
"currency": "PLN"
},
"feeScheduleVersion": "2026-11-09",
"note": "allee.pl nie pobiera dziś opłat za wystawienie ani prowizji od sprzedaży."
}
}Wyceny opłat (wsadowo)
POST /allee/fees/estimate
wzór Amazon SP-APIallegro:api:sale:offers:readlimit: read
Do 20 wycen w jednym żądaniu: dla oferty (idType: OFFER_ID), SKU (SKU) albo nowej oferty (NEW). Błąd jednej wyceny nie psuje pozostałych (status: CLIENT_ERROR).
Zgodność: wzorowana na Amazon Selling Partner API — Product Fees — getMyFeesEstimates.
Uprawnienie: zakres allegro:api:sale:offers:read.
Grupa limitu: read.
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
feesEstimateRequests array<object> wymaganePola obiektu
identifier stringTwój identyfikator wyceny (wraca w odpowiedzi).
idType stringOFFER_ID, SKU, NEWidValue stringId oferty albo SKU.
price MoneyInputKwota w żądaniu.
Pola obiektu
amount string|number wymaganeKwota jako tekst „123.45” (zalecane) albo liczba.
currency stringWaluta: tylko PLN (domyślnie PLN).
PLNquantity integersellingFormat stringBUY_NOWOdpowiedzi
200 Wyceny. · FeesEstimateResult
feesEstimates array<object> zawszePola obiektu
identifier string zawszestatus string zawszeSUCCESS, CLIENT_ERRORtotalFees Money · null zawszePola obiektu
amount string zawszeKwota z dwoma miejscami po przecinku, kropka dziesiętna.
currency string zawszeWaluta (allee.pl: tylko PLN).
PLNfeeDetails array<object> zawszePola obiektu
feeType string zawszeLISTING_FEE, SUCCESS_COMMISSIONfeeAmount Money zawszeKwota (kształt Allegro).
Pola obiektu
amount string zawszeKwota z dwoma miejscami po przecinku, kropka dziesiętna.
currency string zawszeWaluta (allee.pl: tylko PLN).
PLNerror object · null zawszePola obiektu
code string zawszemessage string zawszepath string zawszefeeScheduleVersion string zawszeBłędy
| HTTP | Kod | Znaczenie |
|---|---|---|
| 401 | invalid_token | Brak, zły, wygasły albo odwołany token lub klucz (format OAuth, nagłówek WWW-Authenticate). |
| 403 | ACCOUNT_INACTIVE | Konto sprzedawcy jest nieaktywne. |
| 403 | AccessDenied | Brak zakresu albo zasób innego sprzedawcy. |
| 403 | KEY_QUARANTINED | Kwarantanna: działa tylko odczyt (wykryto nietypowe użycie). |
| 403 | KEY_SUSPENDED | Klucz albo dostęp aplikacji wstrzymany (przez sprzedawcę albo ochronę). |
| 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 POST "${ALLEE_API_URL:-https://api.allee.pl}/allee/fees/estimate" \
-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'
{
"feesEstimateRequests": [
{
"identifier": "moja-oferta",
"idType": "SKU",
"idValue": "FILM-21ef85-1",
"price": {
"amount": "39.90",
"currency": "PLN"
}
},
{
"identifier": "nowa-oferta",
"idType": "NEW",
"price": {
"amount": "199.00",
"currency": "PLN"
},
"quantity": 1
}
]
}
JSON<?php
// allee API: POST /allee/fees/estimate (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$body = [
'feesEstimateRequests' => [
[
'identifier' => 'moja-oferta',
'idType' => 'SKU',
'idValue' => 'FILM-21ef85-1',
'price' => [
'amount' => '39.90',
'currency' => 'PLN',
],
],
[
'identifier' => 'nowa-oferta',
'idType' => 'NEW',
'price' => [
'amount' => '199.00',
'currency' => 'PLN',
],
'quantity' => 1,
],
],
];
$ch = curl_init($base . '/allee/fees/estimate');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('ALLEE_API_KEY'),
'Accept: application/vnd.allegro.public.v1+json',
'Content-Type: application/vnd.allegro.public.v1+json',
],
CURLOPT_POSTFIELDS => json_encode($body, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES),
CURLOPT_RETURNTRANSFER => true,
]);
$odp = curl_exec($ch);
echo 'HTTP ', curl_getinfo($ch, CURLINFO_RESPONSE_CODE), "\n", $odp, "\n";# allee API: POST /allee/fees/estimate (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 = {
"feesEstimateRequests": [
{
"identifier": "moja-oferta",
"idType": "SKU",
"idValue": "FILM-21ef85-1",
"price": {
"amount": "39.90",
"currency": "PLN",
},
},
{
"identifier": "nowa-oferta",
"idType": "NEW",
"price": {
"amount": "199.00",
"currency": "PLN",
},
"quantity": 1,
},
],
}
r = requests.request("POST", BASE + "/allee/fees/estimate", headers=headers, json=body, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: POST /allee/fees/estimate (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const body = {
"feesEstimateRequests": [
{
"identifier": "moja-oferta",
"idType": "SKU",
"idValue": "FILM-21ef85-1",
"price": {
"amount": "39.90",
"currency": "PLN"
}
},
{
"identifier": "nowa-oferta",
"idType": "NEW",
"price": {
"amount": "199.00",
"currency": "PLN"
},
"quantity": 1
}
]
};
const res = await fetch(`${BASE}/allee/fees/estimate`, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.ALLEE_API_KEY}`,
"Accept": "application/vnd.allegro.public.v1+json",
"Content-Type": "application/vnd.allegro.public.v1+json",
},
body: JSON.stringify(body),
redirect: "manual",
});
console.log("HTTP", res.status);
console.log(await res.text());// allee API: POST /allee/fees/estimate (C#, .NET 8+, HttpClient)
using System.Net.Http.Headers;
using System.Text;
var baseUrl = Environment.GetEnvironmentVariable("ALLEE_API_URL") ?? "https://api.allee.pl";
using var http = new HttpClient(new HttpClientHandler { AllowAutoRedirect = false });
using var req = new HttpRequestMessage(new HttpMethod("POST"), baseUrl + "/allee/fees/estimate");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALLEE_API_KEY"));
req.Headers.Accept.ParseAdd("application/vnd.allegro.public.v1+json");
var json = """
{
"feesEstimateRequests": [
{
"identifier": "moja-oferta",
"idType": "SKU",
"idValue": "FILM-21ef85-1",
"price": {
"amount": "39.90",
"currency": "PLN"
}
},
{
"identifier": "nowa-oferta",
"idType": "NEW",
"price": {
"amount": "199.00",
"currency": "PLN"
},
"quantity": 1
}
]
}
""";
req.Content = new StringContent(json, Encoding.UTF8);
req.Content.Headers.ContentType = new MediaTypeHeaderValue("application/vnd.allegro.public.v1+json");
using var res = await http.SendAsync(req);
Console.WriteLine($"HTTP {(int)res.StatusCode}");
Console.WriteLine(await res.Content.ReadAsStringAsync());// allee API: POST /allee/fees/estimate (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 = """
{
"feesEstimateRequests": [
{
"identifier": "moja-oferta",
"idType": "SKU",
"idValue": "FILM-21ef85-1",
"price": {
"amount": "39.90",
"currency": "PLN"
}
},
{
"identifier": "nowa-oferta",
"idType": "NEW",
"price": {
"amount": "199.00",
"currency": "PLN"
},
"quantity": 1
}
]
}
""";
HttpRequest req = HttpRequest.newBuilder(URI.create(base + "/allee/fees/estimate"))
.header("Authorization", "Bearer " + System.getenv("ALLEE_API_KEY"))
.header("Accept", "application/vnd.allegro.public.v1+json")
.header("Content-Type", "application/vnd.allegro.public.v1+json")
.method("POST", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpClient http = HttpClient.newBuilder().version(HttpClient.Version.HTTP_1_1).build();
HttpResponse<String> res = http.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println("HTTP " + res.statusCode());
System.out.println(res.body());
}
}// allee API: POST /allee/fees/estimate (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 := `{
"feesEstimateRequests": [
{
"identifier": "moja-oferta",
"idType": "SKU",
"idValue": "FILM-21ef85-1",
"price": {
"amount": "39.90",
"currency": "PLN"
}
},
{
"identifier": "nowa-oferta",
"idType": "NEW",
"price": {
"amount": "199.00",
"currency": "PLN"
},
"quantity": 1
}
]
}`
req, err := http.NewRequest("POST", base+"/allee/fees/estimate", 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{
"feesEstimates": [
{
"identifier": "moja-oferta",
"status": "SUCCESS",
"totalFees": {
"amount": "0.00",
"currency": "PLN"
},
"feeDetails": [
{
"feeType": "LISTING_FEE",
"feeAmount": {
"amount": "0.00",
"currency": "PLN"
}
},
{
"feeType": "SUCCESS_COMMISSION",
"feeAmount": {
"amount": "0.00",
"currency": "PLN"
}
}
],
"error": null
},
{
"identifier": "nowa-oferta",
"status": "SUCCESS",
"totalFees": {
"amount": "0.00",
"currency": "PLN"
},
"feeDetails": [
{
"feeType": "LISTING_FEE",
"feeAmount": {
"amount": "0.00",
"currency": "PLN"
}
},
{
"feeType": "SUCCESS_COMMISSION",
"feeAmount": {
"amount": "0.00",
"currency": "PLN"
}
}
],
"error": null
}
],
"feeScheduleVersion": "2026-11-09"
}