Loadhance

Loadhance API and AI assistants

Connect your ERP, WMS or TMS, or your AI assistant, to Loadhance: read your cargo spaces and items, calculate 3D load plans, save them as shipments and share them. Included in the Business and Enterprise plans.

Authentication

An administrator creates API keys in Loadhance under Company → API and AI assistants. Each key is shown once; send it with every request as Authorization: Bearer lh_…. Keys can be revoked at any time. Limits: 120 requests per minute per key; calculations are queued, and if the queue is full the API answers 429: retry after a few seconds.

Endpoints

Base URL: https://app.loadhance.com/api/v1. Measures are in centimetres and kilograms, as in the application.

Calculate a plan

curl -X POST https://app.loadhance.com/api/v1/plan \
  -H "Authorization: Bearer lh_your_key" -H "Content-Type: application/json" \
  -d '{ "space_id": "s40hc",
        "items": [
          { "item_code": "SB 60", "quantity": 40, "stop": 1 },
          { "code": "BOX-A", "length_cm": 120, "width_cm": 80, "height_cm": 100,
            "weight_kg": 180, "quantity": 12, "keep_upright": true, "stop": 2 } ],
        "save_as": "Order 2614", "public_link": true }'

Each item either references the catalogue (item_code, measures and rules taken from there) or gives length_cm, width_cm, height_cm and weight_kg (one piece), with optional keep_upright, no_rotation, no_stacking, full_base_support (when stacked, it rests on its whole base) and zone ("back" or "door", with zone_within_m: the whole item stays within that many metres of the back wall or of the door). stop is the delivery stop: stop 1 is loaded at the back, the last one near the door. Other options: objective ("volume" or "pieces"), include_positions (the position of every piece, in mm from the back left corner), save_as and public_link. Up to 500 rows and 5,000 pieces per request.

Dangerous goods

Set dangerous_goods to "road" (ADR 2025, § 7.5.2.1 and § 7.5.2.2) or "sea" (IMDG Code, Amendment 42-24, § 7.2.4, § 7.3.4.1 and § 7.3.4.2) and declare on each item what the consignor put on the transport document: hazard_label (for example "3", "8", "1.4", "4.1+1"), hazard_sublabels, compatibility_group for class 1 (A to S), packing_group, un_number and, for foodstuffs, foodstuff. The plan keeps apart the items whose labels may not travel in the same space, and lists them in not_loaded with reason dangerous_goods_incompatible:

"dangerous_goods": "sea",
"items": [ { "code": "CEL 07", "length_cm": 46, "width_cm": 50, "height_cm": 118, "weight_kg": 671,
             "quantity": 45, "hazard_label": "3", "un_number": "1202" },
           { "code": "SB 60", "length_cm": 64, "width_cm": 66, "height_cm": 90, "weight_kg": 1680,
             "quantity": 40, "hazard_label": "1", "compatibility_group": "B" },
           { "item_code": "ALKALI 30", "quantity": 16, "hazard_label": "8" } ]

The check follows the two general compatibility tables only. It does not say that a load is compliant: the Dangerous Goods List (column 16b) may impose stricter conditions for a single UN number, limited and excepted quantity exemptions are not considered, and the declaration and the stowage remain the consignor's and the person in charge of the cargo's responsibility. When the compatibility cannot be decided from the declared data alone (class 1 without a compatibility group, the notes a/b/c/d of ADR § 7.5.2.1), the item is reported rather than loaded.

{ "space": { "id": "s40hc", "name": "Container 40' HC", ... },
  "pieces_loaded": 52, "pieces_total": 52, "volume_fill": 0.412, "volume_loaded_m3": 30.88,
  "weight_kg": 3840, "weight_fill": 0.13, "centre_of_gravity_m_from_back": 3.1, "left_share": 0.5,
  "not_loaded": [], "shipment_id": "…", "app_url": "https://app.loadhance.com/",
  "public_url": "https://app.loadhance.com/v/…" }

Pieces that do not fit are listed in not_loaded with the reason: too_large_for_space, payload_exceeded, no_space_left, constraints, incomplete_set or dangerous_goods_incompatible. Errors come back as { "error": "…" } with status 400 (invalid request), 401 (missing or revoked key), 403 (plan without API), 429 (limit or busy) or 503 (calculation too long).

AI assistants (MCP)

The same services are available to AI assistants through the Model Context Protocol: endpoint https://app.loadhance.com/api/mcp, transport Streamable HTTP, with the same Authorization header. Tools: list_cargo_spaces, list_items and plan_load. In assistants that support remote MCP servers with custom headers, the configuration looks like this:

{ "mcpServers": { "loadhance": { "type": "http",
    "url": "https://app.loadhance.com/api/mcp",
    "headers": { "Authorization": "Bearer lh_your_key" } } } }

Then ask, for example: “How many SB 60 fit in a 40' HC? Save the plan as Order 2614 and give me the link for the warehouse.”

Need a custom integration with your management software? Tell us what you need.

Plan your own load. Try the calculator without signing up, or start the free 30-day trial to save shipments, import packing lists and print PDF reports.