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.
Test-Key holen
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.
Bestellung und Kartonsortiment beschreiben
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.
Den Packplan nutzen
{
"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.
Derselbe Aufruf aus Ihrem Stack
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");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")Kontingent im Blick behalten
Packfit-Quota-Limit: 1000
Packfit-Quota-Used: 37
Packfit-Quota-Remaining: 963
Packfit-Quota-Period: 2026-07
RateLimit-Limit: 60
RateLimit-Remaining: 59Ein 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.
Upgrade, wenn der Free-Tarif zu klein wird
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 browserBezahlte 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.