{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/australia-post/main/json-schema/australia-post-landed-cost-v3-response-schema.json",
  "title": "LandedCostV3Response",
  "description": "Landed cost calculation result",
  "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/LandedCostV3Response",
  "properties": {
    "method": {
      "description": "Landed cost calculation method. DDP (Delivered Duty Paid by seller) or DAP (Delivered At Place where the buyer handles clearance).",
      "enum": [
        "DDP",
        "DAP"
      ]
    },
    "landed_cost_guarantee_code": {
      "description": "Landed cost guarantee code.",
      "enum": [
        "POSTAL_DDP",
        "ZONOS",
        "COLLECT_REMITTANCE",
        "INCLUSIVE_PRICE",
        "NOT_APPLICABLE",
        "POSTAL_DDP_INCLUSIVE_PRICE"
      ]
    },
    "amount_subtotals": {
      "$ref": "#/$defs/LandedCostV3AmountSubtotals"
    },
    "duties": {
      "items": {
        "$ref": "#/$defs/LandedCostV3Charge"
      }
    },
    "taxes": {
      "items": {
        "$ref": "#/$defs/LandedCostV3Charge"
      }
    },
    "fees": {
      "items": {
        "$ref": "#/$defs/LandedCostV3Charge"
      }
    },
    "errors": {
      "description": "Informational errors encountered during the landed cost calculation. Present in a 200 response when the API fell back to an alternative method (e.g. DAP when DDP was unavailable for the destination).",
      "items": {
        "$ref": "#/$defs/LandedCostV3Error"
      }
    }
  },
  "$defs": {
    "LandedCostV3AmountSubtotals": {
      "properties": {
        "duties": {
          "description": "Total amount of all duties"
        },
        "taxes": {
          "description": "Total amount of all taxes"
        },
        "fees": {
          "description": "Total amount of all fees"
        },
        "shipping": {
          "description": "Total amount of shipping. Absent when service_level_code is australia_post.international_prepaid."
        },
        "items": {
          "description": "Total amount of all items"
        }
      },
      "description": "Subtotals broken down by category"
    },
    "LandedCostV3Charge": {
      "properties": {
        "type": {
          "description": "Type of the duty, tax, or fee"
        },
        "amount": {
          "description": "Charge amount in AUD"
        },
        "description": {
          "description": "Human-readable description of the charge"
        },
        "formula": {
          "description": "Human-readable formula indicating how the charge was calculated"
        },
        "note": {
          "description": "Additional note for the charge. May be null.",
          "nullable": true
        },
        "item": {
          "$ref": "#/$defs/LandedCostV3ItemReference"
        }
      },
      "description": "A single duty, tax, or fee entry"
    },
    "LandedCostV3Error": {
      "properties": {
        "message": {
          "description": "Human-readable error message"
        },
        "path": {
          "description": "Response path related to the error. May be empty.",
          "items": {}
        },
        "extensions": {
          "$ref": "#/$defs/LandedCostV3ErrorExtensions"
        }
      },
      "description": "Informational error carried alongside a 200 response when the API fell back to an alternative method"
    },
    "LandedCostV3ErrorExtensions": {
      "properties": {
        "classification": {
          "description": "Classification of the error"
        },
        "service": {
          "description": "The service that raised the error"
        }
      },
      "description": "Additional metadata about a landed cost error"
    },
    "LandedCostV3ItemReference": {
      "properties": {
        "product_id": {
          "description": "Matches the product_id of the corresponding item in the request"
        }
      },
      "description": "Reference to an item in the request that a charge corresponds to"
    }
  }
}