{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dhl/json-schema/dhl-return-order-confirmation-schema.json",
  "title": "ReturnOrderConfirmation",
  "description": "Confirmation number.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dhl-dhl-parcel-de-returns-post-parcel-germany-openapi.yml#/components/schemas/ReturnOrderConfirmation",
  "type": "object",
  "properties": {
    "sstatus": {
      "allOf": [
        {
          "$ref": "#/$defs/JSONStatus"
        }
      ]
    },
    "shipmentNo": {
      "$ref": "#/$defs/shipmentNo"
    },
    "internationalShipmentNo": {
      "$ref": "#/$defs/shipmentNo"
    },
    "label": {
      "$ref": "#/$defs/Document"
    },
    "qrLabel": {
      "$ref": "#/$defs/Document"
    },
    "qrLink": {
      "type": "string",
      "minLength": 0,
      "description": "Deep link to import the QR Code to the Post & DHL App"
    },
    "routingCode": {
      "type": "string",
      "description": "Routing code of the returnlabel."
    }
  },
  "required": [
    "shipmentNo",
    "label",
    "routingCode",
    "sstatus"
  ],
  "$defs": {
    "Document": {
      "description": "Encoded document. All types of labels and documents. ",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "b64": {
          "description": "The encoded byte stream",
          "type": "string",
          "format": "byte"
        },
        "zpl2": {
          "type": "string",
          "description": "The document in zpl encoding"
        }
      }
    },
    "JSONStatus": {
      "description": "Standard elements for JSON status from (https://tools.ietf.org/html/rfc7807) ",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "title",
        "status"
      ],
      "properties": {
        "title": {
          "type": "string"
        },
        "status": {
          "type": "integer",
          "format": "int32",
          "minimum": 200,
          "maximum": 999
        },
        "type": {
          "description": "A URI reference [RFC3986] that identifies the problem type and is human-readable.",
          "type": "string",
          "format": "uri"
        },
        "detail": {
          "description": "A human-readable explanation specific to this occurrence of the problem",
          "type": "string",
          "maxLength": 80
        },
        "instance": {
          "description": "A URI reference that identifies the specific occurrence of the problem.",
          "type": "string",
          "format": "uri"
        }
      }
    },
    "shipmentNo": {
      "type": "string",
      "maxLength": 50,
      "description": "The shipment number of the created return label."
    }
  }
}