{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/australia-post/main/json-schema/australia-post-country-metadata-response-schema.json",
  "title": "CountryMetadataResponse",
  "description": "Response containing metadata for each requested filter.",
  "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/CountryMetadataResponse",
  "properties": {
    "metadata": {
      "description": "List of metadata results, one per filter in the request (same order).",
      "items": {
        "$ref": "#/$defs/CountryMetadataResult"
      }
    }
  },
  "$defs": {
    "CountryMetadataResult": {
      "properties": {
        "id": {
          "description": "Echo of the client-supplied correlation identifier from the corresponding filter."
        },
        "country_code": {
          "maxLength": 2,
          "minLength": 2,
          "description": "Normalized (uppercase) two-character ISO country code."
        },
        "landed_costs_payer_options": {
          "description": "Available landed cost payer options for this destination. May be empty (e.g. for DOCUMENT classification).",
          "items": {
            "$ref": "#/$defs/LandedCostPayerOption"
          }
        },
        "to_postcode_required": {
          "description": "Whether a destination postcode is required for this country. Values: \"true\" or \"false\"."
        },
        "to_state_required": {
          "description": "Whether a destination state/province is required for this country. Values: \"true\" or \"false\"."
        },
        "zonos_tax_id": {
          "description": "Zonos tax identifier for use with SENDER_PAYS_ZONOS payer option. Null when not applicable.",
          "nullable": true
        }
      },
      "description": "Metadata result for a single country/classification/value combination."
    },
    "LandedCostPayerOption": {
      "properties": {
        "landed_costs_payer": {
          "description": "Who pays the landed costs (duties and taxes).",
          "enum": [
            "RECEIVER_PAYS",
            "SENDER_PAYS_TAX_ID",
            "SENDER_PAYS_ZONOS"
          ]
        },
        "importers_ref_id_requirement": {
          "description": "Whether an importer's reference/tax ID is required for this payer option.",
          "enum": [
            "NOT_ALLOWED",
            "MANDATORY",
            "NOT_REQUIRED"
          ]
        }
      },
      "description": "A single landed cost payer option indicating who pays duties/taxes and the importer's reference ID requirement."
    }
  }
}