API-Schlüssel
Erstellen Sie einen Schlüssel in Ihrer Verwaltung unter Einstellungen › API. Ein Schlüssel „Nur lesen“ kann nur lesen; ein Schlüssel „Lesen und schreiben“ kann alles ändern. Der Schlüssel wird nur einmal angezeigt: Bewahren Sie ihn wie ein Passwort auf. Sie können ihn jederzeit widerrufen.
Authentifizierung
Senden Sie den Schlüssel im Header Authorization. Ersetzen Sie {handle} durch die Kennung Ihres Shops (die aus ihr-name.kelcommerce.eu).
Authorization: Bearer kc_…
https://admin.kelcommerce.be/api/commerce/manage/{handle}/…
Regeln
- JSON für Ein- und Ausgabe, UTF-8. Beträge sind Zeichenketten mit zwei Dezimalstellen (
"19.90"), inkl. MwSt. - Listen werden mit
start(ab 0) undcountpaginiert; die Gesamtzahl steht im HeaderX-Total-Count. - Limit: 120 Anfragen pro Minute und Schlüssel. Darüber: Status 429 und Header
Retry-After. - Fehler:
{"error": "code", "message": "…"}mit Status 401 (Schlüssel fehlt, widerrufen oder kein Business-Tarif), 404 (nicht gefunden), 417 (abgelehnt), 429 (Limit). - Ein Schlüssel gibt nie Zugriff auf Abrechnung, Team, API-Schlüssel oder Zahlungseinstellungen.
Beispiel: bezahlte Bestellungen zum Versand
curl -H "Authorization: Bearer kc_…" \
"https://admin.kelcommerce.be/api/commerce/manage/{handle}/orders?status=paid&start=0&count=50"
Referenz
Products
| GET | /products?q=&status=&category=&start=0&count=50 | List products (X-Total-Count header gives the total). |
| POST | /products | Create a product with its options, variants and categories. |
| GET | /products/{id} | One product with variants, stock and media. |
| PUT | /products/{id} | Replace a product; variants with an id are kept, without id created, missing ones deleted. |
| DELETE | /products/{id} | Delete a product. |
| POST | /products/{id}/media | Add an image: {filename, contentType, data: base64, alt}. JPEG, PNG or WebP, 8 MB max. |
Categories
| GET | /categories | All categories (tree via parentId). |
| POST · PUT · DELETE | /categories[/{id}] | Create, update, delete. |
Orders
| GET | /orders?status=pending|paid|fulfilled|cancelled|refunded&q=&start&count | List orders. |
| GET | /orders/{id} | One order with lines, addresses, payment and fulfilment. |
| POST | /orders/{id}/fulfill | Mark shipped: {carrier, trackingNumber, trackingUrl}. The customer gets an e-mail. |
| POST | /orders/{id}/cancel | Cancel (a paid order is restocked and marked refunded). |
| PUT | /orders/{id}/note | Internal note: {note}. |
| GET | /orders/{id}/peppol.xml | Peppol BIS Billing 3.0 UBL invoice of a paid order with a buyer VAT number (numbered on the first call; not sent on Peppol). |
Customers and B2B
| GET | /customers?q=&b2b=pending|approved&start&count | List customers. |
| GET | /customers/{id} | One customer with their orders. |
| PUT | /customers/{id} | B2B status and price group: {b2bStatus, groupId}. |
| GET · POST · PUT · DELETE | /customer-groups[/{id}] | Price groups: {name, discountPercent}. |
| GET · PUT | /customer-groups/{id}/prices | Group price list: [{variantId, price, minQuantity}] (PUT replaces the list). |
Shop settings
| GET · PUT | /shop | Name, languages, address, theme… |
| GET · POST · PUT · DELETE | /shipping-rates[/{id}] | Shipping rates. |
| GET · POST · PUT · DELETE | /discounts[/{id}] | Discount codes. |
| GET · POST · PUT · DELETE | /pages[/{id}] | Content pages. |
| GET | /dashboard?days=30 | Sales totals, series and top products. |
Schlüssel erstellen Business-Tarif
Eine Frage? Schreiben Sie an support@kelcommerce.be.