{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/makepartsnow-com/json-schema/makepartsnow-com-quote-view-schema.json",
  "title": "QuoteView",
  "description": "A priced quote. Fields can be added; none is removed or renamed within v1.",
  "x-generated": "2026-11-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/makepartsnow-com-openapi.json#/components/schemas/QuoteView",
  "properties": {
    "id": {
      "type": "string",
      "title": "Id",
      "description": "Quote id (qt_...)"
    },
    "number": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Number",
      "description": "Quote number shown on the PDF and the website"
    },
    "share_token": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Share Token",
      "description": "Token of the quote's share link, {base}/quotes/share/{share_token}"
    },
    "share_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Share Url",
      "description": "The quote's page on makepartsnow.com, to show a person the parts and prices"
    },
    "status": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Status",
      "description": "open, ordered or expired (discarded or past its date)"
    },
    "rate_set_version": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Rate Set Version",
      "description": "Version of the price list the quote was priced with"
    },
    "created_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Created At",
      "description": "ISO 8601"
    },
    "expires_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Expires At",
      "description": "ISO 8601. Prices hold until then; a later read re-prices at live rates"
    },
    "speed": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Speed",
      "description": "Chosen production speed: economy, standard, fast, faster or fastest"
    },
    "ship_to": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Ship To",
      "description": "Shipping address {name, company?, line1, line2?, city, state, postal_code, country, phone?}"
    },
    "contact_email": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Contact Email",
      "description": "Email for receipts and order updates"
    },
    "po_number": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Po Number",
      "description": "Your purchase order number"
    },
    "items": {
      "items": {
        "additionalProperties": true,
        "type": "object"
      },
      "type": "array",
      "title": "Items",
      "description": "Lines: {id, position, part, config, quantity, notes, review_status, review_note, pricing, snapshot_url, action_needed?}"
    },
    "tiers": {
      "anyOf": [
        {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Tiers",
      "description": "One entry per speed: price, ship-by and arrive-by dates, eligibility"
    },
    "shipping_options": {
      "anyOf": [
        {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Shipping Options",
      "description": "Carrier options for ship_to; choose one with shipping_option"
    },
    "shipping_choice": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Shipping Choice",
      "description": "Id of the chosen shipping option"
    },
    "totals": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Totals",
      "description": "Totals for the chosen speed, including total_before_tax"
    },
    "needs_review": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Needs Review",
      "description": "True while a part waits for manual review; payment is blocked until then"
    },
    "blocking": {
      "anyOf": [
        {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Blocking",
      "description": "What stops the quote from being ready: {item_id, state, detail}"
    },
    "ready": {
      "type": "boolean",
      "title": "Ready",
      "description": "True when the quote can be paid"
    },
    "free_shipping_remaining": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Free Shipping Remaining",
      "description": "Dollars more to reach free shipping (0 when reached)"
    },
    "min_order": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Min Order",
      "description": "Order minimum in dollars"
    },
    "tax_note": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Tax Note",
      "description": "Sales tax is added at checkout"
    },
    "next_steps": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Next Steps",
      "description": "Plain-English instructions for what to do next"
    }
  },
  "additionalProperties": true,
  "type": "object",
  "required": [
    "id",
    "items",
    "ready",
    "next_steps"
  ]
}