API Reference

Next Commerce API

REST API for manufacturers and dealers. Import products, manage dealers, process orders, and control GPSR compliance.

Base URL https://portal.next-commerce.io
📖

Overview

🏭 Manufacturer API
Products, dealers, webhooks, GPSR compliance
🏪 Dealer API
Inventory, assignments, Stripe payouts
🔒 Session-Cookie
NextAuth.js. Public widget endpoints need no auth.
📦 application/json
Default. Exceptions marked multipart/form-data.
⚙️

Conventions

FieldNoteExample
PreiseInteger · Cent2500 = 25.00 EUR
CountriesISO 3166-1 alpha-2DE, AT, CH
TimestampsISO 86012026-04-17T10:30:00Z
SKUUnique per brandbrandId + sku
Pagination Envelope
{
  "success": true,
  "data": [...],
  "pagination": {
    "page": 1, "limit": 30, "totalCount": 142,
    "hasNextPage": true, "hasPreviousPage": false
  }
}
🔑

Authentication

Session-Cookie via NextAuth.js

ℹ️
Session cookie: All dashboard APIs require a valid session cookie. Public widget/checkout endpoints are auth-free.
POST/api/auth/register
POST/api/auth/callback/credentials
POST/api/auth/forgot-password
GET/api/auth/verify-email?token=xxx
📦

Manufacturer — Products

role: BRAND

GET/api/brand/products?page=1&limit=30
POST/api/brand/products
GET/api/brand/products/:id
POST/api/brand/products/bulk-import
POST/api/brand/products/bulk-assign
POST/api/brand/products/activate
🤝

Manufacturer — Dealers

role: BRAND

GET/api/brand/dealers?productId=xxx
PATCH/api/brand/dealers/countries
POST/api/brand/dealers/:dealerId/assign-products
POST/api/brand/invitations
🔔

Manufacturer — Webhooks

role: BRAND

💡
Webhooks send POST on order events. Retry backoff: 1 min → 5 min → 30 min → 2h → 24h.
POST/api/brand/webhooks
🛡️

Manufacturer — Compliance / GPSR

role: BRAND · ListingShield

ℹ️
Compliance cascades: brand → category → product. Product-level values override category values.
GET/api/brand/compliance/company
POST/api/brand/compliance/categories
GET/api/brand/products/:id/compliance
POST/api/brand/compliance/invite-dealer
📦

Dealer — Inventory

role: DEALER

POST/api/dealer/inventory
PUT/api/dealer/inventory/:id
DELETE/api/inventory/:id
📋

Dealer — Assignments

role: DEALER

GET/api/dealer/assignments?status=PENDING
POST/api/dealer/assignments/:id/accept
DELETE/api/dealer/assignments/:id
🛒

Dealer — Orders

role: DEALER

POST/api/dealer/orders/refund
💰

Händler — Stripe

role: DEALER

💡
Dealers receive their margin via Stripe Split-Payment automatically at checkout.
POST/api/dealer/stripe/onboarding-link
📡

Webhook Events

EventWhen
order.createdOrder created, awaiting payment
order.confirmedPayment succeeded
order.fulfilledOrder shipped/fulfilled
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" }]
  }
}
⚠️

Errors & HTTP Codes

Error Format
{
  "error": "Human-readable message",
  "code": "MACHINE_READABLE_CODE",
  "required": ["field1"]
}
StatusMeaning
200OK
400Validation error
401Not authenticated
403Not authorized / COUNTRY_NOT_ASSIGNED
404Not found
409Conflict
429Rate limited
500Server error
🚦

Rate Limits

TierLimitWindowApplies To
AUTH51 min / IPRegister, login, password reset
REGISTRATION_EMAIL524h / emailRegistration only
AUTHENTICATED5001 min / IPAll dashboard APIs
PUBLIC1001 min / IPWidget, checkout
429 Response
{ "error": "Too many requests", "retryAfter": 45 }