Developers

SENT Service API documentation

Submit SENT declarations to the Polish PUESC system straight from your ERP, WMS or TMS. One JSON API – we handle SOAP, WS-Security and the asynchronous responses for you.

Basics

Base URL
https://sentservice.pl/api/v1/sent/
Format
JSON over HTTPS, UTF-8, POST requests
Authentication
Your SENT Service account login and password in the request body
Environments
"env": "test" (PUESC test) or "env": "prod" (PUESC production)
PDF documentation
Download PDF (Polish) – version 1.0, 232 KB

Webhooks

Instead of polling /api/v1/sent/documents, register an HTTPS endpoint in the client panel (Moje konto → Webhooki). We POST a JSON event when a declaration changes status – usually within 2 minutes.

Events
document.accepted (SENT number and keys), document.rejected (SENT_500), document.error, document.sent, document.closed; ping from the “Send test” button
Headers
X-SentService-Event, X-SentService-Delivery (unique id – deliveries can repeat, deduplicate on it), X-SentService-Signature: t=<unix>,v1=<hex>
Signature
v1 = HMAC_SHA256(secret, t + "." + raw_body); reject when it does not match or |now − t| > 300 s
Delivery
HTTPS on port 443, public address; respond 2xx within 8 s. Retries after 1, 5, 15 min, 1, 3, 6, 12 and 24 h; the endpoint is disabled after 50 consecutive failures.
{
  "id": "1f0c6c2e-…",
  "event": "document.accepted",
  "created_at": "2026-10-23T10:15:02+02:00",
  "data": { "document": {
    "uuid": "…", "env": "prod", "msg_type": "SENT_100", "doc_id": "ORDER-2026-0142",
    "status": "accepted", "sys_ref": "…", "sent_number": "SENT20261023000127",
    "keys": { "sender": "KS-…", "recipient": "KR-…", "carrier": "KD-…" },
    "error_code": null, "error_desc": null, "created_at": "…", "sent_at": "…" } }
}

Client libraries (SDK)

Official, dependency-free clients with typed errors, waitForResult and webhook signature verification:

PHP 8.1+ (Composer)
composer require bsdnetpl/sentservice-client
.NET 8 (NuGet)
dotnet add package SentService.Client
Node.js 18+ (npm, TypeScript types)
npm i sentservice-client

Need help with integration? Contact us (Polish or English).