Skip to content
HALOWERK

Calculators and Rule Checks

shop basket promotion order

Coupon stacking order compares applying a fixed discount before or after a percentage discount. Use it when an agent needs checking which allowed stacking order gives the lower total.

POST https://rechen.halowerk.com/v1/shop-basket-promotion-order

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
subtotalintegerYes
fixedintegerYes
basis_pointsintegerYes
Show full input schema
{
  "type": "object",
  "properties": {
    "subtotal": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000000
    },
    "fixed": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000000
    },
    "basis_points": {
      "type": "integer",
      "minimum": 0,
      "maximum": 10000
    }
  },
  "required": [
    "subtotal",
    "fixed",
    "basis_points"
  ],
  "additionalProperties": false
}

Open original schema

Published input example

{
  "subtotal": 5598,
  "fixed": 100,
  "basis_points": 1000
}

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": {
        "fixed_first": {
          "type": "integer"
        },
        "percent_first": {
          "type": "integer"
        },
        "difference": {
          "type": "integer"
        }
      },
      "required": [
        "fixed_first",
        "percent_first",
        "difference"
      ]
    },
    "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 →