{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dhl/json-schema/dhl-app-shopping-cart-preview-pngrequest-schema.json",
  "title": "AppShoppingCartPreviewPNGRequest",
  "description": "The request object for validate (preview) shopping cart png.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dhl-deutsche-post-internetmarke-post-parcel-germany-openapi.yml#/components/schemas/AppShoppingCartPreviewPNGRequest",
  "required": [
    "voucherLayout"
  ],
  "type": "object",
  "allOf": [
    {
      "$ref": "#/$defs/AppCheckoutPNGRequest"
    },
    {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "AppShoppingCartPNGRequest",
            "AppShoppingCartPreviewPNGRequest"
          ],
          "default": "AppShoppingCartPNGRequest",
          "description": "set AppShoppingCartPNGRequest if validate=false, AppShoppingCartPreviewPNGRequest if validate=true"
        },
        "productCode": {
          "minimum": 1,
          "type": "integer",
          "description": "The product code for the selected product, e.g. standard letter, maxi letter etc. The product code must be greater than 0 and the product must be available in the third-party application.",
          "format": "int32"
        },
        "imageID": {
          "type": "integer",
          "description": "The ID of the motif.",
          "format": "int32"
        },
        "voucherLayout": {
          "type": "string",
          "enum": [
            "ADDRESS_ZONE",
            "FRANKING_ZONE"
          ]
        },
        "dpi": {
          "type": "string",
          "enum": [
            "DPI300",
            "DPI203"
          ]
        },
        "optimizePNG": {
          "type": "boolean",
          "description": "Flag to optimize the PNG."
        }
      }
    }
  ],
  "$defs": {
    "AppCheckoutPNGRequest": {
      "description": "The base request object for external partners to get an internet stamp in PNG format.",
      "required": [
        "type"
      ],
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "AppShoppingCartPNGRequest",
            "AppShoppingCartPreviewPNGRequest"
          ],
          "default": "AppShoppingCartPNGRequest",
          "description": "set AppShoppingCartPNGRequest if validate=false, AppShoppingCartPreviewPNGRequest if validate=true"
        }
      }
    }
  }
}