{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dhl/json-schema/dhl-shopping-cart-pre-paid-output-schema.json",
  "title": "ShoppingCartPrePaidOutput",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dhl-dhl-parcel-de-private-shipping-post-parcel-germany-openapi.yml#/components/schemas/ShoppingCartPrePaidOutput",
  "type": "object",
  "properties": {
    "shoppingcart": {
      "type": "object",
      "properties": {
        "state": {
          "$ref": "#/$defs/ShoppingCartState"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Item"
          }
        },
        "confirmation": {
          "$ref": "#/$defs/Confirmation"
        },
        "lang": {
          "type": "string",
          "enum": [
            "de",
            "en"
          ]
        },
        "owner": {
          "type": "string",
          "description": "the postnumber"
        },
        "payment": {
          "$ref": "#/$defs/PaymentProvider"
        },
        "invoice": {
          "$ref": "#/$defs/InvoiceOutput"
        },
        "download": {
          "$ref": "#/$defs/DownloadUrl"
        },
        "shoppingCartId": {
          "$ref": "#/$defs/ShoppingCartId"
        }
      }
    }
  },
  "$defs": {
    "Address": {
      "description": "required fields can differ from country to country, so there are no fields marked as required in this document",
      "allOf": [
        {
          "$ref": "#/$defs/AddressBase"
        },
        {
          "properties": {
            "name1": {
              "type": "string",
              "description": "the salutation",
              "maxLength": 35
            },
            "name2": {
              "type": "string",
              "maxLength": 35,
              "description": "First and Lastname"
            },
            "name3": {
              "type": "string",
              "maxLength": 35,
              "description": "Address Additional"
            },
            "addressAddition1": {
              "type": "string",
              "maxLength": 35,
              "description": "additional address data, used only in a few countries"
            },
            "addressAddition2": {
              "type": "string",
              "maxLength": 35,
              "description": "additional address data, used only in a few countries"
            },
            "street": {
              "type": "string",
              "maxLength": 35,
              "description": "the street name"
            },
            "streetNumber": {
              "type": "string",
              "maxLength": 10
            },
            "city": {
              "type": "string",
              "maxLength": 35
            },
            "plz": {
              "type": "string",
              "maxLength": 17
            },
            "province": {
              "type": "string",
              "maxLength": 35
            },
            "country": {
              "type": "string",
              "maxLength": 3,
              "minLength": 3
            },
            "email": {
              "type": "string",
              "format": "email",
              "maxLength": 70
            },
            "phone": {
              "type": "string",
              "maxLength": 35
            }
          }
        }
      ]
    },
    "AddressBase": {
      "type": "object",
      "description": "Base Address type",
      "properties": {
        "type": {
          "type": "string"
        }
      }
    },
    "Confirmation": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string",
          "format": "email"
        },
        "notifyUrl": {
          "type": "string",
          "description": "The callback URL to notify when the shoppingcart was successfully paid. This usually triggers processes at the caller's environment."
        },
        "acceptAtb": {
          "type": "boolean"
        },
        "acceptAgb": {
          "type": "boolean"
        }
      }
    },
    "DownloadUrl": {
      "type": "object",
      "properties": {
        "entryUrl": {
          "type": "string",
          "description": "The location (URL) of the generated shopping cart within the DHL checkout UI."
        }
      }
    },
    "InvoiceOutput": {
      "type": "object",
      "properties": {
        "invoiceNumber": {
          "type": "string",
          "description": "The Invoice-Number of the generated Invoice."
        },
        "invoice": {
          "$ref": "#/$defs/Address"
        }
      }
    },
    "Item": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string"
        }
      }
    },
    "PaymentProvider": {
      "type": "object",
      "properties": {
        "provider": {
          "type": "string",
          "enum": [
            "caas",
            "dummypay"
          ]
        }
      }
    },
    "ShoppingCartId": {
      "type": "string",
      "maxLength": 12,
      "minLength": 12
    },
    "ShoppingCartState": {
      "type": "string",
      "enum": [
        "PREPAID",
        "PAYED",
        "RESERVED",
        "VOIDED",
        "INCOMPLETE",
        "INPAYMENT",
        "INPAYMENTCANCELED",
        "CANCELED"
      ]
    }
  }
}