Sandbox i klucze testowe
Klucz testowy allee_sk_test_… działa pod tym samym adresem co produkcja, ale wszystkie dane trafiają do osobnej bazy sandboxu. Rozstrzyga wyłącznie rodzaj klucza — żaden nagłówek ani parametr nie przełączy klucza produkcyjnego na sandbox i odwrotnie. Odpowiedzi na klucz testowy mają nagłówek X-Allee-Mode: test. Ten rozdział (do „Środowiska sandbox”) opisuje tryb testowy na api.allee.pl; osobne środowisko https://api.sandbox.allee.pl działa inaczej — opis niżej.
Konto demo
Przy pierwszym żądaniu powstaje konto demo: 20 aktywnych ofert, cennik, warunki, GPSR i kupujący demo (dane fikcyjne, bez danych osobowych z produkcji).
curl -sS -X GET "${ALLEE_API_URL:-https://api.allee.pl}/allee/sandbox" \
-H "Authorization: Bearer $ALLEE_API_KEY" \
-H "Accept: application/vnd.allegro.public.v1+json" \
-w '\nHTTP %{http_code}\n'<?php
// allee API: GET /allee/sandbox (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$ch = curl_init($base . '/allee/sandbox');
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/sandbox (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/sandbox", headers=headers, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: GET /allee/sandbox (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const res = await fetch(`${BASE}/allee/sandbox`, {
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/sandbox (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/sandbox");
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/sandbox (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/sandbox"))
.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/sandbox (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/sandbox", 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))
}Symulator kupującego
POST /allee/sandbox/orders, POST /allee/sandbox/returns i POST /allee/sandbox/messages robią to, co na produkcji robi kupujący:
curl -sS -X POST "${ALLEE_API_URL:-https://api.allee.pl}/allee/sandbox/orders" \
-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'
{
"offerId": "900000000000021",
"quantity": 2,
"paymentType": "ONLINE",
"invoice": true,
"messageToSeller": "Proszę o staranne zapakowanie."
}
JSON<?php
// allee API: POST /allee/sandbox/orders (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$body = [
'offerId' => '900000000000021',
'quantity' => 2,
'paymentType' => 'ONLINE',
'invoice' => true,
'messageToSeller' => 'Proszę o staranne zapakowanie.',
];
$ch = curl_init($base . '/allee/sandbox/orders');
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/sandbox/orders (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 = {
"offerId": "900000000000021",
"quantity": 2,
"paymentType": "ONLINE",
"invoice": True,
"messageToSeller": "Proszę o staranne zapakowanie.",
}
r = requests.request("POST", BASE + "/allee/sandbox/orders", headers=headers, json=body, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: POST /allee/sandbox/orders (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const body = {
"offerId": "900000000000021",
"quantity": 2,
"paymentType": "ONLINE",
"invoice": true,
"messageToSeller": "Proszę o staranne zapakowanie."
};
const res = await fetch(`${BASE}/allee/sandbox/orders`, {
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/sandbox/orders (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/sandbox/orders");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALLEE_API_KEY"));
req.Headers.Accept.ParseAdd("application/vnd.allegro.public.v1+json");
var json = """
{
"offerId": "900000000000021",
"quantity": 2,
"paymentType": "ONLINE",
"invoice": true,
"messageToSeller": "Proszę o staranne zapakowanie."
}
""";
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/sandbox/orders (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 = """
{
"offerId": "900000000000021",
"quantity": 2,
"paymentType": "ONLINE",
"invoice": true,
"messageToSeller": "Proszę o staranne zapakowanie."
}
""";
HttpRequest req = HttpRequest.newBuilder(URI.create(base + "/allee/sandbox/orders"))
.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/sandbox/orders (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 := `{
"offerId": "900000000000021",
"quantity": 2,
"paymentType": "ONLINE",
"invoice": true,
"messageToSeller": "Proszę o staranne zapakowanie."
}`
req, err := http.NewRequest("POST", base+"/allee/sandbox/orders", 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))
}curl -sS -X POST "${ALLEE_API_URL:-https://api.allee.pl}/allee/sandbox/messages" \
-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'
{
"offerId": "900000000000021",
"text": "Czy płyta ma polski lektor?"
}
JSON<?php
// allee API: POST /allee/sandbox/messages (PHP 8, rozszerzenie curl)
$base = getenv('ALLEE_API_URL') ?: 'https://api.allee.pl';
$body = [
'offerId' => '900000000000021',
'text' => 'Czy płyta ma polski lektor?',
];
$ch = curl_init($base . '/allee/sandbox/messages');
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/sandbox/messages (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 = {
"offerId": "900000000000021",
"text": "Czy płyta ma polski lektor?",
}
r = requests.request("POST", BASE + "/allee/sandbox/messages", headers=headers, json=body, timeout=60, allow_redirects=False)
print("HTTP", r.status_code)
print(r.text)// allee API: POST /allee/sandbox/messages (Node.js 18+, wbudowany fetch; plik .mjs)
const BASE = process.env.ALLEE_API_URL ?? "https://api.allee.pl";
const body = {
"offerId": "900000000000021",
"text": "Czy płyta ma polski lektor?"
};
const res = await fetch(`${BASE}/allee/sandbox/messages`, {
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/sandbox/messages (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/sandbox/messages");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("ALLEE_API_KEY"));
req.Headers.Accept.ParseAdd("application/vnd.allegro.public.v1+json");
var json = """
{
"offerId": "900000000000021",
"text": "Czy płyta ma polski lektor?"
}
""";
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/sandbox/messages (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 = """
{
"offerId": "900000000000021",
"text": "Czy płyta ma polski lektor?"
}
""";
HttpRequest req = HttpRequest.newBuilder(URI.create(base + "/allee/sandbox/messages"))
.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/sandbox/messages (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 := `{
"offerId": "900000000000021",
"text": "Czy płyta ma polski lektor?"
}`
req, err := http.NewRequest("POST", base+"/allee/sandbox/messages", 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))
}Różnice trybu testowego
- Zdjęcia z adresów są „przyjmowane” bez pobierania (oferta od razu aktywna). W środowisku sandbox zdjęcia są pobierane jak na produkcji — oferta jest
ACTIVATING, dopókiallee.imagesPending> 0. - Wgrywanie plików wprost do magazynu (
POST /allee/uploads,POST /allee/feeds/documents) → 403SANDBOX_UNSUPPORTED— podawaj adresy URL i wsady w treści żądania. W środowisku sandbox oba działają jak na produkcji. - Podpisane linki do faktur i raportów z sandboxu mają parametr
mode=testobjęty podpisem — pobierasz je tak samo jak w produkcji, bez tokenu. - Nic nie trafia do wyszukiwarki allee.pl ani do kupujących; e-maile nie wychodzą.
- Oceny sprzedaży: kupujący demo nie wystawia ocen, więc
GET /sale/user-ratingszwraca pustą listę, a odpowiedź na ocenę kluczem testowym kończy się 503NOT_DEPLOYED. Oceny sprawdzisz kluczem produkcyjnym.
Środowisko sandbox i symulator
Oprócz kluczy testowych jest też osobne środowisko: sandbox.allee.pl (serwis), sprzedaz.sandbox.allee.pl (panel sprzedaży) i https://api.sandbox.allee.pl (API). To pełna kopia allee z własną bazą i fikcyjnymi danymi. Konto zakładasz tam od nowa, a klucz tworzysz w panelu sprzedaży sandboxu (Klucze API → Nowy klucz). Każdy klucz tego środowiska jest kluczem sandboxu — nie ma tam trybu test, a klucze z allee.pl tam nie działają.
Klucze sandboxu mają ten sam przedrostek co produkcyjne (allee_sk_live_…) — o środowisku decyduje adres API, więc w konfiguracji klienta wybieraj środowisko jawnie (adres https://api.sandbox.allee.pl), a nie po przedrostku klucza. Odpowiedzi tego środowiska nie mają nagłówka X-Allee-Mode; GET /allee/sandbox zwraca mode: sandbox. Specyfikacja OpenAPI z adresami sandboxu: https://api.sandbox.allee.pl/openapi.json.
W tym środowisku symulator ma więcej tras. Każda robi dokładnie to, co na produkcji robi kupujący, przewoźnik albo upływ czasu, więc wynik widać wszędzie: w /order/checkout-forms, /order/events, w panelu sprzedaży i w powiadomieniach (webhookach). To samo zrobisz przyciskami na stronie sandbox.allee.pl/sandbox — jest tam też podgląd ostatnich zdarzeń i wysłanych powiadomień z kodem odpowiedzi Twojego serwera.
| Trasa | Zakres | Co robi |
|---|---|---|
POST /allee/sandbox/orders | orders:write | Kupujący testowy kupuje Twoją ofertę (offerId, quantity, paymentType, deliveryMethodId). |
POST /allee/sandbox/orders/{id}/payment | orders:write | Kupujący zapłacił — zamówienie przechodzi do READY_FOR_PROCESSING. |
POST /allee/sandbox/orders/{id}/cancellation | orders:write | reason: BUYER — kupujący rezygnuje; PAYMENT_TIMEOUT — minął termin płatności. |
POST /allee/sandbox/orders/{id}/delivery | orders:write | Przesyłka doręczona (najpierw dodaj przesyłkę: POST /order/checkout-forms/{id}/shipments). |
POST /allee/sandbox/orders/{id}/rating | orders:write | Ocena od kupującego: recommended: true albo false, opcjonalnie comment. |
POST /allee/sandbox/returns | orders:write | Kupujący zgłasza zwrot wysłanego zamówienia. Zwrot ustawowy dotyczy zakupów od firm — konto prywatne dostaje 422 NOT_B2C. |
POST /allee/sandbox/issues | disputes:write | Reklamacja (type: CLAIM) albo dyskusja (DISPUTE) do zamówienia. id z odpowiedzi = numer sprawy do GET /sale/issues/{issueId}. Reklamacja z terminem ustawowym dotyczy zakupów od firm — konto prywatne dostaje 422 COMPLAINT_NOT_ALLOWED (dyskusja działa zawsze). |
POST /allee/sandbox/messages | messaging | Wiadomość od kupującego: pytanie o ofertę albo w sprawie zamówienia. |
POST /allee/sandbox/auctions/{offerId}/bids | sale:offers:write | Licytant testowy podbija Twoją licytację (bez amount — o najmniejszą możliwą kwotę). |
POST /allee/sandbox/auctions/{offerId}/end | sale:offers:write | Licytacja kończy się teraz — jak o czasie zakończenia. |
POST /allee/sandbox/auctions/{offerId}/order | orders:write | Zwycięzca licytacji kupuje (paid: true — od razu płaci). |
POST /allee/sandbox/time-travel | orders:write | Przyspieszenie czasu: AUCTION_END, PAYMENT_DEADLINE, ORDER_COMPLETION, RETURN_DEADLINE. |
POST /allee/sandbox/reset | orders:write | Usuwa dane testowe Twojego konta (confirm: "RESET"; z offers: true także oferty). |
GET /allee/sandbox | — | Podsumowanie konta: liczba ofert, lista tras symulatora, limit i adresy środowiska. |
Przykład — zamówienie od zakupu do oceny:
API=https://api.sandbox.allee.pl
N='Authorization: Bearer '$KLUCZ
T='Content-Type: application/vnd.allegro.public.v1+json'
# 1. kupujący testowy kupuje Twoją ofertę — w odpowiedzi jest id zamówienia
curl -X POST $API/allee/sandbox/orders -H "$N" -H "$T" -d '{"offerId": "1044", "quantity": 1}'
# 2. kupujący płaci
curl -X POST $API/allee/sandbox/orders/$ID/payment -H "$N"
# 3. wysyłasz zamówienie tak samo jak na produkcji
curl -X POST $API/order/checkout-forms/$ID/shipments -H "$N" -H "$T" -d '{"carrierId": "INPOST", "waybill": "SBX000000000000000000001"}'
# 4. przesyłka doręczona, kupujący wystawia ocenę
curl -X POST $API/allee/sandbox/orders/$ID/delivery -H "$N"
curl -X POST $API/allee/sandbox/orders/$ID/rating -H "$N" -H "$T" -d '{"recommended": true}'
# 5. co się wydarzyło — dziennik zdarzeń zamówień
curl $API/order/events -H "$N"- Akcje kupującego (płatność, anulowanie, ocena, zwrot, reklamacja, dyskusja) działają tylko na zamówieniach kupującego testowego — zamówienia prawdziwych użytkowników sandboxu zostają nietknięte (422
NOT_TEST_BUYER). Akcje przewoźnika i czasu (…/delivery,time-travelzORDER_COMPLETION) działają na każdym zamówieniu Twojej sprzedaży w sandboxie. - Konto prywatne testuje dyskusje; zwroty ustawowe i reklamacje z terminem ustawowym dotyczą sprzedawców-firm (B2C) — do ich testów potrzebne jest konto firmowe sandboxu (422
NOT_B2C/COMPLAINT_NOT_ALLOWEDna koncie prywatnym). - Limit symulatora: 60 akcji na godzinę na konto — po przekroczeniu 429
SIMULATOR_LIMITz nagłówkiemRetry-After. Obowiązują też zwykłe limity planu (429TOO_MANY_REQUESTS), więc przy serii wywołań odczekajdetails.retryAfterMsi ponów. - Żeby czytać zamówienia przez
/order/…, konto musi mieć wybraną tę integrację do obsługi zamówień (panel sprzedaży → Integracje) — inaczej 403ORDERS_OWNED_BY_OTHER_INTEGRATION, tak jak na produkcji. - Poza środowiskiem sandbox trasy z tej tabeli (oprócz czterech z rozdziału „Symulator kupującego”) odpowiadają 403
SANDBOX_ONLY.