Skip to content
HALOWERK

Calculators and Rule Checks

shop basket voucher residual

Single-use voucher value calculates the payment due and the unused face value lost or carried forward. Use it when an agent needs checking a no-change voucher condition.

POST https://rechen.halowerk.com/v1/shop-basket-voucher-residual

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
totalintegerYes
faceintegerYes
carry_forwardbooleanYes
Show full input schema
{
  "type": "object",
  "properties": {
    "total": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000000
    },
    "face": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000000
    },
    "carry_forward": {
      "type": "boolean"
    }
  },
  "required": [
    "total",
    "face",
    "carry_forward"
  ],
  "additionalProperties": false
}

Open original schema

Published input example

{
  "total": 255,
  "face": 500,
  "carry_forward": false
}

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": {
        "due": {
          "type": "integer"
        },
        "unused_credit": {
          "type": "integer"
        },
        "forfeited": {
          "type": "integer"
        }
      },
      "required": [
        "due",
        "unused_credit",
        "forfeited"
      ]
    },
    "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 →