{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/calculate-co-nz/json-schema/calculate-co-nz-import-duty-response-schema.json",
  "title": "ImportDutyResponse",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/calculate-co-nz-openapi.json#/components/schemas/ImportDutyResponse",
  "properties": {
    "result": {
      "$ref": "#/$defs/ImportDutyResult",
      "description": "Duty, GST, goods levy, total payable and landed cost."
    },
    "disclaimer": {
      "type": "string",
      "title": "Disclaimer",
      "description": "Scope and limits of this calculation."
    }
  },
  "type": "object",
  "required": [
    "result",
    "disclaimer"
  ],
  "$defs": {
    "ImportDutyResult": {
      "properties": {
        "goods_value": {
          "type": "number",
          "title": "Goods Value",
          "description": "Goods value used."
        },
        "freight_insurance": {
          "type": "number",
          "title": "Freight Insurance",
          "description": "Freight and insurance used."
        },
        "duty_rate_percent": {
          "type": "number",
          "title": "Duty Rate Percent",
          "description": "Duty rate applied."
        },
        "transport": {
          "type": "string",
          "title": "Transport",
          "description": "'air' (air or post) or 'sea'."
        },
        "over_threshold": {
          "type": "boolean",
          "title": "Over Threshold",
          "description": "True when the goods value is over $1,000, so Customs collects."
        },
        "threshold": {
          "type": "number",
          "title": "Threshold",
          "description": "The $1,000 threshold."
        },
        "threshold_note": {
          "type": "string",
          "title": "Threshold Note",
          "description": "Plain statement of whether Customs collects, and why."
        },
        "threshold_source": {
          "type": "string",
          "title": "Threshold Source",
          "description": "Customs source for the threshold."
        },
        "duty": {
          "type": "number",
          "title": "Duty",
          "description": "Goods value times the duty rate; 0 at $1,000 or less."
        },
        "gst_rate_percent": {
          "type": "number",
          "title": "Gst Rate Percent",
          "description": "GST rate, from the rate register."
        },
        "gst_base": {
          "type": "number",
          "title": "Gst Base",
          "description": "Goods plus freight and insurance plus duty; 0 at $1,000 or less."
        },
        "gst": {
          "type": "number",
          "title": "Gst",
          "description": "GST on the goods, freight, insurance and duty combined."
        },
        "levy_excl_gst": {
          "type": "number",
          "title": "Levy Excl Gst",
          "description": "Customs and MPI goods levy, excluding GST."
        },
        "levy_gst": {
          "type": "number",
          "title": "Levy Gst",
          "description": "GST on the goods levy."
        },
        "levy_incl_gst": {
          "type": "number",
          "title": "Levy Incl Gst",
          "description": "Goods levy including GST."
        },
        "levy_source": {
          "type": "string",
          "title": "Levy Source",
          "description": "Customs and MPI source for the levy, or 'caller override'."
        },
        "figures_source": {
          "type": "string",
          "title": "Figures Source",
          "description": "Whether the threshold and levies came from the rate register or the typed fallback."
        },
        "total_payable_to_customs": {
          "type": "number",
          "title": "Total Payable To Customs",
          "description": "Duty plus GST plus the levy including GST."
        },
        "landed_cost": {
          "type": "number",
          "title": "Landed Cost",
          "description": "Goods plus freight plus everything payable to Customs."
        },
        "gst_rate_source": {
          "type": "string",
          "title": "Gst Rate Source",
          "description": "Register or fallback."
        },
        "not_modelled": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Not Modelled",
          "description": "Rules the page does not apply, so this does not either."
        },
        "inputs": {
          "additionalProperties": true,
          "type": "object",
          "title": "Inputs",
          "description": "The inputs as received."
        }
      },
      "type": "object",
      "required": [
        "goods_value",
        "freight_insurance",
        "duty_rate_percent",
        "transport",
        "over_threshold",
        "threshold",
        "threshold_note",
        "threshold_source",
        "duty",
        "gst_rate_percent",
        "gst_base",
        "gst",
        "levy_excl_gst",
        "levy_gst",
        "levy_incl_gst",
        "levy_source",
        "figures_source",
        "total_payable_to_customs",
        "landed_cost",
        "gst_rate_source",
        "not_modelled",
        "inputs"
      ],
      "title": "ImportDutyResult"
    }
  }
}