Next Commerce API
REST-API für Hersteller und Händler. Produkte importieren, Händler verwalten, Bestellungen verarbeiten und GPSR-Compliance steuern.
Base URL
https://portal.next-commerce.io
📖
Übersicht
🏭 Hersteller-API
Produkte, Händler, Webhooks, Compliance / GPSR
🏪 Händler-API
Inventar, Zuweisungen, Stripe-Auszahlungen
🔒 Session-Cookie
NextAuth.js. Öffentliche Widget-Endpunkte: kein Auth.
📦 application/json
Standard. Ausnahmen als
multipart/form-data markiert.⚙️
Konventionen
| Feld | Hinweis | Beispiel |
|---|---|---|
| Preise | Integer · Cent | 2500 = 25.00 EUR |
| Länder | ISO 3166-1 alpha-2 | DE, AT, CH |
| Zeitstempel | ISO 8601 | 2026-04-17T10:30:00Z |
| SKU | Eindeutig je Hersteller | brandId + sku |
Pagination Envelope
{
"success": true,
"data": [...],
"pagination": {
"page": 1, "limit": 30, "totalCount": 142,
"hasNextPage": true, "hasPreviousPage": false
}
}🔑
Authentifizierung
Session-Cookie via NextAuth.js
ℹ️
Session-Cookie: Alle Dashboard-APIs benötigen einen gültigen Session-Cookie. Öffentliche Endpunkte (Widget, Checkout) sind auth-frei.
POST
/api/auth/registerPOST
/api/auth/callback/credentialsPOST
/api/auth/forgot-passwordGET
/api/auth/verify-email?token=xxx📦
Hersteller — Produkte
role: BRAND
GET
/api/brand/products?page=1&limit=30POST
/api/brand/productsGET
/api/brand/products/:idPOST
/api/brand/products/bulk-importPOST
/api/brand/products/bulk-assignPOST
/api/brand/products/activate🤝
Hersteller — Händler
role: BRAND
GET
/api/brand/dealers?productId=xxxPATCH
/api/brand/dealers/countriesPOST
/api/brand/dealers/:dealerId/assign-productsPOST
/api/brand/invitations🔔
Hersteller — Webhooks
role: BRAND
💡
Webhooks senden POST bei Bestellereignissen. Retry-Backoff: 1 min → 5 min → 30 min → 2 Std → 24 Std.
POST
/api/brand/webhooks🛡️
Hersteller — Compliance / GPSR
role: BRAND · ListingShield
ℹ️
Compliance kaskadiert: Hersteller → Kategorie → Produkt. Produktwerte überschreiben Kategorie-Werte.
GET
/api/brand/compliance/companyPOST
/api/brand/compliance/categoriesGET
/api/brand/products/:id/compliancePOST
/api/brand/compliance/invite-dealer📦
Händler — Inventar
role: DEALER
POST
/api/dealer/inventoryPUT
/api/dealer/inventory/:idDELETE
/api/inventory/:id📋
Händler — Zuweisungen
role: DEALER
GET
/api/dealer/assignments?status=PENDINGPOST
/api/dealer/assignments/:id/acceptDELETE
/api/dealer/assignments/:id🛒
Händler — Bestellungen
role: DEALER
POST
/api/dealer/orders/refund💰
Händler — Stripe
role: DEALER
💡
Händler erhalten ihre Marge via Stripe Split-Payment automatisch bei Kaufabschluss.
POST
/api/dealer/stripe/onboarding-link📡
Webhook Events
| Event | Wann |
|---|---|
| order.created | Bestellung erstellt, Zahlung ausstehend |
| order.confirmed | Zahlung erfolgreich |
| order.fulfilled | Versandt |
Webhook Payload
{
"event": "order.created",
"timestamp": "2026-04-17T10:30:00Z",
"data": {
"orderId": "order_id", "orderCode": "ORD-12345",
"grandTotal": 10700, // 107,00 EUR
"currency": "EUR",
"customer": { "email": "customer@example.com" },
"items": [{ "sku": "ABC-123", "quantity": 1, "dealerId": "dealer_id" }]
}
}⚠️
Fehler & HTTP-Codes
Error Format
{
"error": "Human-readable message",
"code": "MACHINE_READABLE_CODE",
"required": ["field1"]
}| Status | Bedeutung |
|---|---|
200 | OK |
400 | Validation error |
401 | Not authenticated |
403 | Not authorized / COUNTRY_NOT_ASSIGNED |
404 | Not found |
409 | Conflict |
429 | Rate limited |
500 | Server error |
🚦
Rate Limits
| Tier | Limit | Fenster | Gilt für |
|---|---|---|---|
| AUTH | 5 | 1 min / IP | Register, login, password reset |
| REGISTRATION_EMAIL | 5 | 24h / email | Registration only |
| AUTHENTICATED | 500 | 1 min / IP | All dashboard APIs |
| PUBLIC | 100 | 1 min / IP | Widget, checkout |
429 Response
{ "error": "Too many requests", "retryAfter": 45 }