API quick start
Plan shipments from your own software (ERP, WMS, TMS, e-commerce). The complete reference, with every field, is the interactive API documentation (link on the Developers page); this page gets you to your first call.
1. Create a key
- Go to Developers → New API key (permission Manage API keys; the API must be enabled for your organization).
- Name it (e.g. ERP production), choose the mode and tick its permissions:
- Live keys work on your real data and count in your usage;
- Test keys work on separate test data, and their plans do not count. Use them while you integrate.
- Create the key and copy it now:
pk_live_…orpk_test_…. It is shown only once.
A key can only use permissions you have, and loses any permission its creator loses (or all of them if the creator leaves). Revoke a key at any time; it stops working at once.
2. First call
curl https://API_URL/v1/me \
-H "Authorization: Bearer pk_test_…"
The answer gives the organization, the mode and the permissions of the key.
3. Plan a shipment
curl https://API_URL/v1/plans \
-H "Authorization: Bearer pk_test_…" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: PO-4711" \
-d '{
"reference": "PO-4711",
"lines": [
{ "code": "A-100", "quantity": 600 },
{ "label": "Spare motor", "quantity": 2,
"length_cm": 70, "width_cm": 50, "height_cm": 45, "weight_kg": 38 }
]
}'
- Lines are catalog codes with a quantity, or items given by size and weight.
- Without
profile_id, the organization's default profile is used; you can also send aprofileinline (start_kind,levels,options). - By default (
"wait": true) the plan is in the answer. With"wait": falsethe answer is 202 and the result arrives through theplan.completedwebhook, or withGET /v1/shipments/{id}. - Add
"include": ["placements"]to receive every filled packaging with the position of each unit (x, y, z in cm, loading step).
The answer contains the request (id, status, lines) and its plan: metrics (final count, fill, cost, not placed), levels (packaging per level), warnings, unresolved_lines and the comparison of strategies.
4. From a document
curl https://API_URL/v1/documents \
-H "Authorization: Bearer pk_test_…" \
-F file=@invoice.pdf -F reference=INV-905094
Always asynchronous (202). With mode=plan (default) the plan is computed as soon as every line matches the catalog; otherwise the request waits in needs_review: fix it with PUT /v1/shipments/{id}/lines, then POST /v1/shipments/{id}/plan. Use mode=extract_only to only read the document.
Other endpoints
| Endpoint | Use |
|---|---|
GET /v1/shipments, GET /v1/shipments/{id} |
list and read requests (cursor pagination) |
POST /v1/shipments/{id}/plan |
compute again, optionally with a strategy |
POST /v1/shipments/{id}/share |
share link, iframe code and 3D model URL |
GET /v1/shipments/{id}/model.glb |
3D model of a packaging |
GET/POST /v1/products, /v1/packagings, /v1/pack-rules |
read and upsert your catalog (1,000 per call) |
GET /v1/profiles |
packing profiles |
POST /v1/catalog/imports |
import a catalog file |
GET /v1/usage |
consumption and limits |
/v1/webhook-endpoints |
manage webhooks |
Rules of the road
- Errors:
{ "error": { "code", "message", "details" } }with the HTTP status.400invalid request (details list the fields),401key,403permission,404,409conflict,422business error,429rate or usage limit,503service unavailable. - Idempotency: send
Idempotency-Keyon a POST to retry it safely: the first answer is replayed (headerIdempotent-Replayed: true); the same key with a different body answers409. - Rate limit: per key and per minute (120 by default, set on the key). Headers
RateLimit-Limit,RateLimit-Remaining,RateLimit-Reset. - Request id: each answer has an
X-Request-Id; give it to support. - Units: centimeters and kilograms.
- Logs: the Developers page shows the last requests of every key.