Skip to content
HALOWERK

Formatwerk

quote compare

Each offer line is converted to a price per requested unit (count, mass, length, area, volume, time; price_per for prices per 100 or 1000 units; units of different dimensions are rejected) and to the base currency with caller-supplied rates (no external rates are fetched). Order of calculation with decimal arithmetic: line total = quantity x price per requested unit less line discount, rounded half-up to cents; sum of lines; total discount; shipping and surcharges; minimum-order surcharge.

POST https://format.halowerk.com/v1/quote-compare

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
currencystringNoBase currency for the comparison.
exchange_ratesobjectNoUnits of a foreign currency per 1 unit of the base currency, e.g. {"USD": 1.08}.
itemsarrayNoRequested items; if omitted, the union of offered item_ids with the first offer's unit is used.
offersarrayYes
apply_cash_discountbooleanNo
reference_datestringNoFor expiry checks (default today).
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "offers"
  ],
  "properties": {
    "currency": {
      "type": "string",
      "pattern": "^[A-Z]{3}$",
      "default": "EUR",
      "description": "Base currency for the comparison."
    },
    "exchange_rates": {
      "type": "object",
      "maxProperties": 50,
      "additionalProperties": {
        "type": "number",
        "exclusiveMinimum": 0
      },
      "description": "Units of a foreign currency per 1 unit of the base currency, e.g. {\"USD\": 1.08}."
    },
    "items": {
      "type": "array",
      "maxItems": 500,
      "description": "Requested items; if omitted, the union of offered item_ids with the first offer's unit is used.",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "quantity",
          "unit"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "description": {
            "type": "string",
            "maxLength": 300
          },
          "quantity": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 1000000000
          },
          "unit": {
            "type": "string",
            "minLength": 1,
            "maxLength": 16
          }
        }
      }
    },
    "offers": {
      "type": "array",
      "minItems": 1,
      "maxItems": 20,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "supplier",
          "lines"
        ],
        "properties": {
          "supplier": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "prices": {
            "type": "string",
            "enum": [
              "net",
              "gross"
            ],
            "default": "net"
          },
          "vat_percent": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "lines": {
            "type": "array",
            "minItems": 1,
            "maxItems": 500,
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "item_id",
                "unit_price"
              ],
              "properties": {
                "item_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                },
                "unit_price": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1000000000
                },
                "unit": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 16
                },
                "price_per": {
                  "type": "number",
                  "exclusiveMinimum": 0,
                  "maximum": 1000000,
                  "default": 1,
                  "description": "Number of units the price refers to (e.g. 100 for a price per 100 pieces)."
                },
                "quantity": {
                  "type": "number",
                  "exclusiveMinimum": 0,
                  "maximum": 1000000000,
                  "description": "Offered quantity in the requested unit if different from the request."
                },
                "discount_percent": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100
                },
                "note": {
                  "type": "string",
                  "maxLength": 300
                }
              }
            }
          },
          "discount_percent": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "shipping": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000000000
          },
          "surcharges": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "label",
                "amount"
              ],
              "properties": {
                "label": {
                  "type": "string",
                  "maxLength": 120
                },
                "amount": {
                  "type": "number",
                  "minimum": -1000000000,
                  "maximum": 1000000000
                }
              }
            }
          },
          "minimum_order_value": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000000000
          },
          "minimum_order_surcharge": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000000000
          },
          "cash_discount": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "percent",
              "days"
            ],
            "properties": {
              "percent": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              "days": {
                "type": "integer",
                "minimum": 0,
                "maximum": 365
              }
            }
          },
          "payment_days": {
            "type": "integer",
            "minimum": 0,
            "maximum": 365
          },
          "delivery_days": {
            "type": "integer",
            "minimum": 0,
            "maximum": 3650
          },
          "valid_until": {
            "type": "string",
            "format": "date"
          }
        }
      }
    },
    "apply_cash_discount": {
      "type": "boolean",
      "default": false
    },
    "reference_date": {
      "type": "string",
      "format": "date",
      "description": "For expiry checks (default today)."
    }
  }
}

Open original schema

Published input example

{
  "items": [
    {
      "id": "A",
      "quantity": 100,
      "unit": "pcs"
    }
  ],
  "offers": [
    {
      "supplier": "Alpha",
      "lines": [
        {
          "item_id": "A",
          "unit_price": 1.2
        }
      ]
    },
    {
      "supplier": "Beta",
      "lines": [
        {
          "item_id": "A",
          "unit_price": 110,
          "price_per": 100
        }
      ],
      "shipping": 5
    }
  ]
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub โ†’