Skip to content
HALOWERK

Calculators and Rule Checks

shop basket pack quantity plan

Shop pack selection finds the lowest cost combination of pack sizes that supplies the quantity requested. Use it when an agent needs checking whether a larger offered pack truly saves money.

POST https://rechen.halowerk.com/v1/shop-basket-pack-quantity-plan

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
needintegerYes
packsarrayYes
costsarrayYes
Show full input schema
{
  "type": "object",
  "properties": {
    "need": {
      "type": "integer",
      "minimum": 1,
      "maximum": 350
    },
    "packs": {
      "type": "array",
      "items": {
        "type": "integer",
        "minimum": 1,
        "maximum": 100
      },
      "maxItems": 12,
      "minItems": 1
    },
    "costs": {
      "type": "array",
      "items": {
        "type": "integer",
        "minimum": 1,
        "maximum": 1000000
      },
      "maxItems": 12,
      "minItems": 1
    }
  },
  "required": [
    "need",
    "packs",
    "costs"
  ],
  "additionalProperties": false
}

Open original schema

Published input example

{
  "need": 6,
  "packs": [
    1,
    3,
    6
  ],
  "costs": [
    255,
    755,
    1490
  ]
}

Result & documentation

Show published result schema
{
  "type": "object",
  "required": [
    "measured_at",
    "source",
    "data",
    "limitations"
  ],
  "properties": {
    "measured_at": {
      "type": "string"
    },
    "source": {
      "type": "object",
      "required": [
        "reference",
        "retrieved_at"
      ],
      "properties": {
        "reference": {
          "type": "string"
        },
        "retrieved_at": {
          "type": "string"
        }
      }
    },
    "data": {
      "type": "object",
      "properties": {
        "cost": {
          "type": "integer"
        },
        "supplied": {
          "type": "integer"
        },
        "packs_used": {
          "type": "array",
          "items": {
            "type": "integer"
          }
        }
      },
      "required": [
        "cost",
        "supplied",
        "packs_used"
      ]
    },
    "limitations": {
      "type": "string"
    }
  }
}

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-12-05 UTC.

More endpoints in this hub

All endpoints in this hub →