{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dhl/json-schema/dhl-label-data-response-schema.json",
  "title": "LabelDataResponse",
  "description": "Response containing the overall request status and shipment results.",
  "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/LabelDataResponse",
  "type": "object",
  "properties": {
    "status": {
      "$ref": "#/$defs/RequestStatus"
    },
    "items": {
      "type": "array",
      "description": "If the request contains a multi element array (e.g. multiple shipments), then the order of the items in the response corresponds to the order of the items in the request. For consistency, if the request contains only one item then the response contains a single element array.",
      "items": {
        "$ref": "#/$defs/ResponseItem"
      }
    }
  },
  "$defs": {
    "Document": {
      "type": "object",
      "properties": {
        "b64": {
          "type": "string",
          "description": "The Base64 encoded byte stream"
        },
        "zpl2": {
          "type": "string",
          "description": "The document in zpl encoding"
        },
        "url": {
          "type": "string",
          "description": "URL reference to download document"
        },
        "fileFormat": {
          "type": "string",
          "description": "format of the encoded bytes",
          "enum": [
            "ZPL2",
            "PDF"
          ]
        },
        "printFormat": {
          "type": "string",
          "description": "The print format used. Customs documents and cash on delivery documents can only be returned in format A4.",
          "enum": [
            "A4-PT",
            "A4",
            "910-300-700",
            "910-300-700-oZ/oz",
            "910-300-300",
            "910-300-300-oz",
            "910-300-710",
            "910-300-600/610",
            "910-300-400/410",
            "100x70mm"
          ]
        }
      },
      "description": "Encoded document. All types of labels and documents."
    },
    "RequestStatus": {
      "type": "object",
      "description": "General status description for the attached response or response item.",
      "required": [
        "title",
        "status"
      ],
      "properties": {
        "title": {
          "type": "string"
        },
        "statusCode": {
          "description": "The status code of the response. Usually, but not necessarliy the HTTP status code. Same as attribut \"status\" but deprecated. Do not use. Will be removed in the next major version.",
          "type": "integer",
          "format": "int32"
        },
        "status": {
          "description": "The status code of the response. Usually, but not necessarliy the HTTP status code.",
          "type": "integer",
          "format": "int32"
        },
        "instance": {
          "type": "string",
          "description": "A URI reference that identifies the specific occurrence of the problem."
        },
        "detail": {
          "maxLength": 80,
          "minLength": 0,
          "type": "string"
        }
      }
    },
    "ResponseItem": {
      "required": [
        "sstatus"
      ],
      "type": "object",
      "properties": {
        "shipmentNo": {
          "maxLength": 50,
          "minLength": 0,
          "type": "string"
        },
        "routingCode": {
          "maxLength": 35,
          "minLength": 0,
          "type": "string",
          "description": "Routing code of the consignee address"
        },
        "returnRoutingCode": {
          "maxLength": 35,
          "minLength": 0,
          "type": "string",
          "description": "Routing code of the return address"
        },
        "returnShipmentNo": {
          "maxLength": 50,
          "minLength": 0,
          "type": "string"
        },
        "sstatus": {
          "$ref": "#/$defs/RequestStatus"
        },
        "shipmentRefNo": {
          "maxLength": 50,
          "minLength": 6,
          "type": "string"
        },
        "label": {
          "$ref": "#/$defs/Document"
        },
        "returnLabel": {
          "$ref": "#/$defs/Document"
        },
        "customsDoc": {
          "$ref": "#/$defs/Document"
        },
        "codLabel": {
          "$ref": "#/$defs/Document"
        },
        "validationMessages": {
          "type": "array",
          "description": "Optional validation messages attached to the shipment.",
          "items": {
            "$ref": "#/$defs/ValidationMessageItem"
          }
        },
        "uuid": {
          "type": "string",
          "format": "uuid",
          "description": "UUID identifying the shipment"
        }
      },
      "description": "Response for a single shipment containing status, numbers and labels"
    },
    "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."
    }
  }
}