Skip to content
HALOWERK

Calculators and Rule Checks

shop basket coupon apportionment

Basket coupon allocation distributes a fixed discount across line values in whole minor units. Use it when an agent needs checking line-level prices after an order coupon.

POST https://rechen.halowerk.com/v1/shop-basket-coupon-apportionment

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
linesarrayYes
discountintegerYes
Show full input schema
{
  "type": "object",
  "properties": {
    "lines": {
      "type": "array",
      "items": {
        "type": "integer",
        "minimum": 0,
        "maximum": 10000000
      },
      "maxItems": 50,
      "minItems": 1
    },
    "discount": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000000
    }
  },
  "required": [
    "lines",
    "discount"
  ],
  "additionalProperties": false
}

Open original schema

Published input example

{
  "lines": [
    1530,
    2034,
    2034
  ],
  "discount": 100
}

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": {
        "allocations": {
          "type": "array",
          "items": {
            "type": "integer"
          }
        },
        "net_total": {
          "type": "integer"
        }
      },
      "required": [
        "allocations",
        "net_total"
      ]
    },
    "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 →