{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dhl/json-schema/dhl-costs-request-schema.json",
  "title": "CostsRequest",
  "description": "Object to request a simple cost calculation. Depending on the applied context, some attributes might be mandatory or optional or ignored. E.g. filters apply to POSTWURFSPEZIAL.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dhl-deutsche-post-print-mailing-targeting-post-parcel-germany-openapi.yml#/components/schemas/CostsRequest",
  "type": "object",
  "properties": {
    "filters": {
      "type": "array",
      "description": "List of PWS filter. Does only apply to POSTWURFSPEZIAL.",
      "items": {
        "$ref": "#/$defs/PotentialFilter"
      }
    },
    "areaCodes": {
      "type": "array",
      "description": "List of area codes. Use different types, depending on the context. Examples are postal code or neighbourhood identifier.",
      "items": {
        "type": "string"
      }
    },
    "productType": {
      "type": "string",
      "description": "Product type. Valid types depend on the context. E.g. POSTWURF_SPEZIAL is not applicable to neighbourhoods.",
      "enum": [
        "POSTAKTUELL_DAILY_MAIL",
        "POSTAKTUELL_ALL",
        "POSTAKTUELL_ANY_AND_ALL_HOUSEHOLDS",
        "POSTWURF_SPEZIAL"
      ]
    }
  },
  "$defs": {
    "PotentialFilter": {
      "type": "object",
      "description": "Filter for PWS",
      "properties": {
        "id": {
          "type": "string"
        },
        "options": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    }
  }
}