API Integrations

API's Documentation

Cargo Load Planner API is organized around REST. Our API accepts HTTP POST request with JSON data in the body of the post message using the Content-Type: application/json request header, returns JSON-encoded responses.
Cargo Load Planner API uses standard HTTP response codes.

BASE URL
https://www.cargo-load-planner.com/api/v1/calculator/container
JSON Input Object
                                
    {
        "multi": 0,
        "cal_type": "c",
        "boxes": [
            {
            "id": 1,
            "name": "box-1",
            "dim1": 45,
            "dim2": 55,
            "dim3": 65,
            "dim_uom": "cm",
            "weight": 10,
            "weight_uom": "kg",
            "count": 1,
            "tilt_length": 1,
            "tilt_width": 1,
            "stacked": 1,
            "heavy": 0,
            "color": "#ff0000",
            "group_id": 1
            },
            {
            "id": 1,
            "name": "box-2",
            "dim1": 75,
            "dim2": 40,
            "dim3": 35,
            "dim_uom": "cm",
            "weight": 10,
            "weight_uom": "kg",
            "count": 1,
            "tilt_length": 1,
            "tilt_width": 1,
            "stacked": 1,
            "heavy": 0,
            "color": "#ffff00"
            "group_id": 1
            }
        ],
        "container": {
            "id": 1,
            "name": "Standard 20 feet",
            "dim_uom": "cm",
            "x": 235,
            "y": 239,
            "z": 590,
            "volume": 33.2,
            "weight": 21770,
            "fs":0,
            "bs":0,
            "ls":0,
            "rs":0,
            "ts":0
        }
    }
                                
                            
Parameter Possible Values Type
multi Do we need to generate multiple containers. Possible values 1 / 0 number
cal_type Possible values c/p c for container and p for pallet string
Boxes (Array of Objects)
id unique id of carton/package number
name name of carton/package string
dim1 Length of carton/package number
dim2 Width of carton/package number
dim3 Height of carton/package number
dim_uom Unit of measurement for carton/package length width & height
possible values
mm
cm
meter
inch
feet
yard
string
weight Weight of carton/package number
weight_uom Unit of measurement of weight for carton/package weight
possible values
kg
lb
string
count Quantity of carton/package number
tilt_length will control carton/package rotation around length. Possible values (1,0) number
tilt_width will control carton/package rotation around width. Possible values (1,0) number
stacked Not implemnemented. Possible value 1 number
heavy Possible value 1/0 number
color carton/package color format:(#ff0000) hex value
group_id for sequential (order by) loading of packages. number
Container Object
name container name string
id container unique id number
dim_uom container's dimensions in possible values "cm" string
x container's width number
y container's height number
z container's length number
volume container's allowed volume number
weight container's allowed weight number
fs space to be left in front side of the container (always in mm) number
bs space to be left on back side of the container (always in mm) number
ls space to be left on left side of the container (always in mm) number
rs space to be left on right side of the container (always in mm) number
ts space to be left on top side of the packages (always in mm) number
JSON Output Object
                                
        {
            "status": "success",
            "description": "",
            "unique_id": "00fa52f3-6d5c-4520-908b-466d6db30e92",
            "multi": 0,
            "cal_type": "c",
            "best_option_id": 0,
            "boxes": [
                {
                    "id": 1,
                    "name": "box-1",
                    "dim1": 45,
                    "dim2": 55,
                    "dim3": 65,
                    "dim_uom": "cm",
                    "weight": 10,
                    "weight_uom": "kg",
                    "count": 1,
                    "tilt_length": 1,
                    "tilt_width": 1,
                    "stacked": 1,
                    "heavy":0,
                    "color": "#ff0000",
                    "group_id": 1
                },
                {
                    "id": 1,
                    "name": "box-2",
                    "dim1": 75,
                    "dim2": 40,
                    "dim3": 35,
                    "dim_uom": "cm",
                    "weight": 10,
                    "weight_uom": "kg",
                    "count": 1,
                    "tilt_length": 1,
                    "tilt_width": 1,
                    "stacked": 1,
                    "heavy": 0,
                    "color": "#ffff00",
                    "group_id": 1
                }
            ],
            "container": {
                "name": "Standard 20 feet",
                "id": 1,
                "dim_uom": "cm",
                "x": 235,
                "y": 239,
                "z": 590,
                "volume": 33.2,
                "weight": 21770,
                "fs":0,
                "bs":0,
                "ls":0,
                "rs":0,
                "ts":0
            },
            "item_placement_info": [
                {
                    "sno": 1,
                    "id": 1,
                    "name": "box-1",
                    "dim1": 450,
                    "dim2": 550,
                    "dim3": 650,
                    "weight": 10000,
                    "volume": 160875000,
                    "count": 1,
                    "tilt_length": 1,
                    "tilt_width": 1,
                    "stacked": 1,
                    "locx": 0,
                    "locy": 0,
                    "locz": 0,
                    "dimx": 650,
                    "dimy": 550,
                    "dimz": 450,
                    "packsno": 1,
                    "option_id": 0,
                    "pallet_id": 1,
                    "color": "0xff0000"
                },
                {
                    "sno": 0,
                    "id": 1,
                    "name": "box-2",
                    "dim1": 750,
                    "dim2": 400,
                    "dim3": 350,
                    "weight": 10000,
                    "volume": 105000000,
                    "count": 1,
                    "tilt_length": 1,
                    "tilt_width": 1,
                    "stacked": 1,
                    "locx": 650,
                    "locy": 0,
                    "locz": 0,
                    "dimx": 750,
                    "dimy": 350,
                    "dimz": 400,
                    "packsno": 2,
                    "option_id": 0,
                    "pallet_id": 1,
                    "color": "0xffff00"
                },

            ],
            "summary": [
                {
                    "option_id": 0,
                    "packed_weight": 20000,
                    "weight_percent": 0.09,
                    "packed_volume": 265875000,
                    "volume_percent": 0.80,
                    "max_volume": 33200000000.0,
                    "max_weight": 21770000
                },
                {
                    "option_id": 1,
                    "packed_weight": 20000,
                    "weight_percent": 0.09,
                    "packed_volume": 265875000,
                    "volume_percent": 0.80,
                    "max_volume": 33200000000.0,
                    "max_weight": 21770000
                },

            ],
            "summary2": [
                {
                    "option_id": 0,
                    "pallet_id": 1,
                    "packed_weight": 20000,
                    "weight_percent": 0.09,
                    "packed_volume": 265875000,
                    "volume_percent": 0.80,
                    "max_weight": 21770000,
                    "max_volume": 33200000000.0
                },
                {
                    "option_id": 1,
                    "pallet_id": 2,
                    "packed_weight": 20000,
                    "weight_percent": 0.09,
                    "packed_volume": 265875000,
                    "volume_percent": 0.80,
                    "max_weight": 21770000,
                    "max_volume": 33200000000.0
                },
            ],
            "un_allocated_items": [
            {
                "option_id": 0,
                "id": 1,
                "qty": 144
            },
            {
                "option_id": 1,
                "id": 1,
                "qty": 148
            },
            ]
        }
                                
                            
Parameter Possible outcome Type
status "success", "failed" string
description provided in case of "failed" status string
unique_id Calculation unique identification id string
multi Do we need to generate multiple containers. Possible values 1 / 0 number
cal_type Possible values c/p c for container and p for pallet string
best_option_id best calculation option id number
Boxes same as input object
container same as input object
item_placement_info
sno auto generated serial number number
id Product's ID number
name Product's name string
dim1 Product/package length number
dim2 Product/Package width number
dim3 Product/Package height number
weight Product/Package's weight number
volume Product/Package's volume number
count Product/Package's count number
tilt_length will control carton/package rotation around length. Possible values (1,0) number
tilt_width will control carton/package rotation around width. Possible values (1,0) number
stacked Not implemnemented. Possible value 1 number
locx product / package x co-ordinate number
locy product / package y co-ordinate number
locz product / package z co-ordinate number
dimx product / package x dimension number
dimy product / package y dimension number
dimz product / package z dimension number
packsno product / package packing order number
option_id calculation option under which this product is packed number
pallet_id calculation pallet/container inside option under which this product is packed number
color product / package color string
summary
option_id calculation's option id number
packed_weight weight packed in option number
weight_percent weight packed in percentage number
packed_volume volume packed in option number
volume_percent volume filled in precentage number
max_volume Total volume in option number
max_weight total weight in option number
summary2
option_id calculation's option id number
pallet_id calculation's pallet / container id inside option number
packed_weight weight packed number
weight_percent weight packed in percentage number
packed_volume volume packed number
volume_percent volume filled in precentage number
max_volume Total volume number
max_weight total weight number
un_allocated_items
option_id option id number
id product's id which is not packed number
qty product's quantity which is not packed number