{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/australia-post/main/json-schema/australia-post-prohibitions-v3-response-schema.json",
  "title": "ProhibitionsV3Response",
  "description": "Prohibitions and restrictions evaluation result for a given HS code, destination country, and country of origin",
  "x-generated": "2026-10-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/australia-post-international-export-tools-v3-openapi.yml#/components/schemas/ProhibitionsV3Response",
  "properties": {
    "action": {
      "description": "The highest level of prohibition, restriction, or observation applied to the supplied HS Tariff code",
      "enum": [
        "PROHIBITIONS_APPLY",
        "RESTRICTIONS_APPLY",
        "OBSERVATIONS_APPLY",
        "NO_MATCH"
      ]
    },
    "country_of_origin": {
      "maxLength": 2,
      "minLength": 2,
      "description": "The two-character country code for the country of origin of the item being shipped. Same as provided in the request."
    },
    "item_hs_code": {
      "description": "The HS Tariff code associated with the item being shipped. Same as provided in the request."
    },
    "item_restrictions": {
      "description": "Array containing all the Prohibitions, Restrictions and/or Observations associated with the item being shipped",
      "items": {
        "$ref": "#/$defs/ProhibitionsV3ItemRestriction"
      }
    },
    "simplified_pnr_code": {
      "$ref": "#/$defs/ProhibitionsV3SimplifiedPnrCode"
    },
    "unable_to_send": {
      "description": "Flag indicating if the item can be shipped. Set to true if the highest-level mapped category is PROHIBITION (i.e. simplified_pnr_code has code=CAT1)."
    }
  },
  "$defs": {
    "ProhibitionsV3ItemRestriction": {
      "properties": {
        "control_summary": {
          "description": "Meaningful description of the Prohibitions, Restrictions, or Observations that apply to the item being shipped"
        },
        "control_type": {
          "description": "Control type classification",
          "enum": [
            "CARRIER",
            "EXPORT",
            "IMPORT"
          ]
        },
        "control_countries": {
          "description": "Array of country codes that implement this control. May be null.",
          "items": {
            "maxLength": 2,
            "minLength": 2
          },
          "nullable": true
        },
        "applies_to": {
          "description": "Description of the types of items to which the control applies"
        },
        "hs_code": {
          "description": "Applicable HS Code or part of the HS code like the chapter code"
        },
        "type": {
          "description": "The type of trade control",
          "enum": [
            "PROHIBITION",
            "RESTRICTION",
            "OBSERVATION"
          ]
        }
      },
      "description": "A single prohibition, restriction, or observation applicable to the item"
    },
    "ProhibitionsV3SimplifiedPnrCode": {
      "properties": {
        "code": {
          "description": "Category code (e.g. CAT1 for prohibition, CAT2 for restriction, CAT3 for observation, CAT0 for no match)"
        },
        "description": {
          "description": "Description of the category code"
        }
      },
      "description": "Simplified P&R category code with description"
    }
  }
}