Powiadomienia push
Webhooki podpisane HMAC-SHA256: destynacje, subskrypcje, dziennik dostaw (Amazon Notifications + podpis jak Stripe).
- GET
/allee/notifications/types— Typy powiadomień - POST
/allee/notifications/destinations— Nowa destynacja (adres webhooka) - GET
/allee/notifications/destinations— Destynacje - GET
/allee/notifications/destinations/{destinationId}— Destynacja - DELETE
/allee/notifications/destinations/{destinationId}— Usunięcie destynacji - POST
/allee/notifications/destinations/{destinationId}/test— Powiadomienie testowe - POST
/allee/notifications/destinations/{destinationId}/rotate-secret— Nowy sekret podpisu - POST
/allee/notifications/destinations/{destinationId}/enable— Włączenie destynacji - POST
/allee/notifications/destinations/{destinationId}/disable— Wyłączenie destynacji - GET
/allee/notifications/subscriptions— Subskrypcje - POST
/allee/notifications/subscriptions/{notificationType}— Subskrypcja typu powiadomień - GET
/allee/notifications/subscriptions/{notificationType}— Subskrypcja - DELETE
/allee/notifications/subscriptions/{notificationType}— Usunięcie subskrypcji - GET
/allee/notifications/deliveries— Dziennik dostaw powiadomień
Typy powiadomień
GET /allee/notifications/types
wzór Amazon SP-APIallee:api:notificationslimit: read
Typy, opisy, wymagane zakresy i format podpisu.
Zgodność: wzorowana na Amazon Selling Partner API — Notifications — typy.
Uprawnienie: zakres allee:api:notifications.
Grupa limitu: read.
Odpowiedzi
200 Typy. · NotificationTypeList
notificationTypes array<object> zawszePola obiektu
notificationType string zawszedescription string zawszerequiredScopes array<string> zawszesignature object zawszePola obiektu
header string zawszeAllee-Signatureformat string zawszetoleranceSeconds integer zawszeBłędy
| HTTP | Kod | Znaczenie |
|---|---|---|
| 401 | invalid_token | Brak, zły, wygasły albo odwołany token lub klucz (format OAuth, nagłówek WWW-Authenticate). |
| 403 | ACCOUNT_INACTIVE | Konto sprzedawcy jest nieaktywne. |
| 403 | AccessDenied | Brak zakresu albo zasób innego sprzedawcy. |
| 403 | KEY_QUARANTINED | Kwarantanna: działa tylko odczyt (wykryto nietypowe użycie). |
| 403 | KEY_SUSPENDED | Klucz albo dostęp aplikacji wstrzymany (przez sprzedawcę albo ochronę). |
| 429 | TOO_MANY_REQUESTS | Przekroczony limit (minutowy, grupy operacji albo IP). |
| 500 | INTERNAL_ERROR | Błąd serwera allee. |
| 503 | NOT_DEPLOYED | Funkcja jeszcze nie uruchomiona (np. sandbox, wsady). |
curl -sS -X GET "${ALLEE_API_URL:-https://api.allee.pl}/allee/notifications/types" \
-H "Authorization: Bearer $ALLEE_API_KEY" \
-H "Accept: application/vnd.allegro.public.v1+json" \
-w '\nHTTP %{http_code}\n'<?php
// allee API: GET /allee/notifications/types (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$ch = curl_init($base . '/allee/notifications/types');
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/notifications/types (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/notifications/types", headers=headers, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: GET /allee/notifications/types (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const res = await fetch(`${BASE}/allee/notifications/types`, {
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/notifications/types (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/notifications/types");
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/notifications/types (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/notifications/types"))
.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/notifications/types (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/notifications/types", 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{
"notificationTypes": [
{
"notificationType": "ORDER_CHANGE",
"description": "Zmiana zamówienia: nowe zamówienie, realizacja, płatność, przesyłka",
"requiredScopes": [
"allee:api:notifications",
"allegro:api:orders:read"
]
},
{
"notificationType": "OFFER_STATUS_CHANGE",
"description": "Zmiana statusu oferty: aktywacja, zakończenie",
"requiredScopes": [
"allee:api:notifications",
"allegro:api:sale:offers:read"
]
},
{
"notificationType": "OFFER_ISSUES_CHANGE",
"description": "Nowe problemy oferty: nieudane zdjęcia, zakończenie przez moderację",
"requiredScopes": [
"allee:api:notifications",
"allegro:api:sale:offers:read"
]
},
{
"notificationType": "MESSAGE_RECEIVED",
"description": "Nowa wiadomość od kupującego",
"requiredScopes": [
"allee:api:notifications",
"allegro:api:messaging:read"
]
},
{
"notificationType": "RETURN_CHANGE",
"description": "Zwrot: zgłoszenie i każda zmiana statusu",
"requiredScopes": [
"allee:api:notifications",
"allegro:api:orders:read"
]
},
{
"notificationType": "ISSUE_CHANGE",
"description": "Reklamacja lub dyskusja: otwarcie, termin, zamknięcie",
"requiredScopes": [
"allee:api:notifications",
"allegro:api:disputes:read"
]
},
{
"notificationType": "FEED_PROCESSING_FINISHED",
"description": "Wsad ofert przetworzony",
"requiredScopes": [
"allee:api:notifications",
"allegro:api:sale:offers:write"
]
},
{
"notificationType": "REPORT_PROCESSING_FINISHED",
"description": "Raport gotowy do pobrania",
"requiredScopes": [
"allee:api:notifications",
"allee:api:reports"
]
},
{
"notificationType": "API_KEY_SECURITY_EVENT",
"description": "Zdarzenie bezpieczeństwa klucza lub aplikacji (np. kwarantanna, nowa sieć)",
"requiredScopes": [
"allee:api:notifications"
]
},
{
"notificationType": "OFFER_NOTICE_RECEIVED",
"description": "Zgłoszenie nielegalnej treści dotyczące oferty lub sklepu (DSA art. 16) — Z3, includes/dsa.php",
"requiredScopes": [
"allee:api:notifications",
"allegro:api:sale:offers:read"
]
},
{
"notificationType": "OFFER_RESTRICTED",
"description": "Decyzja allee wobec oferty lub konta z uzasadnieniem (DSA art. 17) — Z3, includes/dsa.php",
"requiredScopes": [
"allee:api:notifications",
"allegro:api:sale:offers:read"
]
},
{
"notificationType": "SELLER_COMPLIANCE_CHANGED",
"description": "Zmiana zgodności sprzedawcy: status, braki danych, oświadczenia, blokady (Z1, includes/sp/zgodnosc.php)",
"requiredScopes": [
"allee:api:notifications",
"allegro:api:profile:read"
]
}
],
"signature": {
"header": "Allee-Signature",
"format": "t=<unix>,v1=<hex HMAC-SHA256(secret, t + \".\" + body)>",
"toleranceSeconds": 300
}
}Nowa destynacja (adres webhooka)
POST /allee/notifications/destinations
wzór Amazon SP-APIallee:api:notificationslimit: write
Adres https Twojego serwera. Przy zakładaniu wysyłamy DESTINATION_VERIFICATION z payload.challenge — odpowiedz 2xx i {"challenge": "…"}. Adres: port 443, publiczny IP, bez przekierowań (ochrona SSRF).
Odpowiedź zawiera secret (allee_whsec_…) tylko raz — zapisz go; służy do sprawdzania podpisu Allee-Signature.
Zgodność: wzorowana na Amazon Selling Partner API — Notifications — createDestination.
Uprawnienie: zakres allee:api:notifications.
Grupa limitu: write.
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
url string · uri wymaganeAdres https Twojego serwera (port 443, publiczny IP, bez przekierowań).
name stringNazwa (do 100 znaków).
resourceSpecification objectAlternatywnie kształt Amazona.
Pola obiektu
url string wymaganeOdpowiedzi
201 Utworzono. · DestinationCreated
destinationId string · uuid zawszename string zawszeurl string zawszestatus string zawszeACTIVE, DISABLEDdisabledReason string · null zawszesecretLast4 string zawszeOstatnie 4 znaki sekretu podpisu.
previousSecretExpiresAt string · date-time · null zawszeDo kiedy podpisujemy też starym sekretem (po rotacji).
verifiedAt string · date-time · null zawszecreatedAt string · date-time zawszelastSuccessAt string · date-time · null zawszelastFailureAt string · date-time · null zawszeconsecutiveFailures integer zawszesubscriptions array<string> zawszeTypy subskrybowane na tę destynację.
application string zawszeAPI albo PANEL.
applicationName string · nullsecret string · null zawszeSekret podpisu allee_whsec_… — pokazany TYLKO RAZ (w powtórce z Idempotency-Key: null).
allee objectPola obiektu
secretRedacted 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ę). |
| 409 | DESTINATION_LIMIT | Limit destynacji osiągnięty. |
| 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 | DESTINATION_REDIRECT | Adres przekierowuje. |
| 422 | DESTINATION_URL_INVALID | Adres destynacji niedozwolony (https, port 443, publiczny IP). |
| 422 | DESTINATION_VERIFICATION_FAILED | Serwer nie odesłał challenge w 5 s. |
| 422 | JsonMappingException | Treść nie jest poprawnym JSON albo ma zły kształt (np. images jako obiekty). |
| 422 | UnknownJSONProperty | Pole nieznane w tym miejscu (path wskazuje które). |
| 422 | VALIDATION_ERROR | Zła wartość parametru zapytania (400) albo pola treści (422); path wskazuje miejsce. |
| 429 | TOO_MANY_REQUESTS | Przekroczony limit (minutowy, grupy operacji albo IP). |
| 500 | INTERNAL_ERROR | Błąd serwera allee. |
| 503 | NOT_DEPLOYED | Funkcja jeszcze nie uruchomiona (np. sandbox, wsady). |
curl -sS -X POST "${ALLEE_API_URL:-https://api.allee.pl}/allee/notifications/destinations" \
-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'
{
"name": "Serwer sklepu",
"url": "https://sklep.example.com/allee/webhook"
}
JSON<?php
// allee API: POST /allee/notifications/destinations (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$body = [
'name' => 'Serwer sklepu',
'url' => 'https://sklep.example.com/allee/webhook',
];
$ch = curl_init($base . '/allee/notifications/destinations');
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/notifications/destinations (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 = {
"name": "Serwer sklepu",
"url": "https://sklep.example.com/allee/webhook",
}
r = requests.request("POST", BASE + "/allee/notifications/destinations", headers=headers, json=body, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: POST /allee/notifications/destinations (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const body = {
"name": "Serwer sklepu",
"url": "https://sklep.example.com/allee/webhook"
};
const res = await fetch(`${BASE}/allee/notifications/destinations`, {
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/notifications/destinations (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/notifications/destinations");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALLEE_API_KEY"));
req.Headers.Accept.ParseAdd("application/vnd.allegro.public.v1+json");
var json = """
{
"name": "Serwer sklepu",
"url": "https://sklep.example.com/allee/webhook"
}
""";
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/notifications/destinations (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 = """
{
"name": "Serwer sklepu",
"url": "https://sklep.example.com/allee/webhook"
}
""";
HttpRequest req = HttpRequest.newBuilder(URI.create(base + "/allee/notifications/destinations"))
.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/notifications/destinations (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 := `{
"name": "Serwer sklepu",
"url": "https://sklep.example.com/allee/webhook"
}`
req, err := http.NewRequest("POST", base+"/allee/notifications/destinations", 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{
"destinationId": "b24ba1c2-f3d2-4872-8c7a-9df3c560f76d",
"name": "Serwer sklepu",
"url": "https://sklep.example.com/allee/webhook",
"status": "ACTIVE",
"disabledReason": null,
"secretLast4": "M5KD",
"previousSecretExpiresAt": null,
"verifiedAt": "2026-11-10T11:10:05.000Z",
"createdAt": "2026-11-10T11:10:05.000Z",
"lastSuccessAt": null,
"lastFailureAt": null,
"consecutiveFailures": 0,
"subscriptions": [],
"application": "API",
"secret": "{secret}"
}Destynacje
GET /allee/notifications/destinations
wzór Amazon SP-APIallee:api:notificationslimit: read
Destynacje tej aplikacji (klucza) u sprzedawcy. Bez sekretów.
Zgodność: wzorowana na Amazon Selling Partner API — Notifications — getDestinations.
Uprawnienie: zakres allee:api:notifications.
Grupa limitu: read.
Odpowiedzi
200 Destynacje. · DestinationList
destinations array<Destination> zawszePola obiektu
destinationId string · uuid zawszename string zawszeurl string zawszestatus string zawszeACTIVE, DISABLEDdisabledReason string · null zawszesecretLast4 string zawszeOstatnie 4 znaki sekretu podpisu.
previousSecretExpiresAt string · date-time · null zawszeDo kiedy podpisujemy też starym sekretem (po rotacji).
verifiedAt string · date-time · null zawszecreatedAt string · date-time zawszelastSuccessAt string · date-time · null zawszelastFailureAt string · date-time · null zawszeconsecutiveFailures integer zawszesubscriptions array<string> zawszeTypy subskrybowane na tę destynację.
application string zawszeAPI albo PANEL.
applicationName string · nullBłę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. |
| 503 | NOT_DEPLOYED | Funkcja jeszcze nie uruchomiona (np. sandbox, wsady). |
curl -sS -X GET "${ALLEE_API_URL:-https://api.allee.pl}/allee/notifications/destinations" \
-H "Authorization: Bearer $ALLEE_API_KEY" \
-H "Accept: application/vnd.allegro.public.v1+json" \
-w '\nHTTP %{http_code}\n'<?php
// allee API: GET /allee/notifications/destinations (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$ch = curl_init($base . '/allee/notifications/destinations');
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/notifications/destinations (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/notifications/destinations", headers=headers, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: GET /allee/notifications/destinations (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const res = await fetch(`${BASE}/allee/notifications/destinations`, {
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/notifications/destinations (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/notifications/destinations");
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/notifications/destinations (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/notifications/destinations"))
.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/notifications/destinations (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/notifications/destinations", 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{
"destinations": [
{
"destinationId": "b24ba1c2-f3d2-4872-8c7a-9df3c560f76d",
"name": "Serwer sklepu",
"url": "https://sklep.example.com/allee/webhook",
"status": "ACTIVE",
"disabledReason": null,
"secretLast4": "M5KD",
"previousSecretExpiresAt": null,
"verifiedAt": "2026-11-10T11:10:05.000Z",
"createdAt": "2026-11-10T11:10:05.000Z",
"lastSuccessAt": null,
"lastFailureAt": null,
"consecutiveFailures": 0,
"subscriptions": [],
"application": "API",
"applicationName": "Klucze osobiste — sklep_przykladowy_0e60e9"
}
]
}Destynacja
GET /allee/notifications/destinations/{destinationId}
wzór Amazon SP-APIallee:api:notificationslimit: read
Destynacja z listą subskrypcji.
Zgodność: wzorowana na Amazon Selling Partner API — Notifications — getDestination.
Uprawnienie: zakres allee:api:notifications.
Grupa limitu: read.
Parametry ścieżki
destinationId string · uuid wymaganyIdentyfikator destynacji.
Odpowiedzi
200 Destynacja. · Destination
destinationId string · uuid zawszename string zawszeurl string zawszestatus string zawszeACTIVE, DISABLEDdisabledReason string · null zawszesecretLast4 string zawszeOstatnie 4 znaki sekretu podpisu.
previousSecretExpiresAt string · date-time · null zawszeDo kiedy podpisujemy też starym sekretem (po rotacji).
verifiedAt string · date-time · null zawszecreatedAt string · date-time zawszelastSuccessAt string · date-time · null zawszelastFailureAt string · date-time · null zawszeconsecutiveFailures integer zawszesubscriptions array<string> zawszeTypy subskrybowane na tę destynację.
application string zawszeAPI albo PANEL.
applicationName string · nullBłę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}/allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d" \
-H "Authorization: Bearer $ALLEE_API_KEY" \
-H "Accept: application/vnd.allegro.public.v1+json" \
-w '\nHTTP %{http_code}\n'<?php
// allee API: GET /allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$ch = curl_init($base . '/allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d');
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/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d (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/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d", headers=headers, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: GET /allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const res = await fetch(`${BASE}/allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d`, {
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/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d (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/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d");
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/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d (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/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d"))
.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/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d (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/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d", 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{
"destinationId": "b24ba1c2-f3d2-4872-8c7a-9df3c560f76d",
"name": "Serwer sklepu",
"url": "https://sklep.example.com/allee/webhook",
"status": "ACTIVE",
"disabledReason": null,
"secretLast4": "M5KD",
"previousSecretExpiresAt": null,
"verifiedAt": "2026-11-10T11:10:05.000Z",
"createdAt": "2026-11-10T11:10:05.000Z",
"lastSuccessAt": null,
"lastFailureAt": null,
"consecutiveFailures": 0,
"subscriptions": [],
"application": "API"
}Usunięcie destynacji
DELETE /allee/notifications/destinations/{destinationId}
wzór Amazon SP-APIallee:api:notificationslimit: write
Razem z jej subskrypcjami; oczekujące dostawy są anulowane.
Zgodność: wzorowana na Amazon Selling Partner API — Notifications — deleteDestination.
Uprawnienie: zakres allee:api:notifications.
Grupa limitu: write.
Parametry ścieżki
destinationId string · uuid wymaganyIdentyfikator destynacji.
Odpowiedzi
204 Usunięto.
Błędy
| HTTP | Kod | Znaczenie |
|---|---|---|
| 401 | invalid_token | Brak, zły, wygasły albo odwołany token lub klucz (format OAuth, nagłówek WWW-Authenticate). |
| 403 | ACCOUNT_INACTIVE | Konto sprzedawcy jest nieaktywne. |
| 403 | AccessDenied | Brak zakresu albo zasób innego sprzedawcy. |
| 403 | KEY_QUARANTINED | Kwarantanna: działa tylko odczyt (wykryto nietypowe użycie). |
| 403 | KEY_SUSPENDED | Klucz albo dostęp aplikacji wstrzymany (przez sprzedawcę albo ochronę). |
| 404 | NOT_FOUND | Nie ma takiego zasobu (albo należy do innego sprzedawcy — dla wątków, zwrotów i spraw odpowiedź jest ta sama). |
| 429 | TOO_MANY_REQUESTS | Przekroczony limit (minutowy, grupy operacji albo IP). |
| 500 | INTERNAL_ERROR | Błąd serwera allee. |
curl -sS -X DELETE "${ALLEE_API_URL:-https://api.allee.pl}/allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d" \
-H "Authorization: Bearer $ALLEE_API_KEY" \
-H "Accept: application/vnd.allegro.public.v1+json" \
-w '\nHTTP %{http_code}\n'<?php
// allee API: DELETE /allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$ch = curl_init($base . '/allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('ALLEE_API_KEY'),
'Accept: application/vnd.allegro.public.v1+json',
],
CURLOPT_RETURNTRANSFER => true,
]);
$odp = curl_exec($ch);
echo 'HTTP ', curl_getinfo($ch, CURLINFO_RESPONSE_CODE), "\n", $odp, "\n";# allee API: DELETE /allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d (Python 3, biblioteka requests)
import os
import requests
BASE = os.environ.get("ALLEE_API_URL", "https://api.allee.pl")
headers = {
"Authorization": "Bearer " + os.environ["ALLEE_API_KEY"],
"Accept": "application/vnd.allegro.public.v1+json",
}
r = requests.request("DELETE", BASE + "/allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d", headers=headers, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: DELETE /allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const res = await fetch(`${BASE}/allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d`, {
method: "DELETE",
headers: {
Authorization: `Bearer ${process.env.ALLEE_API_KEY}`,
"Accept": "application/vnd.allegro.public.v1+json",
},
redirect: "manual",
});
console.log("HTTP", res.status);
console.log(await res.text());// allee API: DELETE /allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d (C#, .NET 8+, HttpClient)
using System.Net.Http.Headers;
using System.Text;
var baseUrl = Environment.GetEnvironmentVariable("ALLEE_API_URL") ?? "https://api.allee.pl";
using var http = new HttpClient(new HttpClientHandler { AllowAutoRedirect = false });
using var req = new HttpRequestMessage(new HttpMethod("DELETE"), baseUrl + "/allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALLEE_API_KEY"));
req.Headers.Accept.ParseAdd("application/vnd.allegro.public.v1+json");
using var res = await http.SendAsync(req);
Console.WriteLine($"HTTP {(int)res.StatusCode}");
Console.WriteLine(await res.Content.ReadAsStringAsync());// allee API: DELETE /allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d (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/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d"))
.header("Authorization", "Bearer " + System.getenv("ALLEE_API_KEY"))
.header("Accept", "application/vnd.allegro.public.v1+json")
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpClient http = HttpClient.newBuilder().version(HttpClient.Version.HTTP_1_1).build();
HttpResponse<String> res = http.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println("HTTP " + res.statusCode());
System.out.println(res.body());
}
}// allee API: DELETE /allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d (Go 1.20+, net/http; uruchom: go run main.go)
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
base := os.Getenv("ALLEE_API_URL")
if base == "" {
base = "https://api.allee.pl"
}
req, err := http.NewRequest("DELETE", base+"/allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("ALLEE_API_KEY"))
req.Header.Set("Accept", "application/vnd.allegro.public.v1+json")
klient := &http.Client{CheckRedirect: func(*http.Request, []*http.Request) error { return http.ErrUseLastResponse }}
res, err := klient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
dane, err := io.ReadAll(res.Body)
if err != nil {
panic(err)
}
fmt.Println("HTTP", res.StatusCode)
fmt.Println(string(dane))
}text/html; charset=UTF-8(0 B: text/html; charset=UTF-8)Powiadomienie testowe
POST /allee/notifications/destinations/{destinationId}/test
tylko alleeallee:api:notificationslimit: write
Wysyła od razu TEST_NOTIFICATION (podpisane) i zwraca wynik dostarczenia (kod HTTP Twojego serwera, czas).
Zgodność: tylko allee — Stripe: „Send test webhook”.
Uprawnienie: zakres allee:api:notifications.
Grupa limitu: write.
Parametry ścieżki
destinationId string · uuid wymaganyIdentyfikator destynacji.
Odpowiedzi
200 Wynik. · DestinationTestResult
notificationId string zawszedelivered boolean zawszehttpStatus integer · null zawszedurationMs integer zawszeerror string · null 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). |
| 409 | DESTINATION_DISABLED | Destynacja wyłączona. |
| 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/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/test" \
-H "Authorization: Bearer $ALLEE_API_KEY" \
-H "Accept: application/vnd.allegro.public.v1+json" \
-w '\nHTTP %{http_code}\n'<?php
// allee API: POST /allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/test (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$ch = curl_init($base . '/allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/test');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
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: POST /allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/test (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("POST", BASE + "/allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/test", headers=headers, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: POST /allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/test (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const res = await fetch(`${BASE}/allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/test`, {
method: "POST",
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: POST /allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/test (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/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/test");
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: POST /allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/test (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/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/test"))
.header("Authorization", "Bearer " + System.getenv("ALLEE_API_KEY"))
.header("Accept", "application/vnd.allegro.public.v1+json")
.method("POST", 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: POST /allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/test (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("POST", base+"/allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/test", 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{
"notificationId": "6faf3bfa-1b81-426b-a722-5054b196920e",
"delivered": true,
"httpStatus": 200,
"durationMs": 0,
"error": null
}Nowy sekret podpisu
POST /allee/notifications/destinations/{destinationId}/rotate-secret
tylko alleeallee:api:notificationslimit: write
Nowy sekret (pokazany raz). Przez okno previousSecretExpiresIn (0, 1h, 24h, 7d) podpisujemy oboma sekretami — nagłówek ma wtedy dwa v1=, więc możesz wymienić sekret bez przerwy.
Zgodność: tylko allee — Stripe: rotacja sekretu webhooka.
Uprawnienie: zakres allee:api:notifications.
Grupa limitu: write.
Parametry ścieżki
destinationId string · uuid wymaganyIdentyfikator destynacji.
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
previousSecretExpiresIn string0, 1h, 24h, 7dOdpowiedzi
200 Nowy sekret. · SecretRotation
destinationId string zawszepreviousSecretExpiresAt string · date-time · null zawszesecret string · null zawszeNowy sekret — pokazany raz.
allee objectPola obiektu
secretRedacted 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ę). |
| 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). |
| 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}/allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/rotate-secret" \
-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'
{
"previousSecretExpiresIn": "24h"
}
JSON<?php
// allee API: POST /allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/rotate-secret (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$body = [
'previousSecretExpiresIn' => '24h',
];
$ch = curl_init($base . '/allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/rotate-secret');
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/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/rotate-secret (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 = {
"previousSecretExpiresIn": "24h",
}
r = requests.request("POST", BASE + "/allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/rotate-secret", headers=headers, json=body, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: POST /allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/rotate-secret (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const body = {
"previousSecretExpiresIn": "24h"
};
const res = await fetch(`${BASE}/allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/rotate-secret`, {
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/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/rotate-secret (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/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/rotate-secret");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALLEE_API_KEY"));
req.Headers.Accept.ParseAdd("application/vnd.allegro.public.v1+json");
var json = """
{
"previousSecretExpiresIn": "24h"
}
""";
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/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/rotate-secret (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 = """
{
"previousSecretExpiresIn": "24h"
}
""";
HttpRequest req = HttpRequest.newBuilder(URI.create(base + "/allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/rotate-secret"))
.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/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/rotate-secret (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 := `{
"previousSecretExpiresIn": "24h"
}`
req, err := http.NewRequest("POST", base+"/allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/rotate-secret", 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{
"destinationId": "b24ba1c2-f3d2-4872-8c7a-9df3c560f76d",
"previousSecretExpiresAt": "2026-11-11T11:10:05.000Z",
"secret": "{secret}"
}Włączenie destynacji
POST /allee/notifications/destinations/{destinationId}/enable
tylko alleeallee:api:notificationslimit: write
Wznawia wysyłkę (np. po automatycznym wyłączeniu po 24 h nieudanych ponowień).
Zgodność: tylko allee.
Uprawnienie: zakres allee:api:notifications.
Grupa limitu: write.
Parametry ścieżki
destinationId string · uuid wymaganyIdentyfikator destynacji.
Odpowiedzi
200 Destynacja. · Destination
destinationId string · uuid zawszename string zawszeurl string zawszestatus string zawszeACTIVE, DISABLEDdisabledReason string · null zawszesecretLast4 string zawszeOstatnie 4 znaki sekretu podpisu.
previousSecretExpiresAt string · date-time · null zawszeDo kiedy podpisujemy też starym sekretem (po rotacji).
verifiedAt string · date-time · null zawszecreatedAt string · date-time zawszelastSuccessAt string · date-time · null zawszelastFailureAt string · date-time · null zawszeconsecutiveFailures integer zawszesubscriptions array<string> zawszeTypy subskrybowane na tę destynację.
application string zawszeAPI albo PANEL.
applicationName string · nullBłę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 POST "${ALLEE_API_URL:-https://api.allee.pl}/allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/enable" \
-H "Authorization: Bearer $ALLEE_API_KEY" \
-H "Accept: application/vnd.allegro.public.v1+json" \
-w '\nHTTP %{http_code}\n'<?php
// allee API: POST /allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/enable (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$ch = curl_init($base . '/allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/enable');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
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: POST /allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/enable (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("POST", BASE + "/allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/enable", headers=headers, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: POST /allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/enable (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const res = await fetch(`${BASE}/allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/enable`, {
method: "POST",
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: POST /allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/enable (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/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/enable");
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: POST /allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/enable (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/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/enable"))
.header("Authorization", "Bearer " + System.getenv("ALLEE_API_KEY"))
.header("Accept", "application/vnd.allegro.public.v1+json")
.method("POST", 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: POST /allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/enable (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("POST", base+"/allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/enable", 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{
"destinationId": "b24ba1c2-f3d2-4872-8c7a-9df3c560f76d",
"name": "Serwer sklepu",
"url": "https://sklep.example.com/allee/webhook",
"status": "ACTIVE",
"disabledReason": null,
"secretLast4": "vP35",
"previousSecretExpiresAt": "2026-11-11T11:10:05.000Z",
"verifiedAt": "2026-11-10T11:10:05.000Z",
"createdAt": "2026-11-10T11:10:05.000Z",
"lastSuccessAt": null,
"lastFailureAt": null,
"consecutiveFailures": 0,
"subscriptions": [],
"application": "API"
}Wyłączenie destynacji
POST /allee/notifications/destinations/{destinationId}/disable
tylko alleeallee:api:notificationslimit: write
Wstrzymuje wysyłkę (subskrypcje zostają).
Zgodność: tylko allee.
Uprawnienie: zakres allee:api:notifications.
Grupa limitu: write.
Parametry ścieżki
destinationId string · uuid wymaganyIdentyfikator destynacji.
Odpowiedzi
200 Destynacja. · Destination
destinationId string · uuid zawszename string zawszeurl string zawszestatus string zawszeACTIVE, DISABLEDdisabledReason string · null zawszesecretLast4 string zawszeOstatnie 4 znaki sekretu podpisu.
previousSecretExpiresAt string · date-time · null zawszeDo kiedy podpisujemy też starym sekretem (po rotacji).
verifiedAt string · date-time · null zawszecreatedAt string · date-time zawszelastSuccessAt string · date-time · null zawszelastFailureAt string · date-time · null zawszeconsecutiveFailures integer zawszesubscriptions array<string> zawszeTypy subskrybowane na tę destynację.
application string zawszeAPI albo PANEL.
applicationName string · nullBłę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 POST "${ALLEE_API_URL:-https://api.allee.pl}/allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/disable" \
-H "Authorization: Bearer $ALLEE_API_KEY" \
-H "Accept: application/vnd.allegro.public.v1+json" \
-w '\nHTTP %{http_code}\n'<?php
// allee API: POST /allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/disable (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$ch = curl_init($base . '/allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/disable');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
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: POST /allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/disable (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("POST", BASE + "/allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/disable", headers=headers, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: POST /allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/disable (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const res = await fetch(`${BASE}/allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/disable`, {
method: "POST",
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: POST /allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/disable (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/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/disable");
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: POST /allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/disable (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/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/disable"))
.header("Authorization", "Bearer " + System.getenv("ALLEE_API_KEY"))
.header("Accept", "application/vnd.allegro.public.v1+json")
.method("POST", 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: POST /allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/disable (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("POST", base+"/allee/notifications/destinations/b24ba1c2-f3d2-4872-8c7a-9df3c560f76d/disable", 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{
"destinationId": "b24ba1c2-f3d2-4872-8c7a-9df3c560f76d",
"name": "Serwer sklepu",
"url": "https://sklep.example.com/allee/webhook",
"status": "DISABLED",
"disabledReason": "Wyłączona przez aplikację",
"secretLast4": "vP35",
"previousSecretExpiresAt": "2026-11-11T11:10:05.000Z",
"verifiedAt": "2026-11-10T11:10:05.000Z",
"createdAt": "2026-11-10T11:10:05.000Z",
"lastSuccessAt": null,
"lastFailureAt": null,
"consecutiveFailures": 0,
"subscriptions": [],
"application": "API"
}Subskrypcje
GET /allee/notifications/subscriptions
wzór Amazon SP-APIallee:api:notificationslimit: read
Subskrypcje tej aplikacji (klucza) u sprzedawcy.
Zgodność: wzorowana na Amazon Selling Partner API — Notifications — getSubscription (wszystkie).
Uprawnienie: zakres allee:api:notifications.
Grupa limitu: read.
Odpowiedzi
200 Subskrypcje. · SubscriptionList
subscriptions array<Subscription> zawszePola obiektu
subscriptionId string · uuid zawszenotificationType string zawszedestinationId string zawszestatus string zawszeACTIVE, PAUSEDcreatedAt 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ę). |
| 429 | TOO_MANY_REQUESTS | Przekroczony limit (minutowy, grupy operacji albo IP). |
| 500 | INTERNAL_ERROR | Błąd serwera allee. |
| 503 | NOT_DEPLOYED | Funkcja jeszcze nie uruchomiona (np. sandbox, wsady). |
curl -sS -X GET "${ALLEE_API_URL:-https://api.allee.pl}/allee/notifications/subscriptions" \
-H "Authorization: Bearer $ALLEE_API_KEY" \
-H "Accept: application/vnd.allegro.public.v1+json" \
-w '\nHTTP %{http_code}\n'<?php
// allee API: GET /allee/notifications/subscriptions (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$ch = curl_init($base . '/allee/notifications/subscriptions');
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/notifications/subscriptions (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/notifications/subscriptions", headers=headers, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: GET /allee/notifications/subscriptions (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const res = await fetch(`${BASE}/allee/notifications/subscriptions`, {
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/notifications/subscriptions (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/notifications/subscriptions");
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/notifications/subscriptions (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/notifications/subscriptions"))
.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/notifications/subscriptions (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/notifications/subscriptions", 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{
"subscriptions": [
{
"subscriptionId": "3c260023-6f73-4036-97cb-49b45a7ad683",
"notificationType": "ORDER_CHANGE",
"destinationId": "b24ba1c2-f3d2-4872-8c7a-9df3c560f76d",
"status": "ACTIVE",
"createdAt": "2026-11-10T11:10:05.000Z"
}
]
}Subskrypcja typu powiadomień
POST /allee/notifications/subscriptions/{notificationType}
wzór Amazon SP-APIallee:api:notificationslimit: write
Jedna subskrypcja na typ (druga → 409). Wymaga zakresu notifications i zakresu danych typu (np. ORDER_CHANGE → orders:read).
Dostarczanie: POST JSON z nagłówkami Allee-Signature, Allee-Notification-Id, Allee-Notification-Type, Allee-Delivery-Attempt; Twój serwer odpowiada 2xx w 5 s. Ponowienia wykładnicze do 24 h, potem destynacja jest wyłączana.
Zgodność: wzorowana na Amazon Selling Partner API — Notifications — createSubscription.
Uprawnienie: zakres allee:api:notifications.
Grupa limitu: write.
Parametry ścieżki
notificationType string wymaganyTyp powiadomienia (GET /allee/notifications/types).
ORDER_CHANGE, OFFER_STATUS_CHANGE, OFFER_ISSUES_CHANGE, MESSAGE_RECEIVED, RETURN_CHANGE, ISSUE_CHANGE, FEED_PROCESSING_FINISHED, REPORT_PROCESSING_FINISHED, API_KEY_SECURITY_EVENT, SELLER_COMPLIANCE_CHANGED, OFFER_NOTICE_RECEIVED, OFFER_RESTRICTEDNagłó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
destinationId string · uuid wymaganepayloadVersion stringBez skutku (1.0).
Odpowiedzi
201 Utworzono. · Subscription
subscriptionId string · uuid zawszenotificationType string zawszedestinationId string zawszestatus string zawszeACTIVE, PAUSEDcreatedAt 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). |
| 409 | SUBSCRIPTION_EXISTS | Subskrypcja tego typu już jest. |
| 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 | DESTINATION_NOT_FOUND | Nie ma takiej destynacji tej aplikacji. |
| 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). |
| 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/notifications/subscriptions/ORDER_CHANGE" \
-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'
{
"destinationId": "b24ba1c2-f3d2-4872-8c7a-9df3c560f76d"
}
JSON<?php
// allee API: POST /allee/notifications/subscriptions/ORDER_CHANGE (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$body = [
'destinationId' => 'b24ba1c2-f3d2-4872-8c7a-9df3c560f76d',
];
$ch = curl_init($base . '/allee/notifications/subscriptions/ORDER_CHANGE');
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/notifications/subscriptions/ORDER_CHANGE (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 = {
"destinationId": "b24ba1c2-f3d2-4872-8c7a-9df3c560f76d",
}
r = requests.request("POST", BASE + "/allee/notifications/subscriptions/ORDER_CHANGE", headers=headers, json=body, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: POST /allee/notifications/subscriptions/ORDER_CHANGE (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const body = {
"destinationId": "b24ba1c2-f3d2-4872-8c7a-9df3c560f76d"
};
const res = await fetch(`${BASE}/allee/notifications/subscriptions/ORDER_CHANGE`, {
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/notifications/subscriptions/ORDER_CHANGE (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/notifications/subscriptions/ORDER_CHANGE");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALLEE_API_KEY"));
req.Headers.Accept.ParseAdd("application/vnd.allegro.public.v1+json");
var json = """
{
"destinationId": "b24ba1c2-f3d2-4872-8c7a-9df3c560f76d"
}
""";
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/notifications/subscriptions/ORDER_CHANGE (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 = """
{
"destinationId": "b24ba1c2-f3d2-4872-8c7a-9df3c560f76d"
}
""";
HttpRequest req = HttpRequest.newBuilder(URI.create(base + "/allee/notifications/subscriptions/ORDER_CHANGE"))
.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/notifications/subscriptions/ORDER_CHANGE (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 := `{
"destinationId": "b24ba1c2-f3d2-4872-8c7a-9df3c560f76d"
}`
req, err := http.NewRequest("POST", base+"/allee/notifications/subscriptions/ORDER_CHANGE", 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{
"subscriptionId": "3c260023-6f73-4036-97cb-49b45a7ad683",
"notificationType": "ORDER_CHANGE",
"destinationId": "b24ba1c2-f3d2-4872-8c7a-9df3c560f76d",
"status": "ACTIVE",
"createdAt": "2026-11-10T11:10:05.000Z"
}Subskrypcja
GET /allee/notifications/subscriptions/{notificationType}
wzór Amazon SP-APIallee:api:notificationslimit: read
Subskrypcja wskazanego typu.
Zgodność: wzorowana na Amazon Selling Partner API — Notifications — getSubscription.
Uprawnienie: zakres allee:api:notifications.
Grupa limitu: read.
Parametry ścieżki
notificationType string wymaganyTyp powiadomienia (GET /allee/notifications/types).
ORDER_CHANGE, OFFER_STATUS_CHANGE, OFFER_ISSUES_CHANGE, MESSAGE_RECEIVED, RETURN_CHANGE, ISSUE_CHANGE, FEED_PROCESSING_FINISHED, REPORT_PROCESSING_FINISHED, API_KEY_SECURITY_EVENT, SELLER_COMPLIANCE_CHANGED, OFFER_NOTICE_RECEIVED, OFFER_RESTRICTEDOdpowiedzi
200 Subskrypcja. · Subscription
subscriptionId string · uuid zawszenotificationType string zawszedestinationId string zawszestatus string zawszeACTIVE, PAUSEDcreatedAt 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}/allee/notifications/subscriptions/ORDER_CHANGE" \
-H "Authorization: Bearer $ALLEE_API_KEY" \
-H "Accept: application/vnd.allegro.public.v1+json" \
-w '\nHTTP %{http_code}\n'<?php
// allee API: GET /allee/notifications/subscriptions/ORDER_CHANGE (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$ch = curl_init($base . '/allee/notifications/subscriptions/ORDER_CHANGE');
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/notifications/subscriptions/ORDER_CHANGE (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/notifications/subscriptions/ORDER_CHANGE", headers=headers, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: GET /allee/notifications/subscriptions/ORDER_CHANGE (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const res = await fetch(`${BASE}/allee/notifications/subscriptions/ORDER_CHANGE`, {
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/notifications/subscriptions/ORDER_CHANGE (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/notifications/subscriptions/ORDER_CHANGE");
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/notifications/subscriptions/ORDER_CHANGE (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/notifications/subscriptions/ORDER_CHANGE"))
.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/notifications/subscriptions/ORDER_CHANGE (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/notifications/subscriptions/ORDER_CHANGE", 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{
"subscriptionId": "3c260023-6f73-4036-97cb-49b45a7ad683",
"notificationType": "ORDER_CHANGE",
"destinationId": "b24ba1c2-f3d2-4872-8c7a-9df3c560f76d",
"status": "ACTIVE",
"createdAt": "2026-11-10T11:10:05.000Z"
}Usunięcie subskrypcji
DELETE /allee/notifications/subscriptions/{notificationType}
wzór Amazon SP-APIallee:api:notificationslimit: write
Koniec powiadomień tego typu.
Zgodność: wzorowana na Amazon Selling Partner API — Notifications — deleteSubscriptionById.
Uprawnienie: zakres allee:api:notifications.
Grupa limitu: write.
Parametry ścieżki
notificationType string wymaganyTyp powiadomienia (GET /allee/notifications/types).
ORDER_CHANGE, OFFER_STATUS_CHANGE, OFFER_ISSUES_CHANGE, MESSAGE_RECEIVED, RETURN_CHANGE, ISSUE_CHANGE, FEED_PROCESSING_FINISHED, REPORT_PROCESSING_FINISHED, API_KEY_SECURITY_EVENT, SELLER_COMPLIANCE_CHANGED, OFFER_NOTICE_RECEIVED, OFFER_RESTRICTEDOdpowiedzi
204 Usunięto.
Błędy
| HTTP | Kod | Znaczenie |
|---|---|---|
| 401 | invalid_token | Brak, zły, wygasły albo odwołany token lub klucz (format OAuth, nagłówek WWW-Authenticate). |
| 403 | ACCOUNT_INACTIVE | Konto sprzedawcy jest nieaktywne. |
| 403 | AccessDenied | Brak zakresu albo zasób innego sprzedawcy. |
| 403 | KEY_QUARANTINED | Kwarantanna: działa tylko odczyt (wykryto nietypowe użycie). |
| 403 | KEY_SUSPENDED | Klucz albo dostęp aplikacji wstrzymany (przez sprzedawcę albo ochronę). |
| 404 | NOT_FOUND | Nie ma takiego zasobu (albo należy do innego sprzedawcy — dla wątków, zwrotów i spraw odpowiedź jest ta sama). |
| 429 | TOO_MANY_REQUESTS | Przekroczony limit (minutowy, grupy operacji albo IP). |
| 500 | INTERNAL_ERROR | Błąd serwera allee. |
curl -sS -X DELETE "${ALLEE_API_URL:-https://api.allee.pl}/allee/notifications/subscriptions/ORDER_CHANGE" \
-H "Authorization: Bearer $ALLEE_API_KEY" \
-H "Accept: application/vnd.allegro.public.v1+json" \
-w '\nHTTP %{http_code}\n'<?php
// allee API: DELETE /allee/notifications/subscriptions/ORDER_CHANGE (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$ch = curl_init($base . '/allee/notifications/subscriptions/ORDER_CHANGE');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('ALLEE_API_KEY'),
'Accept: application/vnd.allegro.public.v1+json',
],
CURLOPT_RETURNTRANSFER => true,
]);
$odp = curl_exec($ch);
echo 'HTTP ', curl_getinfo($ch, CURLINFO_RESPONSE_CODE), "\n", $odp, "\n";# allee API: DELETE /allee/notifications/subscriptions/ORDER_CHANGE (Python 3, biblioteka requests)
import os
import requests
BASE = os.environ.get("ALLEE_API_URL", "https://api.allee.pl")
headers = {
"Authorization": "Bearer " + os.environ["ALLEE_API_KEY"],
"Accept": "application/vnd.allegro.public.v1+json",
}
r = requests.request("DELETE", BASE + "/allee/notifications/subscriptions/ORDER_CHANGE", headers=headers, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: DELETE /allee/notifications/subscriptions/ORDER_CHANGE (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const res = await fetch(`${BASE}/allee/notifications/subscriptions/ORDER_CHANGE`, {
method: "DELETE",
headers: {
Authorization: `Bearer ${process.env.ALLEE_API_KEY}`,
"Accept": "application/vnd.allegro.public.v1+json",
},
redirect: "manual",
});
console.log("HTTP", res.status);
console.log(await res.text());// allee API: DELETE /allee/notifications/subscriptions/ORDER_CHANGE (C#, .NET 8+, HttpClient)
using System.Net.Http.Headers;
using System.Text;
var baseUrl = Environment.GetEnvironmentVariable("ALLEE_API_URL") ?? "https://api.allee.pl";
using var http = new HttpClient(new HttpClientHandler { AllowAutoRedirect = false });
using var req = new HttpRequestMessage(new HttpMethod("DELETE"), baseUrl + "/allee/notifications/subscriptions/ORDER_CHANGE");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALLEE_API_KEY"));
req.Headers.Accept.ParseAdd("application/vnd.allegro.public.v1+json");
using var res = await http.SendAsync(req);
Console.WriteLine($"HTTP {(int)res.StatusCode}");
Console.WriteLine(await res.Content.ReadAsStringAsync());// allee API: DELETE /allee/notifications/subscriptions/ORDER_CHANGE (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/notifications/subscriptions/ORDER_CHANGE"))
.header("Authorization", "Bearer " + System.getenv("ALLEE_API_KEY"))
.header("Accept", "application/vnd.allegro.public.v1+json")
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpClient http = HttpClient.newBuilder().version(HttpClient.Version.HTTP_1_1).build();
HttpResponse<String> res = http.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println("HTTP " + res.statusCode());
System.out.println(res.body());
}
}// allee API: DELETE /allee/notifications/subscriptions/ORDER_CHANGE (Go 1.20+, net/http; uruchom: go run main.go)
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
base := os.Getenv("ALLEE_API_URL")
if base == "" {
base = "https://api.allee.pl"
}
req, err := http.NewRequest("DELETE", base+"/allee/notifications/subscriptions/ORDER_CHANGE", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("ALLEE_API_KEY"))
req.Header.Set("Accept", "application/vnd.allegro.public.v1+json")
klient := &http.Client{CheckRedirect: func(*http.Request, []*http.Request) error { return http.ErrUseLastResponse }}
res, err := klient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
dane, err := io.ReadAll(res.Body)
if err != nil {
panic(err)
}
fmt.Println("HTTP", res.StatusCode)
fmt.Println(string(dane))
}text/html; charset=UTF-8(0 B: text/html; charset=UTF-8)Dziennik dostaw powiadomień
GET /allee/notifications/deliveries
tylko alleeallee:api:notificationslimit: read
Dostawy z 30 dni: status, liczba prób, ostatni kod HTTP i błąd, następna próba.
Zgodność: tylko allee — Stripe: dziennik zdarzeń webhooków.
Uprawnienie: zakres allee:api:notifications.
Grupa limitu: read.
Parametry zapytania
offset integerIle pozycji pominąć.
limit integerIle pozycji zwrócić (1–100, domyślnie 50).
status stringStatus.
PENDING, RETRYING, DELIVERED, FAILED, CANCELLEDdestinationId string · uuidDestynacja.
Odpowiedzi
200 Dostawy. · DeliveryList
deliveries array<object> zawszePola obiektu
deliveryId string zawszenotificationId string zawszenotificationType string zawszedestinationId string zawszestatus string zawszePENDING, RETRYING, DELIVERED, FAILED, CANCELLEDattempts integer zawszelastHttpStatus integer · null zawszelastDurationMs integer · null zawszelastError string · null zawszecreatedAt string · date-time zawszenextAttemptAt string · date-time · null zawszedeliveredAt string · date-time · null zawszetotalCount integer zawszecount integer zawszeBłędy
| HTTP | Kod | Znaczenie |
|---|---|---|
| 400 | VALIDATION_ERROR | Zła wartość parametru zapytania (400) albo pola treści (422); path wskazuje miejsce. |
| 401 | invalid_token | Brak, zły, wygasły albo odwołany token lub klucz (format OAuth, nagłówek WWW-Authenticate). |
| 403 | ACCOUNT_INACTIVE | Konto sprzedawcy jest nieaktywne. |
| 403 | AccessDenied | Brak zakresu albo zasób innego sprzedawcy. |
| 403 | KEY_QUARANTINED | Kwarantanna: działa tylko odczyt (wykryto nietypowe użycie). |
| 403 | KEY_SUSPENDED | Klucz albo dostęp aplikacji wstrzymany (przez sprzedawcę albo ochronę). |
| 429 | TOO_MANY_REQUESTS | Przekroczony limit (minutowy, grupy operacji albo IP). |
| 500 | INTERNAL_ERROR | Błąd serwera allee. |
curl -sS -X GET "${ALLEE_API_URL:-https://api.allee.pl}/allee/notifications/deliveries?destinationId=b24ba1c2-f3d2-4872-8c7a-9df3c560f76d&limit=20" \
-H "Authorization: Bearer $ALLEE_API_KEY" \
-H "Accept: application/vnd.allegro.public.v1+json" \
-w '\nHTTP %{http_code}\n'<?php
// allee API: GET /allee/notifications/deliveries (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$ch = curl_init($base . '/allee/notifications/deliveries?destinationId=b24ba1c2-f3d2-4872-8c7a-9df3c560f76d&limit=20');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('ALLEE_API_KEY'),
'Accept: application/vnd.allegro.public.v1+json',
],
CURLOPT_RETURNTRANSFER => true,
]);
$odp = curl_exec($ch);
echo 'HTTP ', curl_getinfo($ch, CURLINFO_RESPONSE_CODE), "\n", $odp, "\n";# allee API: GET /allee/notifications/deliveries (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/notifications/deliveries?destinationId=b24ba1c2-f3d2-4872-8c7a-9df3c560f76d&limit=20", headers=headers, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: GET /allee/notifications/deliveries (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const res = await fetch(`${BASE}/allee/notifications/deliveries?destinationId=b24ba1c2-f3d2-4872-8c7a-9df3c560f76d&limit=20`, {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.ALLEE_API_KEY}`,
"Accept": "application/vnd.allegro.public.v1+json",
},
redirect: "manual",
});
console.log("HTTP", res.status);
console.log(await res.text());// allee API: GET /allee/notifications/deliveries (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/notifications/deliveries?destinationId=b24ba1c2-f3d2-4872-8c7a-9df3c560f76d&limit=20");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALLEE_API_KEY"));
req.Headers.Accept.ParseAdd("application/vnd.allegro.public.v1+json");
using var res = await http.SendAsync(req);
Console.WriteLine($"HTTP {(int)res.StatusCode}");
Console.WriteLine(await res.Content.ReadAsStringAsync());// allee API: GET /allee/notifications/deliveries (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/notifications/deliveries?destinationId=b24ba1c2-f3d2-4872-8c7a-9df3c560f76d&limit=20"))
.header("Authorization", "Bearer " + System.getenv("ALLEE_API_KEY"))
.header("Accept", "application/vnd.allegro.public.v1+json")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpClient http = HttpClient.newBuilder().version(HttpClient.Version.HTTP_1_1).build();
HttpResponse<String> res = http.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println("HTTP " + res.statusCode());
System.out.println(res.body());
}
}// allee API: GET /allee/notifications/deliveries (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/notifications/deliveries?destinationId=b24ba1c2-f3d2-4872-8c7a-9df3c560f76d&limit=20", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("ALLEE_API_KEY"))
req.Header.Set("Accept", "application/vnd.allegro.public.v1+json")
klient := &http.Client{CheckRedirect: func(*http.Request, []*http.Request) error { return http.ErrUseLastResponse }}
res, err := klient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
dane, err := io.ReadAll(res.Body)
if err != nil {
panic(err)
}
fmt.Println("HTTP", res.StatusCode)
fmt.Println(string(dane))
}application/vnd.allegro.public.v1+json{
"deliveries": [
{
"deliveryId": "1",
"notificationId": "6faf3bfa-1b81-426b-a722-5054b196920e",
"notificationType": "TEST_NOTIFICATION",
"destinationId": "b24ba1c2-f3d2-4872-8c7a-9df3c560f76d",
"status": "DELIVERED",
"attempts": 1,
"lastHttpStatus": 200,
"lastDurationMs": 0,
"lastError": null,
"createdAt": "2026-11-10T11:10:05.588Z",
"nextAttemptAt": null,
"deliveredAt": "2026-11-10T11:10:05.588Z"
}
],
"totalCount": 1,
"count": 1
}