Skip to content
HALOWERK

Ortwerk

box fit

Boxes are tried from the smallest inner volume upwards. Fast rejections: total item volume larger than the box, an item that fits in no orientation, or weight (items + tare) above the box limit. Otherwise items are packed largest first: each item takes the lowest, then front-most, then left-most free extreme point (Crainic, Perboli and Tadei 2008) in the first of up to six orientations (flat ones first) that stays inside the box, overlaps no placed item and rests on at least 70 % of its base.

POST https://ort.halowerk.com/v1/box-fit

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
itemsarrayYes
boxesarrayYes
padding_cmnumberNoCushioning added on every side of each item.
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "items",
    "boxes"
  ],
  "properties": {
    "items": {
      "type": "array",
      "minItems": 1,
      "maxItems": 40,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "length_cm",
          "width_cm",
          "height_cm"
        ],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 60
          },
          "length_cm": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 400
          },
          "width_cm": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 400
          },
          "height_cm": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 400
          },
          "quantity": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 1
          },
          "weight_kg": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000
          },
          "rotatable": {
            "type": "boolean",
            "default": true,
            "description": "false keeps the given orientation (height stays up)."
          }
        }
      }
    },
    "boxes": {
      "type": "array",
      "minItems": 1,
      "maxItems": 30,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "inner_length_cm",
          "inner_width_cm",
          "inner_height_cm"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60
          },
          "inner_length_cm": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 400
          },
          "inner_width_cm": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 400
          },
          "inner_height_cm": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 400
          },
          "max_weight_kg": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 1000
          },
          "tare_weight_kg": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          }
        }
      }
    },
    "padding_cm": {
      "type": "number",
      "minimum": 0,
      "maximum": 10,
      "default": 0,
      "description": "Cushioning added on every side of each item."
    }
  }
}

Open original schema

Published input example

{
  "items": [
    {
      "name": "Book",
      "length_cm": 30,
      "width_cm": 20,
      "height_cm": 10,
      "weight_kg": 1.2
    }
  ],
  "boxes": [
    {
      "name": "S",
      "inner_length_cm": 25,
      "inner_width_cm": 20,
      "inner_height_cm": 15
    },
    {
      "name": "M",
      "inner_length_cm": 35,
      "inner_width_cm": 25,
      "inner_height_cm": 15
    }
  ]
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub โ†’