Zum Inhalt
HALOWERK

Rohstoffwerk

parcel bundling

Packs items into parcels by descending weight, first fit, within a maximum parcel weight and an optional maximum girth, prices each parcel with the cheapest matching bracket of the supplied rate table and compares the total against single shipment. The rate table is caller data: no carrier tariff is stored or redistributed. First fit is a heuristic, not a proven optimum.

POST https://material.halowerk.com/parcel-bundling

Eingaben

Felder des veröffentlichten Eingabeschemas
FeldTypPflichtBeschreibung
itemsarrayJaItems to ship. Girth limits apply only when every item carries all three dimensions.
ratesarrayJaOwn rate brackets; the cheapest fitting bracket wins.
max_parcel_weight_kgnumberNeinLimit per parcel; defaults to the heaviest bracket.
packaging_cost_eurnumberNeinPackaging cost per parcel.
Vollständiges Eingabeschema anzeigen
{
  "type": "object",
  "required": [
    "items",
    "rates"
  ],
  "additionalProperties": false,
  "properties": {
    "items": {
      "type": "array",
      "minItems": 1,
      "maxItems": 200,
      "description": "Items to ship. Girth limits apply only when every item carries all three dimensions.",
      "items": {
        "type": "object",
        "required": [
          "weight_kg"
        ],
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string"
          },
          "weight_kg": {
            "type": "number",
            "minimum": 0.001,
            "maximum": 1000
          },
          "length_cm": {
            "type": "number",
            "minimum": 0.1,
            "maximum": 500
          },
          "width_cm": {
            "type": "number",
            "minimum": 0.1,
            "maximum": 500
          },
          "height_cm": {
            "type": "number",
            "minimum": 0.1,
            "maximum": 500
          },
          "quantity": {
            "type": "integer",
            "minimum": 1,
            "maximum": 500,
            "default": 1
          }
        }
      }
    },
    "rates": {
      "type": "array",
      "minItems": 1,
      "maxItems": 40,
      "description": "Own rate brackets; the cheapest fitting bracket wins.",
      "items": {
        "type": "object",
        "required": [
          "max_weight_kg",
          "price_eur"
        ],
        "additionalProperties": false,
        "properties": {
          "label": {
            "type": "string"
          },
          "max_weight_kg": {
            "type": "number",
            "minimum": 0.001,
            "maximum": 1000
          },
          "max_girth_cm": {
            "type": "number",
            "minimum": 1,
            "maximum": 1000
          },
          "price_eur": {
            "type": "number",
            "minimum": 0,
            "maximum": 100000
          }
        }
      }
    },
    "max_parcel_weight_kg": {
      "type": "number",
      "minimum": 0.1,
      "maximum": 1000,
      "description": "Limit per parcel; defaults to the heaviest bracket."
    },
    "packaging_cost_eur": {
      "type": "number",
      "minimum": 0,
      "maximum": 10000,
      "default": 0,
      "description": "Packaging cost per parcel."
    }
  }
}

Originalschema öffnen

Veröffentlichtes Eingabebeispiel

{
  "items": [
    {
      "weight_kg": 0.001,
      "quantity": 1
    }
  ],
  "rates": [
    {
      "max_weight_kg": 0.001,
      "price_eur": 0
    }
  ],
  "packaging_cost_eur": 0
}

Ergebnis & Dokumentation

Veröffentlichtes Ergebnisschema anzeigen
{
  "$ref": "https://material.halowerk.com/parcel-bundling/schema#/outputSchema"
}

Veröffentlichtes Ergebnisbeispiel öffnen

Maschinenlesbare Dokumentation dieses Hubs

Quelle dieser Seite: der veröffentlichte HALOWERK-Katalog. Stand: 2026-11-01, 15:19 UTC.

Weitere Endpunkte dieses Hubs

Alle Endpunkte dieses Hubs →