Load classes

If no further settings are available we default to the vehicle type capacity values. Ideally we use the more specific vehicle settings.

In order to assign shipments to the appropriate vehicles with regards to load dimensions like pallet places, weight, volume, width and height, you can define load classes. This helps to soften a hard boundary between vehicle capacity by introducing a smooth transition that extends the room for optimization.
Typically we use load classes to define "LNV" and "SNV" (which reference small trucks with low number of pallet places and low loading weight, e.g. 6 tons loading weight and 12 pallets, versus bigger trucks with e.g. 32 pallet places and an total weight of 40 tons).

import requests

url = "https://customer_id.prd.smartlane.io/api/load_class"

payload = {
    "name": "LNV",
    "load_thresholds": {
        "load": [0, 1000],
        "load_2": [0, 250],
        "load_3": [0, 99999]
    }
}
headers = {
    "Accept": "application/json",
    "Content-Type": "application/json"
}

response = requests.request("POST", url, json=payload, headers=headers)

print(response.text)

Check your settings with this call:

import requests

url = "https://customer_id.prd.smartlane.io/api/load_class"

headers = {"Accept": "application/json"}

response = requests.request("GET", url, headers=headers)

print(response.text)

And you will get the current load classes:

{
  "name": "LNV",
  "load_thresholds": {
    "load": [
      0,
      1000
    ],
    "load_2": [
      0,
      250
    ],
    "load_3": [
      0,
      99999
    ]
  }
}