POSTAPI key
Compute a load plan
POSTloadingmcp-api.fly.dev/v1/plan
Pack a list of items into equipment and get a 3D plan plus a compliance verdict: utilisation, centre of gravity, crush and securing.
Request body
items
The cargo: each item has dimensions, weight and a quantity.
equipmentCode
Target equipment, for example 40HC. Omit to auto-size.
mode
ocean, road or air.
options
Solver options, for example stacking or DG rules.
Response fields
Derived from the example response.
ok
engine
equipmentCode
autoSized
plan
plan.utilisation_pct
plan.loaded
plan.unloaded
plan.cog
plan.cog.x
plan.cog.y
plan.cog.z
plan.violations
plan.securing
curl -X POST https://loadingmcp-api.fly.dev/v1/plan \
-H "Authorization: Bearer lmcp_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"equipmentCode":"40HC","mode":"ocean","items":[{"sku":"PLT-A","l_cm":120,"w_cm":100,"h_cm":145,"weight_kg":640,"qty":18}]}'const res = await fetch("https://loadingmcp-api.fly.dev/v1/plan", {
method: "POST",
headers: {
"Authorization": "Bearer lmcp_YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"equipmentCode": "40HC",
"mode": "ocean",
"items": [
{
"sku": "PLT-A",
"l_cm": 120,
"w_cm": 100,
"h_cm": 145,
"weight_kg": 640,
"qty": 18
}
]
})
});
const data = await res.json();import requests
res = requests.post(
"https://loadingmcp-api.fly.dev/v1/plan",
headers={"Authorization": "Bearer lmcp_YOUR_API_KEY"},
json={
"equipmentCode": "40HC",
"mode": "ocean",
"items": [
{
"sku": "PLT-A",
"l_cm": 120,
"w_cm": 100,
"h_cm": 145,
"weight_kg": 640,
"qty": 18
}
]
},
)
data = res.json() Response
{
"ok": true,
"engine": "packing-solver",
"equipmentCode": "40HC",
"autoSized": false,
"plan": {
"utilisation_pct": 84,
"loaded": 18, "unloaded": 0,
"cog": { "x": 0.51, "y": 0.49, "z": 0.38 },
"violations": [],
"securing": [ "Bracing at door end", "Dunnage row 3" ]
}
}