{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dhl/json-schema/dhl-selection-request-schema.json",
  "title": "SelectionRequest",
  "description": "Request for a new Selection",
  "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/SelectionRequest",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 50,
      "pattern": "^.{0,50}$"
    },
    "detailLevel": {
      "type": "string",
      "enum": [
        "POSTAL_CODE"
      ]
    },
    "areaCodes": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[0-9]+(-[0-9]{2})?$"
      },
      "uniqueItems": true
    },
    "product": {
      "type": "string",
      "enum": [
        "POSTAKTUELL_DAILY_MAIL",
        "POSTAKTUELL_ALL",
        "POSTAKTUELL_ANY_AND_ALL_HOUSEHOLDS",
        "POSTWURF_SPEZIAL"
      ]
    },
    "filters": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PotentialFilter"
      }
    },
    "itemWeightInGram": {
      "type": "integer",
      "format": "int32"
    }
  },
  "$defs": {
    "PotentialFilter": {
      "type": "object",
      "description": "Filter for PWS",
      "properties": {
        "id": {
          "type": "string"
        },
        "options": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    }
  }
}