Packfit
Schnellstart

Ihre erste Packberechnung in 3 Minuten

Kein Dashboard nötig — Key auf der Kommandozeile erzeugen und den Endpunkt aufrufen. Die vollständige Feldliste steht in der API-Referenz.

1

Test-Key holen

POST /api/signup
curl -X POST https://packfit.dev/api/signup \
  -H 'content-type: application/json' \
  -d '{ "email": "you@company.com", "company": "Company GmbH" }'

# → { "accountId": "…", "apiKey": "pf_test_…", "plan": "free" }

Der Key wird einmal angezeigt. Wir speichern nur seinen HMAC, er lässt sich also nicht wiederherstellen — verloren heißt neu erzeugen. Der Free-Tarif enthält 1.000 Berechnungen pro Monat.

2

Bestellung und Kartonsortiment beschreiben

POST /v1/pack
curl https://packfit.dev/v1/pack \
  -H "Authorization: Bearer $PACKFIT_KEY" \
  -H 'content-type: application/json' \
  -d '{
    "items": [
      { "sku": "MUG", "lengthMm": 120, "widthMm": 100, "heightMm": 110,
        "weightG": 380, "quantity": 6 },
      { "sku": "PAN", "lengthMm": 240, "widthMm": 240, "heightMm": 60,
        "weightG": 1450 },
      { "sku": "KNIFE-BLOCK", "lengthMm": 140, "widthMm": 110, "heightMm": 240,
        "weightG": 1900, "thisSideUp": true }
    ],
    "cartons": [
      { "id": "S", "innerLengthMm": 200, "innerWidthMm": 150,
        "innerHeightMm": 100, "maxPayloadG": 5000, "costCents": 35 },
      { "id": "M", "innerLengthMm": 400, "innerWidthMm": 300,
        "innerHeightMm": 260, "maxPayloadG": 20000, "costCents": 55 }
    ],
    "dimWeight": { "divisorCm3PerKg": 5000 }
  }'

Millimeter und Gramm, immer als ganze Zahlen. Der Packer wählt ausschließlich aus den Kartons, die Sie senden.

3

Den Packplan nutzen

Antwort (gekürzt)
{
  "cartons": [{
    "cartonId": "M",
    "fillRate": 0.64,
    "grossWeightG": 6690,
    "billableWeightG": 7000,
    "placements": [
      { "sku": "PAN", "x": 0, "y": 0, "z": 0,
        "lengthMm": 240, "widthMm": 240, "heightMm": 60, "orientation": 0 }
    ]
  }],
  "unpacked": [],
  "inputFingerprint": "12zzv44c"
}

Drei Wege, ihn einzusetzen: billableWeightG im Checkout für einen exakten Versandpreis ausweisen, placements als Packanweisung ins Lager geben oder inputFingerprint speichern und den Aufruf beim nächsten identischen Warenkorb ganz überspringen.

4

Derselbe Aufruf aus Ihrem Stack

JavaScript / TypeScript
const res = await fetch("https://packfit.dev/v1/pack", {
  method: "POST",
  headers: {
    authorization: `Bearer ${process.env.PACKFIT_KEY}`,
    "content-type": "application/json",
  },
  body: JSON.stringify({ items, cartons, dimWeight: { divisorCm3PerKg: 5000 } }),
});

if (res.status === 402) throw new Error("Packfit quota exhausted");
const plan = await res.json();
console.log(plan.cartons.length, "parcel(s)", plan.totalBillableWeightG, "g billable");
Python
import os, requests

r = requests.post(
    "https://packfit.dev/v1/pack",
    headers={"Authorization": f"Bearer {os.environ['PACKFIT_KEY']}"},
    json={"items": items, "cartons": cartons, "dimWeight": {"divisorCm3PerKg": 5000}},
    timeout=10,
)
r.raise_for_status()
plan = r.json()
print(len(plan["cartons"]), "parcel(s)", plan["totalBillableWeightG"], "g billable")
5

Kontingent im Blick behalten

Antwort-Header
Packfit-Quota-Limit:     1000
Packfit-Quota-Used:      37
Packfit-Quota-Remaining: 963
Packfit-Quota-Period:    2026-07
RateLimit-Limit:         60
RateLimit-Remaining:     59

Ein 402 bedeutet: Das Monatskontingent ist aufgebraucht. Ein 429 heißt, Sie rufen zu schnell auf — drosseln Sie anhand von Retry-After. Ein 422 (fehlerhafte Artikeldaten) kostet nie Kontingent.

6

Upgrade, wenn der Free-Tarif zu klein wird

POST /api/billing/checkout
curl https://packfit.dev/api/billing/checkout \
  -H "Authorization: Bearer $PACKFIT_KEY" \
  -H 'content-type: application/json' \
  -d '{ "plan": "growth" }'

# → { "url": "https://checkout.stripe.com/…" }  ← open in a browser

Bezahlte Tarife erlauben Überverbrauch, statt Ihren Checkout am Kontingent hart zu stoppen — siehe Preise.

Unsicher, ob sich das lohnt?

Schicken Sie einen Monat echter Bestellungen durch die Sparpotenzial-Analyse und sehen Sie die Differenz, bevor Sie irgendetwas integrieren.