{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cosuno/json-schema/cosuno-submitted-bid-response-schema.json",
  "title": "SubmittedBidResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cosuno-bids-api-openapi.yml#/components/schemas/SubmittedBidResponse",
  "properties": {
    "id": {
      "type": "string",
      "description": "ID of the bid."
    },
    "message": {
      "type": [
        "string",
        "null"
      ],
      "description": "Free-form message submitted by the subcontractor alongside the bid."
    },
    "totalNet": {
      "type": "number",
      "format": "double",
      "description": "Net total of the bid before discount and tax, in the bid package's currency."
    },
    "discountRate": {
      "type": "number",
      "format": "double",
      "description": "Discount rate offered by the subcontractor, expressed as a fraction between 0 and 1 (e.g. 0.05 for 5%)."
    },
    "taxRate": {
      "type": "number",
      "format": "double",
      "description": "Value-added tax rate applied to the bid, expressed as a fraction between 0 and 1."
    },
    "skontoRate": {
      "type": "number",
      "format": "double",
      "description": "Early-payment discount (skonto) rate offered by the subcontractor, expressed as a fraction between 0 and 1."
    },
    "skontoDeadline": {
      "type": "number",
      "format": "double",
      "description": "Number of days within which the early-payment discount (skonto) applies."
    },
    "revision": {
      "type": "number",
      "format": "double",
      "description": "Revision number of the bid. Increments each time the subcontractor submits a revised bid."
    },
    "hasBillOfQuantities": {
      "type": "boolean",
      "description": "Whether the bid includes a priced bill of quantities."
    },
    "absoluteDiscount": {
      "type": "number",
      "format": "double",
      "description": "Fixed absolute discount applied on top of the bid total, in the bid package's currency."
    },
    "additionalCosts": {
      "type": "number",
      "format": "double",
      "description": "Additional costs included in the bid beyond the priced bill of quantities, in the bid package's currency."
    },
    "skontoValue": {
      "type": "number",
      "format": "double",
      "description": "Monetary amount corresponding to `skontoRate` applied to the net total with discount."
    },
    "totalNetWithDiscount": {
      "type": "number",
      "format": "double",
      "description": "Net total after applying discount, in the bid package's currency."
    },
    "taxValue": {
      "type": "number",
      "format": "double",
      "description": "Monetary amount of VAT applied to the bid."
    },
    "totalGross": {
      "type": "number",
      "format": "double",
      "description": "Gross total of the bid (net with discount plus tax), in the bid package's currency."
    },
    "totalGrossWithSkonto": {
      "type": "number",
      "format": "double",
      "description": "Gross total after applying the early-payment discount (skonto), in the bid package's currency."
    },
    "submittedAt": {
      "type": "string",
      "description": "Timestamp at which the bid was submitted.",
      "format": "date"
    },
    "version": {
      "type": "number",
      "format": "double",
      "description": "Monotonic version number of the submitted bid. Increments with each new submission."
    }
  },
  "required": [
    "id",
    "message",
    "totalNet",
    "discountRate",
    "taxRate",
    "skontoRate",
    "skontoDeadline",
    "revision",
    "hasBillOfQuantities",
    "absoluteDiscount",
    "additionalCosts",
    "skontoValue",
    "totalNetWithDiscount",
    "taxValue",
    "totalGross",
    "totalGrossWithSkonto",
    "submittedAt",
    "version"
  ],
  "type": "object",
  "additionalProperties": false
}