Kubova.
Sign inGet started
Home

Kubova REST API

Pack containers from any language. Bearer auth, JSON in / JSON out.

Looking for MCP setup? Read the MCP guide

Authentication

Every request needs an API key in the Authorization header:

Authorization: Bearer kbv_abc123...

Generate keys from the dashboard once you're on the Pro plan.

Manage API keys

Verify a key

Use the /me endpoint to confirm your key is valid before sending pack requests:

curl https://kubova-web-next.vercel.app/api/v1/me \
  -H "Authorization: Bearer kbv_..."

Pack containers

POST to /api/v1/pack with cargos and a container. The packer returns placements per container, used volume, and any unplaced pieces.

curl -X POST https://kubova-web-next.vercel.app/api/v1/pack \
  -H "Authorization: Bearer kbv_..." \
  -H "Content-Type: application/json" \
  -d '{
    "cargos": [{
      "id": "sku-a",
      "name": "Box A",
      "shape": "box",
      "lengthCm": 50, "widthCm": 40, "heightCm": 30,
      "quantity": 20,
      "weightKg": 5,
      "color": "#e85d3a",
      "includeInLoading": true,
      "allowStacking": true,
      "allowRotation": true
    }],
    "container": {
      "id": "40hc",
      "name": "40HC",
      "innerLengthCm": 1203.0,
      "innerWidthCm": 235.2,
      "innerHeightCm": 269.7,
      "doorWidthCm": 233.5,
      "doorHeightCm": 258.5,
      "maxPayloadKg": 26330
    },
    "options": {
      "loadingDirection": "floor-to-top",
      "vnsTimeLimitMs": 5000
    }
  }'

On success returns ok=true with result.containers and result.unplaced. On error returns ok=false with an error string.

Rate limits & timeouts

  • Default 60 requests per minute per key (configurable per-key on request).
  • Pack requests time out after 290 seconds. That covers every workload we've seen so far; the asynchronous job pattern lands when real users start hitting the ceiling.
  • Each key has a scope set (pack, report). The /pack endpoint needs the pack scope.
  • API access is available on the Pro plan and above.

Error codes

ErrorHTTPMeaning
missing_bearer_token401No Authorization header was sent.
invalid_token401The token does not match any active key.
token_revoked401The key was revoked from the dashboard.
token_expired401The key passed its expiration date.
scope_missing:pack403The key does not have the required scope.
rate_limit_exceeded429More than 60 requests in the last minute.
upstream_unreachable502The packing service was unreachable. Retry after a backoff.