{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/steadysteel-org/json-schema/steadysteel-org-quote-schema.json",
  "title": "Quote",
  "description": "A priced quote. It never changes: to change anything, ask for a new\none. status is ready when every item is priced, blocked when an issue\nstops it, and expired once it is past expires_at. A blocked quote's\nthree totals are null, and so are a blocked item's amounts; an item\nthat is ready still shows its amounts. price_type is firm when every price is one we sell at\ntoday, and estimate when any part is an estimate (then beta is true and\nnotice says what that means). The page the person orders on prices the\norder again, so a price can move if ours changes first. Amounts are CAD\ncents, with HST as its own figure.",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/steadysteel-org-openapi.yml#/components/schemas/Quote",
  "additionalProperties": false,
  "properties": {
    "amount_subtotal_cents": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Amount Subtotal Cents"
    },
    "amount_tax_cents": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Amount Tax Cents"
    },
    "amount_total_cents": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Amount Total Cents"
    },
    "beta": {
      "title": "Beta",
      "type": "boolean"
    },
    "created_at": {
      "format": "date-time",
      "title": "Created At",
      "type": "string"
    },
    "currency": {
      "const": "cad",
      "default": "cad",
      "title": "Currency",
      "type": "string"
    },
    "expires_at": {
      "format": "date-time",
      "title": "Expires At",
      "type": "string"
    },
    "id": {
      "title": "Id",
      "type": "string"
    },
    "issues": {
      "items": {
        "$ref": "#/$defs/Issue"
      },
      "title": "Issues",
      "type": "array"
    },
    "items": {
      "items": {
        "$ref": "#/$defs/QuotedItem"
      },
      "title": "Items",
      "type": "array"
    },
    "notice": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Notice"
    },
    "object": {
      "const": "quote",
      "default": "quote",
      "title": "Object",
      "type": "string"
    },
    "price_type": {
      "enum": [
        "firm",
        "estimate"
      ],
      "title": "Price Type",
      "type": "string"
    },
    "status": {
      "enum": [
        "ready",
        "blocked",
        "expired"
      ],
      "title": "Status",
      "type": "string"
    },
    "tax_note": {
      "title": "Tax Note",
      "type": "string"
    }
  },
  "required": [
    "id",
    "status",
    "price_type",
    "beta",
    "items",
    "tax_note",
    "issues",
    "created_at",
    "expires_at"
  ],
  "type": "object",
  "$defs": {
    "Delivery": {
      "additionalProperties": false,
      "description": "How an item reaches the person. quoted_after_order: Steady Steel\nquotes the freight once the order is in, and it is not in this quote.\npriced_at_checkout: the order page prices delivery from the address,\nor the person picks it up. not_applicable: nothing ships (a\ndownload).",
      "properties": {
        "note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Note"
        },
        "status": {
          "enum": [
            "quoted_after_order",
            "priced_at_checkout",
            "not_applicable"
          ],
          "title": "Status",
          "type": "string"
        }
      },
      "required": [
        "status"
      ],
      "title": "Delivery",
      "type": "object"
    },
    "Issue": {
      "additionalProperties": false,
      "description": "Something to know about a quote or one of its items. A blocking\nissue stops the quote: act on its message and ask for a new quote.\nparam names the request field it is about.",
      "properties": {
        "code": {
          "title": "Code",
          "type": "string"
        },
        "message": {
          "title": "Message",
          "type": "string"
        },
        "param": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Param"
        },
        "severity": {
          "enum": [
            "blocking",
            "warning",
            "info"
          ],
          "title": "Severity",
          "type": "string"
        }
      },
      "required": [
        "code",
        "severity",
        "message"
      ],
      "title": "Issue",
      "type": "object"
    },
    "LeadTime": {
      "additionalProperties": false,
      "description": "How long, in days from the order. note says which days they are\n(business days for cut plate) and what the span includes.",
      "properties": {
        "days_max": {
          "title": "Days Max",
          "type": "integer"
        },
        "days_min": {
          "title": "Days Min",
          "type": "integer"
        },
        "note": {
          "title": "Note",
          "type": "string"
        }
      },
      "required": [
        "days_min",
        "days_max",
        "note"
      ],
      "title": "LeadTime",
      "type": "object"
    },
    "QuantityOption": {
      "additionalProperties": false,
      "description": "The same item priced at another quantity, in CAD cents before HST.\nunit_amount_exact says whether unit_amount_cents times quantity is\nexactly amount_cents, as it does on the item.",
      "properties": {
        "amount_cents": {
          "title": "Amount Cents",
          "type": "integer"
        },
        "quantity": {
          "title": "Quantity",
          "type": "integer"
        },
        "unit_amount_cents": {
          "title": "Unit Amount Cents",
          "type": "integer"
        },
        "unit_amount_exact": {
          "title": "Unit Amount Exact",
          "type": "boolean"
        }
      },
      "required": [
        "quantity",
        "unit_amount_cents",
        "amount_cents",
        "unit_amount_exact"
      ],
      "title": "QuantityOption",
      "type": "object"
    },
    "QuotedItem": {
      "additionalProperties": false,
      "description": "One priced item, in the order the request listed it. description is\nours; label is yours, as sent. Amounts are CAD cents before HST, and\namount_cents is the price of the whole quantity. A product's\namount_cents is unit_amount_cents times quantity. A plate is priced as\none job at its quantity, so its unit_amount_cents is only a share of\namount_cents: amount_cents divided by the quantity, rounded to the\nnearest cent, and it may not multiply back to amount_cents.\nunit_amount_exact is true when unit_amount_cents times quantity is\nexactly amount_cents (always, for a product), false when it is not, and\nnull when the item has no amounts. When it is false, give the person\namount_cents as the price for the quantity, not a price each. lead_time\nis for the quantity asked; it is null when Steady Steel confirms it\nafter the order (an info issue then gives the figure for one) or has\nnone to state.",
      "properties": {
        "amount_cents": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Amount Cents"
        },
        "delivery": {
          "$ref": "#/$defs/Delivery"
        },
        "description": {
          "title": "Description",
          "type": "string"
        },
        "includes": {
          "items": {
            "type": "string"
          },
          "title": "Includes",
          "type": "array"
        },
        "index": {
          "title": "Index",
          "type": "integer"
        },
        "issues": {
          "items": {
            "$ref": "#/$defs/Issue"
          },
          "title": "Issues",
          "type": "array"
        },
        "kind": {
          "enum": [
            "product",
            "plate"
          ],
          "title": "Kind",
          "type": "string"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Label"
        },
        "lead_time": {
          "anyOf": [
            {
              "$ref": "#/$defs/LeadTime"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "plate": {
          "anyOf": [
            {
              "$ref": "#/$defs/QuotedPlate"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "price_type": {
          "enum": [
            "firm",
            "estimate"
          ],
          "title": "Price Type",
          "type": "string"
        },
        "product": {
          "anyOf": [
            {
              "$ref": "#/$defs/QuotedProduct"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "quantity": {
          "title": "Quantity",
          "type": "integer"
        },
        "quantity_options": {
          "items": {
            "$ref": "#/$defs/QuantityOption"
          },
          "title": "Quantity Options",
          "type": "array"
        },
        "status": {
          "enum": [
            "ready",
            "blocked"
          ],
          "title": "Status",
          "type": "string"
        },
        "unit_amount_cents": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Unit Amount Cents"
        },
        "unit_amount_exact": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Unit Amount Exact"
        }
      },
      "required": [
        "index",
        "kind",
        "description",
        "status",
        "price_type",
        "quantity",
        "unit_amount_exact",
        "quantity_options",
        "includes",
        "delivery",
        "issues"
      ],
      "title": "QuotedItem",
      "type": "object"
    },
    "QuotedPlate": {
      "additionalProperties": false,
      "description": "The plate as we read it. width_in and height_in are the outline's\nextent in the item's frame. weight_lb and cut_length_in are for one\npiece; they are null when the plate is blocked before it is priced.\netch_text_count and cut_text_count are the lines of lettering on it.\npreview_url is a drawing of the part as priced, in SVG: the outline,\nevery hole and slot, the lettering, and each bend as a dashed line.\nShow it to the person before they order. It is null when the plate is\nblocked.",
      "properties": {
        "bend_count": {
          "title": "Bend Count",
          "type": "integer"
        },
        "cut_length_in": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Cut Length In"
        },
        "cut_text_count": {
          "default": 0,
          "title": "Cut Text Count",
          "type": "integer"
        },
        "etch_text_count": {
          "default": 0,
          "title": "Etch Text Count",
          "type": "integer"
        },
        "height_in": {
          "title": "Height In",
          "type": "number"
        },
        "hole_count": {
          "title": "Hole Count",
          "type": "integer"
        },
        "material": {
          "enum": [
            "mild_steel",
            "stainless_304",
            "stainless_316",
            "aluminum_6061"
          ],
          "title": "Material",
          "type": "string"
        },
        "preview_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Preview Url"
        },
        "slot_count": {
          "title": "Slot Count",
          "type": "integer"
        },
        "thickness_in": {
          "title": "Thickness In",
          "type": "number"
        },
        "weight_lb": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Weight Lb"
        },
        "width_in": {
          "title": "Width In",
          "type": "number"
        }
      },
      "required": [
        "material",
        "thickness_in",
        "width_in",
        "height_in",
        "hole_count",
        "slot_count",
        "bend_count"
      ],
      "title": "QuotedPlate",
      "type": "object"
    },
    "QuotedProduct": {
      "additionalProperties": false,
      "description": "The catalog product a product item prices, and the page that sells\nit.",
      "properties": {
        "product_url": {
          "title": "Product Url",
          "type": "string"
        },
        "slug": {
          "title": "Slug",
          "type": "string"
        },
        "tier": {
          "enum": [
            "kit",
            "welded",
            "design"
          ],
          "title": "Tier",
          "type": "string"
        }
      },
      "required": [
        "slug",
        "tier",
        "product_url"
      ],
      "title": "QuotedProduct",
      "type": "object"
    }
  }
}