{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dhl/json-schema/dhl-customs-document-batch-response-schema.json",
  "title": "CustomsDocumentBatchResponse",
  "description": "Response of a successful customs document upload.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dhl-parcel-de-shipping-post-parcel-germany-v2-openapi.yml#/components/schemas/CustomsDocumentBatchResponse",
  "required": [
    "batchId"
  ],
  "type": "object",
  "properties": {
    "batchId": {
      "type": "string",
      "format": "uuid",
      "description": "Unique identifier for this batch of uploaded customs documents. Provide this value in the ''paperlessCustoms'' service attribute of POST /orders to attach the documents to a shipment. A batchId can only be consumed by one shipment."
    },
    "documents": {
      "type": "array",
      "description": "The accepted documents of this batch.",
      "items": {
        "$ref": "#/$defs/CustomsDocumentReference"
      }
    },
    "validationMessages": {
      "type": "array",
      "description": "Optional warnings for the batch, for example truncated field values.",
      "items": {
        "$ref": "#/$defs/ValidationMessageItem"
      }
    }
  },
  "$defs": {
    "CustomsDocumentReference": {
      "type": "object",
      "properties": {
        "documentType": {
          "type": "string"
        },
        "filename": {
          "type": "string"
        },
        "userDefinedReference": {
          "type": "string"
        }
      },
      "description": "Reference to a single uploaded customs document."
    },
    "ValidationMessageItem": {
      "type": "object",
      "properties": {
        "property": {
          "type": "string",
          "description": "The property that is affected by the validation message."
        },
        "validationMessage": {
          "type": "string",
          "description": "The validation message describing the error."
        },
        "validationState": {
          "type": "string",
          "description": "The validation state resulting from the error."
        }
      },
      "description": "Representation of a validation message of a shipment container containing the most important information."
    }
  }
}