{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dhl/json-schema/dhl-receiver-schema.json",
  "title": "Receiver",
  "description": "A return receiver location including its company, address and billing information.",
  "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/Receiver",
  "type": "object",
  "properties": {
    "receiverId": {
      "$ref": "#/$defs/ReceiverId"
    },
    "shipperCountry": {
      "$ref": "#/$defs/Country"
    },
    "ekp": {
      "type": "string",
      "pattern": "\\d{10}"
    },
    "billingNumber": {
      "$ref": "#/$defs/BillingNumber"
    },
    "companyName": {
      "type": "string",
      "maxLength": 50
    },
    "numberRange": {
      "type": "string",
      "maxLength": 35,
      "description": "Number range associated with the billing number. The return shipment number is part of the number range."
    },
    "receiverAddress": {
      "$ref": "#/$defs/ContactAddress"
    },
    "companyAddress": {
      "$ref": "#/$defs/ContactAddress"
    },
    "contactEmail": {
      "$ref": "#/$defs/Email"
    },
    "additionalEmailNote": {
      "type": "string",
      "maxLength": 250,
      "description": "Text for additional comments by the business customer that are printed in the footer of the email that is sent to the shipper after order of a return label."
    },
    "salesTaxIdentificationNumber": {
      "type": "string",
      "maxLength": 30,
      "description": "Identification of the business customer for sales tax purposes"
    },
    "court": {
      "type": "string",
      "maxLength": 30,
      "description": "Jurisdiction of the business customer"
    },
    "companyManagement": {
      "type": "string",
      "maxLength": 50
    }
  },
  "required": [
    "receiverId",
    "shipperCountry",
    "ekp",
    "billingNumber",
    "companyName",
    "numberRange",
    "receiverAddress",
    "companyAddress"
  ],
  "$defs": {
    "BillingNumber": {
      "type": "string",
      "pattern": "\\d{10}\\d{2}\\w{2}",
      "description": "Billing number for the return order. The billing number depends on the shipper country and the product and service combination."
    },
    "ContactAddress": {
      "type": "object",
      "description": "A postal contact address including name, street, postal code and city.",
      "properties": {
        "name1": {
          "maxLength": 50,
          "minLength": 1,
          "type": "string",
          "description": "Name1. Line 1 of name information"
        },
        "name2": {
          "maxLength": 50,
          "minLength": 0,
          "type": "string",
          "description": "An optional, additional line of name information"
        },
        "name3": {
          "maxLength": 50,
          "minLength": 0,
          "type": "string",
          "description": "An optional, third additional line of name information"
        },
        "addressStreet": {
          "type": "string",
          "description": "This is just the street name.",
          "maxLength": 50,
          "minLength": 1
        },
        "addressHouse": {
          "type": "string",
          "description": "This is just the house number.",
          "maxLength": 10,
          "minLength": 1
        },
        "city": {
          "type": "string",
          "maxLength": 40,
          "minLength": 1
        },
        "email": {
          "$ref": "#/$defs/Email"
        },
        "phone": {
          "description": "contact phone number",
          "maxLength": 20,
          "minLength": 1,
          "type": "string"
        },
        "postalCode": {
          "$ref": "#/$defs/PostalCode"
        },
        "state": {
          "type": "string",
          "maxLength": 20
        }
      },
      "required": [
        "name1",
        "addressStreet",
        "addressHouse",
        "postalCode",
        "city"
      ]
    },
    "Country": {
      "description": "Country of the shipper as a three-character country code according to ISO 3166-1 alpha-3.",
      "type": "string",
      "enum": [
        "bel",
        "bgr",
        "dnk",
        "deu",
        "est",
        "fin",
        "fra",
        "grc",
        "gbr",
        "irl",
        "ita",
        "hrv",
        "lva",
        "ltu",
        "lux",
        "mlt",
        "nld",
        "nor",
        "aut",
        "pol",
        "prt",
        "rou",
        "swe",
        "che",
        "svk",
        "svn",
        "esp",
        "cze",
        "hun",
        "cyp"
      ]
    },
    "Email": {
      "description": "contact email address",
      "format": "email",
      "maxLength": 70,
      "minLength": 3,
      "type": "string"
    },
    "PostalCode": {
      "description": "postal code, relaxed UPU version",
      "maxLength": 10,
      "minLength": 3,
      "pattern": "^[0-9A-Za-z]+([ -]?[0-9A-Za-z]+)*$",
      "type": "string"
    },
    "ReceiverId": {
      "type": "string",
      "maxLength": 50,
      "description": "the receiver id of the return shipment"
    }
  }
}