[Developer platform](/en/developers)

# 3D load planning

Send load spaces and units. Get every unit's position, utilisation and axle loads back, with the rules of real loading applied.

**Runs on:** The Transportial packing engine, which also runs the load calculator on this website.

| Endpoint                  | Permission         | What it does                                        |
| ------------------------- | ------------------ | --------------------------------------------------- |
| POST /load-plan/calculate | calculate:loadPlan | Pack units into load spaces from the request alone. |
| GET /load-plan/equipment  | stacking feature   | List the equipment catalogue with its codes.        |

Base URL `https://api.app.transportial.com/api`. Send `x-api-key` and `x-api-secret`, from an API access integration holding the permission above. Note that a missing permission answers 401 and missing authentication answers 403.

## What the engine does

The engine builds several greedy plans by placing units at extreme points, then improves the best with a genetic search for as long as options.timeBudgetMs allows. With a budget of 0 you get the best greedy plan.

It respects orientation, stackability, the weight allowed on top of a unit, the part of a base that must be supported, payload, axle loads, door openings and unload order: units for a later stop are loaded deeper.

## Load spaces

Use a catalogue code for standard trailers, containers, swap bodies and ULDs, or send your own inner dimensions. Listed load spaces are filled in order. All figures are whole millimetres and grams.

## Example

### 12 pallets and 8 drums in a mega trailer

Drums are not stackable and come off last, so they go in first, at the front.

Call

```
curl -X POST "https://api.app.transportial.com/api/load-plan/calculate" \
  -H "x-api-key: $TRANSPORTIAL_KEY" \
  -H "x-api-secret: $TRANSPORTIAL_SECRET" \
  -H "Content-Type: application/json" \
  -d @request.json
```

request.json

```
{
  "equipment": [{ "code": "EU_TRAILER_MEGA" }],
  "items": [
    { "id": "eur-pallets", "quantity": 12, "lengthMm": 1200, "widthMm": 800, "heightMm": 1500, "weightG": 450000, "unloadStop": 1 },
    { "id": "drums", "quantity": 8, "lengthMm": 600, "widthMm": 600, "heightMm": 900, "weightG": 200000, "stackable": false, "unloadStop": 2 }
  ],
  "options": { "timeBudgetMs": 500 }
}
```

Response

```
{
  "success": true,
  "result": {
    "status": "FITS",
    "equipment": [
      {
        "equipmentId": "EU_TRAILER_MEGA",
        "weightG": 7000000,
        "volumePercent": 19.64,
        "floorPercent": 25.62,
        "loadingMeters": 3.6,
        "axleLoads": [
          { "support": "FRONT", "loadG": 8651283, "maxG": 12000000 },
          { "support": "REAR", "loadG": 5348717, "maxG": 24000000 }
        ],
        "placements": [
          { "itemId": "drums", "unit": 0, "equipmentId": "EU_TRAILER_MEGA", "xMm": 0, "yMm": 0, "zMm": 0, "lengthMm": 600, "widthMm": 600, "heightMm": 900, "tipped": false, "sequence": 0, "loadStop": 0, "unloadStop": 2 }
        ]
      }
    ],
    "unplaced": []
  }
}
```

Trimmed to the first of 20 placements.

## Limits worth knowing

* At most 20 load spaces and 2,000 units per request.
* Successful calculations are metered on your plan. Past its free allowance, a 402 asks you to agree to the price: repeat the call with hasAgreedToPrice set to true.
* timeBudgetMs is at most 5,000.
* A status of DOES\_NOT\_FIT lists every unit left out in unplaced, with the reason.

## Questions

Do I need my own equipment data?

No. Catalogue codes cover common trailers, containers, swap bodies and ULDs with their published nominal dimensions.

How are axle loads checked?

When a load space has an axle model, the engine keeps the load within both supports. Catalogue entries can include one, and you can send your own.

[Create a developer account](https://portal.otms.transportial.com/auth/developer/register)[Read the guide](https://docs.transportial.com/examples/3d-load-planning)[How it works](/en/blog/3d-load-planning-api)

---
Canonical page: https://transportial.com/en/developers/algorithms/load-planning
