{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/zentriaflow-com/json-schema/zentriaflow-com-tariff-check-result-schema.json",
  "title": "TariffCheckResult",
  "description": "Every US tariff layer of one HTS code from one origin. Rates are percent. A planning estimate, not a customs ruling.",
  "x-generated": "2026-11-16",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/zentriaflow-com-openapi.json#/components/schemas/TariffCheckResult",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean",
      "const": true
    },
    "hts": {
      "type": "string",
      "description": "The code checked, formatted (6109.10.00)."
    },
    "digits": {
      "type": "string",
      "description": "The code's digits only."
    },
    "origin": {
      "type": "string",
      "description": "ISO 3166-1 alpha-2 code of the origin the engine resolved."
    },
    "description": {
      "type": "string",
      "description": "HTSUS description of the line."
    },
    "mfn": {
      "type": "object",
      "properties": {
        "rate": {
          "type": "number",
          "description": "Percent of the customs value (16.5 means 16.5%). For a specific or compound rate this is an ad valorem equivalent."
        },
        "text": {
          "type": [
            "string",
            "null"
          ],
          "description": "The general rate as the HTSUS prints it."
        },
        "exact": {
          "type": "boolean",
          "description": "True when the rate is the line's own; false when it is an estimate (a code shorter than 8 digits, or a specific rate with no quantity)."
        }
      },
      "required": [
        "rate",
        "text",
        "exact"
      ]
    },
    "us_mfn": {
      "oneOf": [
        {
          "$ref": "#/$defs/SpecificDuty"
        },
        {
          "type": "null"
        }
      ]
    },
    "section_301": {
      "type": "object",
      "properties": {
        "rate": {
          "type": "number",
          "description": "Percent of the customs value (16.5 means 16.5%)."
        },
        "heading": {
          "type": [
            "string",
            "null"
          ],
          "description": "Chapter 99 heading, for example 9903.88.15."
        },
        "label": {
          "type": [
            "string",
            "null"
          ],
          "description": "The list, for example List 4A."
        },
        "partial": {
          "type": "boolean",
          "description": "True when only some 10-digit lines under this code are covered."
        },
        "note": {
          "type": "string"
        }
      },
      "required": [
        "rate",
        "heading",
        "label",
        "partial",
        "note"
      ]
    },
    "forced_labor": {
      "type": "object",
      "properties": {
        "rate": {
          "type": "number",
          "description": "Percent of the customs value (16.5 means 16.5%)."
        },
        "status": {
          "type": "string",
          "description": "applies, exempt, zero or another status the engine names; `reason` explains an exemption."
        },
        "tier": {
          "type": "string"
        },
        "reason": {
          "type": "string"
        },
        "covered_origin": {
          "type": "boolean",
          "description": "True when the origin is one of the economies the tariff covers."
        }
      },
      "required": [
        "rate",
        "status",
        "tier",
        "reason",
        "covered_origin"
      ],
      "description": "The forced-labor Section 301 tariff (in force since 24 Jul 2026)."
    },
    "section_232": {
      "type": "object",
      "properties": {
        "rate": {
          "type": "number",
          "description": "Percent of the customs value (16.5 means 16.5%)."
        },
        "program": {
          "type": [
            "string",
            "null"
          ]
        },
        "note": {
          "type": "string"
        },
        "conditional": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": true
          },
          "description": "Section 232 duties that depend on the 10-digit line or on use; not in `total_rate`."
        }
      },
      "required": [
        "rate",
        "program",
        "note",
        "conditional"
      ]
    },
    "section_338": {
      "type": "object",
      "properties": {
        "rate": {
          "type": "number",
          "description": "Percent of the customs value (16.5 means 16.5%)."
        },
        "program": {
          "type": [
            "string",
            "null"
          ]
        },
        "heading": {
          "type": [
            "string",
            "null"
          ]
        },
        "partial": {
          "type": "boolean"
        },
        "note": {
          "type": "string"
        }
      },
      "required": [
        "rate",
        "program",
        "heading",
        "partial",
        "note"
      ],
      "description": "Section 338 on goods of Canada."
    },
    "import_ban": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "message": {
              "type": "string"
            }
          },
          "required": [
            "message"
          ],
          "additionalProperties": true
        },
        {
          "type": "null"
        }
      ],
      "description": "Set when the product cannot be imported from this origin."
    },
    "upcoming": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "effective": {
              "type": "string",
              "format": "date"
            },
            "message": {
              "type": "string"
            }
          },
          "required": [
            "effective",
            "message"
          ],
          "additionalProperties": true
        },
        {
          "type": "null"
        }
      ],
      "description": "A dated tariff ahead for this product, with its explanation."
    },
    "total_rate": {
      "type": "number",
      "description": "Sum of the duty layers on the `as_of` date. Percent of the customs value (16.5 means 16.5%). Anti-dumping and countervailing duties are never included."
    },
    "today_total_rate": {
      "type": "number",
      "description": "Present only when `as_of` is a later date: today's total, for comparison."
    },
    "usmca": {
      "oneOf": [
        {
          "$ref": "#/$defs/UsmcaCases"
        },
        {
          "type": "null"
        }
      ]
    },
    "cafta_dr": {
      "oneOf": [
        {
          "$ref": "#/$defs/CaftaDrCases"
        },
        {
          "type": "null"
        }
      ]
    },
    "notes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "source": {
      "type": "string",
      "description": "The HTSUS revision the rates were read from and when it was checked."
    },
    "as_of": {
      "type": "string",
      "format": "date",
      "description": "The entry date the layers are for."
    },
    "as_of_is_today": {
      "type": "boolean"
    },
    "as_of_range": {
      "type": "object",
      "properties": {
        "min": {
          "type": "string",
          "format": "date"
        },
        "max": {
          "type": "string",
          "format": "date"
        }
      },
      "required": [
        "min",
        "max"
      ]
    },
    "scheduled_changes": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ScheduledChange"
      }
    }
  },
  "required": [
    "ok",
    "hts",
    "digits",
    "origin",
    "description",
    "mfn",
    "us_mfn",
    "section_301",
    "forced_labor",
    "section_232",
    "section_338",
    "import_ban",
    "upcoming",
    "total_rate",
    "usmca",
    "cafta_dr",
    "notes",
    "source",
    "as_of",
    "as_of_is_today",
    "as_of_range",
    "scheduled_changes"
  ],
  "$defs": {
    "CaftaDrCases": {
      "type": "object",
      "properties": {
        "basis": {
          "type": "string",
          "description": "Which case `total_rate` prices: not_claimed or claimed."
        },
        "not_claimed_total": {
          "type": "number",
          "description": "Percent of the customs value (16.5 means 16.5%)."
        },
        "not_claimed": {
          "type": "string"
        },
        "claimed_total": {
          "type": "number",
          "description": "Percent of the customs value (16.5 means 16.5%)."
        },
        "claimed": {
          "type": "string"
        }
      },
      "required": [
        "basis",
        "not_claimed_total",
        "not_claimed",
        "claimed_total",
        "claimed"
      ],
      "description": "CAFTA-DR textiles and apparel: the total with and without a CAFTA-DR claim."
    },
    "LayerChange": {
      "type": "object",
      "properties": {
        "layer": {
          "type": "string",
          "description": "mfn, section_301, forced_labor, section_232 or section_338."
        },
        "label": {
          "type": "string"
        },
        "before": {
          "type": "number",
          "description": "Percent of the customs value (16.5 means 16.5%)."
        },
        "after": {
          "type": "number",
          "description": "Percent of the customs value (16.5 means 16.5%)."
        }
      },
      "required": [
        "layer",
        "label",
        "before",
        "after"
      ]
    },
    "ScheduledChange": {
      "type": "object",
      "properties": {
        "effective_date": {
          "type": "string",
          "format": "date"
        },
        "total_rate_before": {
          "type": "number",
          "description": "Percent of the customs value (16.5 means 16.5%)."
        },
        "total_rate_after": {
          "type": "number",
          "description": "Percent of the customs value (16.5 means 16.5%)."
        },
        "layers_changed": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LayerChange"
          }
        },
        "reason": {
          "type": "string"
        },
        "legal_reference": {
          "type": "string"
        }
      },
      "required": [
        "effective_date",
        "total_rate_before",
        "total_rate_after",
        "layers_changed",
        "reason",
        "legal_reference"
      ],
      "description": "A dated change the engine holds for this product and origin in the next 12 months. Scheduled changes can be extended, changed or withdrawn before their date."
    },
    "SpecificDuty": {
      "type": "object",
      "additionalProperties": true,
      "description": "Only for lines whose general rate is specific or compound (for example \"6.3¢/liter\" or \"90¢/pr. + 20%\"). With `quantity` and `value` in the request the MFN duty is priced exactly (`exact` true, `specific.line` shows the arithmetic); without them it stays an estimate and `quantity_field` names the quantity to send.",
      "properties": {
        "text": {
          "type": "string",
          "description": "The general rate as the HTSUS prints it."
        },
        "kind": {
          "type": "string",
          "description": "specific, compound or another kind the engine names."
        },
        "exact": {
          "type": "boolean"
        },
        "basis": {
          "type": "string"
        },
        "quantity_field": {
          "oneOf": [
            {
              "type": "object",
              "additionalProperties": true
            },
            {
              "type": "null"
            }
          ]
        },
        "why_not": {
          "type": "string"
        },
        "notes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "duty": {
          "type": [
            "number",
            "null"
          ],
          "description": "MFN duty in US dollars for the quantity and value given."
        },
        "rate": {
          "type": [
            "number",
            "null"
          ],
          "description": "MFN duty as a percent of the customs value given."
        },
        "customs_value": {
          "type": [
            "number",
            "null"
          ]
        },
        "specific": {
          "oneOf": [
            {
              "type": "object",
              "additionalProperties": true
            },
            {
              "type": "null"
            }
          ]
        },
        "summary": {
          "type": "string"
        }
      }
    },
    "UsmcaCases": {
      "type": "object",
      "properties": {
        "qualifying_total": {
          "type": "number",
          "description": "Percent of the customs value (16.5 means 16.5%)."
        },
        "qualifying": {
          "type": "string"
        },
        "non_qualifying_total": {
          "type": "number",
          "description": "Percent of the customs value (16.5 means 16.5%)."
        },
        "non_qualifying": {
          "type": "string"
        },
        "basis": {
          "type": "string",
          "description": "Which case `total_rate` prices: non_qualifying or qualifying."
        }
      },
      "required": [
        "qualifying_total",
        "qualifying",
        "non_qualifying_total",
        "non_qualifying",
        "basis"
      ],
      "description": "Canada and Mexico: the total with and without a USMCA claim."
    }
  }
}