{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dhl/json-schema/dhl-post-request-format-schema.json",
  "title": "Post request format for DHL eCommerce UK eCommerce Shipping Label API",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dhl-ecommerce-uk-openapi.json#/components/schemas/PostRequestFormat",
  "type": "object",
  "required": [
    "pickupAccount",
    "dropOffType",
    "senderAddress",
    "shipments"
  ],
  "properties": {
    "pickupAccount": {
      "maxLength": 30,
      "minLength": 1,
      "type": "string",
      "description": "The DHL eCommerce UK account number. You will receive this after doing the onboarding with DHL sales."
    },
    "dropOffType": {
      "type": "string",
      "description": "Specify how shipments will be handed over to DHL. PICKUP is for a driver pickup from your account address or a specified adhoc pickup address if a carriageForward. DROPOFF is for service point drop off, DEPOT is a DHL Parcel Depot or Hub drop off, before DROPOFF or DEPOT please check this has been enabled on your account via your account manager.",
      "enum": [
        "PICKUP",
        "DROPOFF",
        "DEPOT"
      ]
    },
    "pickup": {
      "required": [
        "date",
        "accountAddress"
      ],
      "type": "object",
      "properties": {
        "date": {
          "type": "string",
          "description": "Pickup date in ISO 8601 date format."
        },
        "accountAddress": {
          "type": "boolean",
          "description": "Should the shipment be collected from the pickupAccount address? If false then shipment will be collected from the supplied pickupAddress which then becomes mandatory."
        },
        "pickupIdentifier": {
          "type": "string",
          "description": "Pickup Identifier for a pickup from an account holder address i.e. accountAddress is true. This will have been returned from a previous call to the Pickup API. Not required if accountAddress is false."
        },
        "instructions": {
          "maxLength": 60,
          "minLength": 1,
          "type": "string",
          "description": "Optional special instructions for driver at pickup"
        },
        "secureLocation": {
          "maxLength": 60,
          "minLength": 1,
          "type": "string",
          "description": "Description of a location where the parcels have been left securely for unattended collection"
        },
        "labelRequired": {
          "type": "boolean",
          "description": "Indicates whether the pickup driver needs to print and apply labels to the parcel at pickup. Not for pickup at accountAddress."
        }
      },
      "description": "Physical pickup instructions (optional)."
    },
    "pickupAddress": {
      "required": [
        "address1",
        "city",
        "country",
        "name",
        "postalCode"
      ],
      "type": "object",
      "properties": {
        "companyName": {
          "maxLength": 35,
          "minLength": 1,
          "type": "string",
          "description": "Optional name of organisation"
        },
        "address1": {
          "maxLength": 35,
          "minLength": 1,
          "type": "string",
          "description": "Line 1 of the street address"
        },
        "address2": {
          "maxLength": 35,
          "minLength": 1,
          "type": "string",
          "description": "Line 2 of the street address"
        },
        "address3": {
          "maxLength": 35,
          "minLength": 1,
          "type": "string",
          "description": "Line 3 of the street address"
        },
        "city": {
          "maxLength": 35,
          "minLength": 1,
          "type": "string",
          "description": "city"
        },
        "state": {
          "maxLength": 35,
          "minLength": 1,
          "type": "string",
          "description": "county, state, province or territory."
        },
        "postalCode": {
          "maxLength": 15,
          "minLength": 3,
          "type": "string",
          "description": "postal code"
        },
        "country": {
          "maxLength": 2,
          "minLength": 2,
          "type": "string",
          "description": "Two-character ISO country code."
        },
        "name": {
          "maxLength": 35,
          "minLength": 1,
          "type": "string",
          "description": "Pickup contact name"
        },
        "email": {
          "maxLength": 70,
          "minLength": 1,
          "type": "string",
          "description": "pickup email address, either email or phone must be provided",
          "format": "email"
        },
        "phone": {
          "maxLength": 35,
          "minLength": 1,
          "type": "string",
          "description": "phone number, either email or phone must be provided"
        }
      },
      "description": "Pickup address, mandatory if pickup not from accountAddress"
    },
    "senderAddress": {
      "required": [
        "address1",
        "city",
        "country",
        "name",
        "postalCode",
        "email",
        "phone"
      ],
      "type": "object",
      "properties": {
        "companyName": {
          "maxLength": 35,
          "minLength": 1,
          "type": "string",
          "description": "Optional name of organisation"
        },
        "address1": {
          "maxLength": 35,
          "minLength": 1,
          "type": "string",
          "description": "Line 1 of the street address"
        },
        "address2": {
          "maxLength": 35,
          "minLength": 1,
          "type": "string",
          "description": "Line 2 of the street address"
        },
        "address3": {
          "maxLength": 35,
          "minLength": 1,
          "type": "string",
          "description": "Line 3 of the street address"
        },
        "city": {
          "maxLength": 35,
          "minLength": 1,
          "type": "string",
          "description": "city"
        },
        "state": {
          "maxLength": 35,
          "minLength": 1,
          "type": "string",
          "description": "county, state, province or territory."
        },
        "postalCode": {
          "maxLength": 15,
          "minLength": 3,
          "type": "string",
          "description": "postal code"
        },
        "country": {
          "maxLength": 2,
          "minLength": 2,
          "type": "string",
          "description": "Two-character ISO country code."
        },
        "name": {
          "maxLength": 35,
          "minLength": 1,
          "type": "string",
          "description": "Name"
        },
        "email": {
          "maxLength": 70,
          "minLength": 1,
          "type": "string",
          "description": "pickup email address",
          "format": "email"
        },
        "phone": {
          "maxLength": 35,
          "minLength": 1,
          "type": "string",
          "description": "phone number"
        }
      },
      "description": "Sender address and contact details. This is used when passing through customs and to return back undeliverable shipments."
    },
    "shipments": {
      "maxItems": 1,
      "minItems": 1,
      "type": "array",
      "description": "Shipment to be created. Has a consigneeAddress and potentially multiple pieces.",
      "items": {
        "required": [
          "consigneeAddress",
          "shipmentDetails"
        ],
        "type": "object",
        "properties": {
          "consigneeAddress": {
            "required": [
              "recipientType",
              "addressType",
              "name",
              "address1",
              "city",
              "country",
              "postalCode"
            ],
            "type": "object",
            "properties": {
              "recipientType": {
                "type": "string",
                "description": "Type of recipient being delivered to",
                "enum": [
                  "business",
                  "residential"
                ]
              },
              "addressType": {
                "type": "string",
                "description": "Type of address being delivered to.",
                "enum": [
                  "doorstep",
                  "servicePoint"
                ]
              },
              "companyName": {
                "maxLength": 35,
                "minLength": 1,
                "type": "string",
                "description": "Optional Name of the organisation receiving the shipment. If addressType is servicePoint, then this is the companyName returned from the Service Point Finder API."
              },
              "address1": {
                "maxLength": 35,
                "minLength": 1,
                "type": "string",
                "description": "Line 1 of the consignee's street address or delivery location. If addressType is servicePoint, then this is the title returned from the Service Point Finder API."
              },
              "address2": {
                "maxLength": 35,
                "minLength": 1,
                "type": "string",
                "description": "Line 2 of the consignee's street address or delivery location. If addressType is servicePoint, then this is the address1 returned from the Service Point Finder API."
              },
              "address3": {
                "maxLength": 35,
                "minLength": 1,
                "type": "string",
                "description": "Line 3 of the consignee's street address or delivery location - typically used for addresses to designate province, district, or neighborhood. If addressType is servicePoint, then this is the address2 returned from the Service Point Finder API."
              },
              "city": {
                "maxLength": 35,
                "minLength": 1,
                "type": "string",
                "description": "Consignee's city. If addressType is servicePoint, then this is the city returned from the Service Point Finder API."
              },
              "state": {
                "maxLength": 35,
                "minLength": 1,
                "type": "string",
                "description": "Consignee's county, state, province or territory. If addressType is servicePoint, then this is the state returned from the Service Point Finder API."
              },
              "postalCode": {
                "maxLength": 15,
                "minLength": 3,
                "type": "string",
                "description": "Consignee's postal code. If addressType is servicePoint, then this is the postalCode returned from the Service Point Finder API."
              },
              "country": {
                "maxLength": 2,
                "minLength": 2,
                "type": "string",
                "description": "Two-character ISO consignee address country code. If addressType is servicePoint, then this is the country returned from the Service Point Finder API."
              },
              "what3words": {
                "type": "object",
                "description": "What 3 words identifier of a recipients delivery location. Used where addressType=doorstep. If the what 3 words have been validated the latitude and longitude can be provided",
                "required": [
                  "words"
                ],
                "properties": {
                  "words": {
                    "type": "string"
                  },
                  "geo": {
                    "type": "object",
                    "required": [
                      "latitude",
                      "longitude"
                    ],
                    "properties": {
                      "latitude": {
                        "type": "number"
                      },
                      "longitude": {
                        "type": "number"
                      }
                    }
                  }
                }
              },
              "name": {
                "maxLength": 35,
                "minLength": 1,
                "type": "string",
                "description": "Name of the person receiving the shipment"
              },
              "email": {
                "maxLength": 70,
                "minLength": 1,
                "type": "string",
                "description": "Consignee's email address. Please supply to allow pre delivery notifications.",
                "format": "email"
              },
              "phone": {
                "maxLength": 35,
                "minLength": 1,
                "type": "string",
                "description": "Consignee's phone number"
              },
              "locationId": {
                "maxLength": 20,
                "minLength": 1,
                "type": "string",
                "description": "If addressType is servicePoint, then this is the servicePointId returned from the Service Point Finder API"
              },
              "locationType": {
                "type": "string",
                "description": "If addressType is servicePoint, then address type of service point: Parcel Shop (More types added in future)",
                "enum": [
                  "ParcelShop"
                ]
              }
            },
            "description": "Address of the consignee (delivery address)."
          },
          "recipientAddress": {
            "required": [
              "address1",
              "city",
              "country",
              "email",
              "name",
              "postalCode"
            ],
            "type": "object",
            "properties": {
              "companyName": {
                "maxLength": 35,
                "minLength": 1,
                "type": "string",
                "description": "Optional Name of the organisation receiving the shipment"
              },
              "address1": {
                "maxLength": 35,
                "minLength": 1,
                "type": "string",
                "description": "Line 1 of the recipient's street address"
              },
              "address2": {
                "maxLength": 35,
                "minLength": 1,
                "type": "string",
                "description": "Line 2 of the recipient's street address"
              },
              "address3": {
                "maxLength": 35,
                "minLength": 1,
                "type": "string",
                "description": "Line 3 of the recipient's street address - typically used for addresses to designate province, district, or neighborhood"
              },
              "city": {
                "maxLength": 35,
                "minLength": 1,
                "type": "string",
                "description": "recipient's city"
              },
              "state": {
                "maxLength": 35,
                "minLength": 1,
                "type": "string",
                "description": "recipient's county, state, province or territory."
              },
              "postalCode": {
                "maxLength": 15,
                "minLength": 3,
                "type": "string",
                "description": "recipient's postal code"
              },
              "country": {
                "maxLength": 2,
                "minLength": 2,
                "type": "string",
                "description": "Two-character ISO recipient address country code."
              },
              "name": {
                "maxLength": 35,
                "minLength": 1,
                "type": "string",
                "description": "Name of the recipient"
              },
              "email": {
                "maxLength": 70,
                "minLength": 1,
                "type": "string",
                "description": "recipient's email address",
                "format": "email"
              },
              "phone": {
                "maxLength": 35,
                "minLength": 1,
                "type": "string",
                "description": "recipient's phone number"
              }
            },
            "description": "Address of the recipient (not delivery address). Required if consignee/delivery address is a service point - Parcel Shop / Parcel Lockers etc."
          },
          "shipmentDetails": {
            "required": [
              "orderedProduct",
              "totalPieces",
              "totalWeight"
            ],
            "type": "object",
            "properties": {
              "shipmentId": {
                "maxLength": 40,
                "minLength": 1,
                "type": "string",
                "description": "Unique Shipment Identifier for the shipment. This is by default generated by the API but can be overwritten by clients."
              },
              "customerRef1": {
                "maxLength": 20,
                "minLength": 1,
                "type": "string",
                "description": "Intended to be printed on Label - 1, also pick and pack info"
              },
              "customerRef2": {
                "maxLength": 20,
                "minLength": 1,
                "type": "string",
                "description": "Intended to be printed on Label - 2, also pick and pack info. Add a value and a description of goods when shipping to the Channel Islands for the customer ref2 field e.g. Toys 10GBP or Toys £10."
              },
              "orderedProduct": {
                "maxLength": 3,
                "minLength": 1,
                "type": "string",
                "description": "Identifies the DHL eCommerce UK 3 digit service code that is to be applied to the shipment. "
              },
              "totalPieces": {
                "minimum": 1,
                "maximum": 99,
                "type": "integer",
                "description": "Total number of pieces/parcels/boxes in shipment. Maximum number of pieces depends on product selected. Please refer the Product API to check max number of pieces for given product"
              },
              "totalWeight": {
                "minimum": 0.1,
                "maximum": 999.99,
                "type": "number",
                "format": "float",
                "description": "Total weight of shipment in kilograms to two decimal places"
              },
              "inBoxReturn": {
                "type": "boolean",
                "description": "Is an inbox return shipment and label required? If true then shipments -> return object should be provided"
              },
              "shipmentDesc": {
                "maxLength": 90,
                "minLength": 1,
                "type": "string",
                "description": "Description of the contents of the shipment (See reference for general categories)"
              },
              "dutiesPaid": {
                "type": "string",
                "description": "Indicates whether duties and taxes for the shipment are paid by the shipper - DDP (Delivered Duties Paid), DAP (Delivered at Place).",
                "enum": [
                  "DDP",
                  "DAP"
                ]
              },
              "freightCharges": {
                "maximum": 1000000000,
                "exclusiveMaximum": true,
                "minimum": 0,
                "exclusiveMinimum": false,
                "type": "number",
                "description": "Freight costs for  shipment"
              },
              "currency": {
                "maxLength": 3,
                "minLength": 3,
                "type": "string",
                "description": "Three-letter ISO Currency code. Only accepts GBP for Clearance Declaration for Windsor Framework."
              },
              "deliveryInstructions": {
                "maxLength": 60,
                "type": "string",
                "description": "Special instructions for the delivery driver"
              },
              "secureLocation": {
                "maxLength": 60,
                "type": "string",
                "description": "Optional description of a location where a parcel may be safely left at delivery"
              },
              "partnerCode": {
                "type": "string",
                "description": "Optional partner code for DHL eCommerce UK partner"
              },
              "totalPallets": {
                "type": "integer",
                "description": "Total number of pallets in this shipment if a pallets product. Please refer the Product API to check max number of pallets allowed for pallet product."
              },
              "exchangeOnDelivery": {
                "type": "boolean",
                "description": "Is an exchange on delivery required? If true, then a parcel must be collected in return for the parcel delivered. (United Kingdom delivery only)"
              },
              "carriageForward": {
                "type": "boolean",
                "description": "This shipment is a carriage forward type shipment"
              },
              "thirdPartyCollection": {
                "type": "boolean",
                "description": "This shipment is a third party collection type shipment"
              },
              "iossShipment": {
                "type": "boolean",
                "description": "Is IOSS Vat processing required for this shipment? If the product selected from the Product Capabilities API has iossApplies as true and nonIossAllowed as false then this must be set to true."
              },
              "totalDeclaredValue": {
                "maximum": 999999.99,
                "exclusiveMaximum": true,
                "minimum": 0,
                "exclusiveMinimum": true,
                "type": "number",
                "description": "Total declared value for the shipment. Recommend to provide the declared value at shipment level. Mandatory to provide totalDeclaredValue at shipment level or piece level declared value if delivery outside United Kingdom."
              },
              "deliveryChoice": {
                "type": "string",
                "description": "Specify what delivery choice is required for the delivery. Delivery Choices are enabled by account and are mutually exclusive at shipment level. Only one delivery choice can be selected if required. If no delivery choice is selected, the shipment will be delivered according to the service selected.",
                "enum": [
                  "AGE",
                  "PIN",
                  "SIG",
                  "POS"
                ]
              }
            },
            "description": "Details relating to whole shipment (can be multiple physical boxes / pieces)"
          },
          "customsDetails": {
            "maxItems": 20,
            "minItems": 1,
            "type": "array",
            "description": "Customs details for all commodities contained in shipment. Only applicable if orderedProduct is an International Product. Recommended to provide customs at shipment level.  ",
            "items": {
              "required": [
                "itemDescription",
                "itemValue",
                "itemWeight",
                "packagedQuantity"
              ],
              "type": "object",
              "properties": {
                "countryOfOrigin": {
                  "maxLength": 2,
                  "minLength": 2,
                  "type": "string",
                  "description": "2-Character Country Code for Origin Manufacturer Country of the product"
                },
                "descriptionExport": {
                  "maxLength": 50,
                  "minLength": 1,
                  "type": "string",
                  "description": "Dedicated description for export customs clearance(if required to be different from item description)"
                },
                "descriptionImport": {
                  "maxLength": 50,
                  "minLength": 1,
                  "type": "string",
                  "description": "Dedicated description for import customs clearance if required to be different from item description)"
                },
                "hsCode": {
                  "maxLength": 8,
                  "minLength": 8,
                  "type": "string",
                  "description": "The Harmonized Tariff Schedule is a number assigned to every possible commodity that can be imported or exported from any country. Please do not include any decimals \".\" in this field. 8 digit HS code required."
                },
                "itemDescription": {
                  "maxLength": 50,
                  "minLength": 1,
                  "type": "string",
                  "description": "Detailed description of the commodity item - Used for customs clearance. Accuracy and Detail are required."
                },
                "itemValue": {
                  "maximum": 999999.99,
                  "exclusiveMaximum": true,
                  "minimum": 0,
                  "exclusiveMinimum": true,
                  "type": "number",
                  "description": "The commercial value of the commodity (per each)."
                },
                "packagedQuantity": {
                  "minimum": 1,
                  "type": "integer",
                  "description": "Quantity of the same item in the package"
                },
                "skuNumber": {
                  "maxLength": 50,
                  "minLength": 1,
                  "type": "string",
                  "description": "SKU #, or item code - Used for product verification on clients website during customs clearance process."
                },
                "itemWeight": {
                  "maximum": 1000000,
                  "exclusiveMaximum": true,
                  "minimum": 0.01,
                  "exclusiveMinimum": true,
                  "type": "number",
                  "description": "The weight of the commodity in kilograms (per each)"
                },
                "productIdentifiers": {
                  "$ref": "#/$defs/ProductIdentifiers"
                },
                "eudr": {
                  "$ref": "#/$defs/EUDRData"
                }
              }
            }
          },
          "pieces": {
            "maxItems": 99,
            "minItems": 1,
            "type": "array",
            "description": "One or more pieces which constitute a shipment. Each piece is the physical box/parcel using its own tracking number, label, ID, list of commodities, VAS.",
            "items": {
              "type": "object",
              "properties": {
                "pieceId": {
                  "maxLength": 43,
                  "minLength": 1,
                  "type": "string",
                  "description": "Follows pattern shipmentId-sequence_number (For example JJD49055313895700000010001  for the first piece/parcel if  shipmentId was JJD49055313895700000010). Used to track that piece aka physical parcel. This is  automatically generated by the API and cannot be overwritten by clients."
                },
                "pieceRefId": {
                  "maxLength": 40,
                  "minLength": 1,
                  "type": "string",
                  "description": "Unique customer reference ID for piece; used for barcodes, by large customers"
                },
                "declaredValue": {
                  "maximum": 999999.99,
                  "exclusiveMaximum": true,
                  "minimum": 0,
                  "exclusiveMinimum": true,
                  "type": "number",
                  "description": "Declared value for the piece. Mandatory if delivery outside United Kingdom. Don't Use Declared value at Piece level rather use total declared value at shipment level."
                },
                "weight": {
                  "maximum": 1000000,
                  "exclusiveMaximum": true,
                  "minimum": 0.01,
                  "exclusiveMinimum": true,
                  "type": "number",
                  "description": "Piece weight in kilograms to two decimal places"
                },
                "length": {
                  "maximum": 1000000000,
                  "exclusiveMaximum": true,
                  "minimum": 0,
                  "exclusiveMinimum": true,
                  "type": "number",
                  "description": "Longest measurement of package in cm (provide if available). Mandatory if delivery outside United Kingdom."
                },
                "width": {
                  "maximum": 1000000000,
                  "exclusiveMaximum": true,
                  "minimum": 0,
                  "exclusiveMinimum": true,
                  "type": "number",
                  "description": "Width dimension of the package in cm (provide if available). Mandatory if delivery outside United Kingdom."
                },
                "height": {
                  "maximum": 1000000000,
                  "exclusiveMaximum": true,
                  "minimum": 0,
                  "exclusiveMinimum": true,
                  "type": "number",
                  "description": "Height dimension of the package in cm (provide if available). Mandatory if delivery outside United Kingdom."
                },
                "diameter": {
                  "maximum": 1000000000,
                  "exclusiveMaximum": true,
                  "minimum": 0,
                  "exclusiveMinimum": true,
                  "type": "number",
                  "description": "Diameter dimension of the package in cm (provide if available)."
                },
                "customsDetails": {
                  "maxItems": 20,
                  "minItems": 1,
                  "type": "array",
                  "description": "Customs details for all commodities contained in piece. Only applicable if orderedProduct is an International Product. **Don't Use customs at Piece level rather use customs at shipment level.**",
                  "items": {
                    "required": [
                      "itemDescription",
                      "itemValue",
                      "itemWeight",
                      "packagedQuantity"
                    ],
                    "type": "object",
                    "properties": {
                      "countryOfOrigin": {
                        "maxLength": 2,
                        "minLength": 2,
                        "type": "string",
                        "description": "2-Character Country Code for Origin Manufacturer Country of the product"
                      },
                      "descriptionExport": {
                        "maxLength": 50,
                        "minLength": 1,
                        "type": "string",
                        "description": "Dedicated description for export customs clearance(if required to be different from item description)"
                      },
                      "descriptionImport": {
                        "maxLength": 50,
                        "minLength": 1,
                        "type": "string",
                        "description": "Dedicated description for import customs clearance if required to be different from item description)"
                      },
                      "hsCode": {
                        "maxLength": 8,
                        "minLength": 8,
                        "type": "string",
                        "description": "The Harmonized Tariff Schedule is a number assigned to every possible commodity that can be imported or exported from any country. Please do not include any decimals \".\" in this field. 8 digit HS code required."
                      },
                      "itemDescription": {
                        "maxLength": 50,
                        "minLength": 1,
                        "type": "string",
                        "description": "Detailed description of the commodity item - Used for customs clearance. Accuracy and Detail are required."
                      },
                      "itemValue": {
                        "maximum": 999999.99,
                        "exclusiveMaximum": true,
                        "minimum": 0,
                        "exclusiveMinimum": true,
                        "type": "number",
                        "description": "The commercial value of the commodity (per each)."
                      },
                      "packagedQuantity": {
                        "minimum": 1,
                        "type": "integer",
                        "description": "Quantity of the same item in the package"
                      },
                      "skuNumber": {
                        "maxLength": 50,
                        "minLength": 1,
                        "type": "string",
                        "description": "SKU #, or item code - Used for product verification on clients website during customs clearance process."
                      },
                      "itemWeight": {
                        "maximum": 1000000,
                        "exclusiveMaximum": true,
                        "minimum": 0.01,
                        "exclusiveMinimum": true,
                        "type": "number",
                        "description": "The weight of the commodity in kilograms (per each)"
                      },
                      "productIdentifiers": {
                        "$ref": "#/$defs/ProductIdentifiers"
                      },
                      "eudr": {
                        "$ref": "#/$defs/EUDRData"
                      }
                    }
                  }
                }
              }
            }
          },
          "pickList": {
            "type": "array",
            "description": "Pick list is list of items in shipment. Used for creating Pick List labels.",
            "items": {
              "type": "object",
              "properties": {
                "itemDescription": {
                  "maxLength": 50,
                  "minLength": 1,
                  "type": "string",
                  "description": "Detailed description of item. Accuracy and Detail are required."
                },
                "itemValue": {
                  "maximum": 999999.99,
                  "exclusiveMaximum": true,
                  "minimum": 0,
                  "exclusiveMinimum": true,
                  "type": "number",
                  "description": "The commercial value of the item (per each)."
                },
                "itemDiscount": {
                  "maximum": 999999.99,
                  "exclusiveMaximum": true,
                  "minimum": 0,
                  "exclusiveMinimum": true,
                  "type": "number",
                  "description": "The discount amount for the item (per each)."
                },
                "packagedQuantity": {
                  "minimum": 1,
                  "type": "integer",
                  "description": "Quantity of the same item in the order"
                },
                "skuNumber": {
                  "maxLength": 50,
                  "minLength": 1,
                  "type": "string",
                  "description": "SKU #, or item code - Used for product verification."
                },
                "itemWeight": {
                  "maximum": 1000000,
                  "exclusiveMaximum": true,
                  "minimum": 0.01,
                  "exclusiveMinimum": true,
                  "type": "number",
                  "description": "The weight of the item kilograms (per each)"
                },
                "currency": {
                  "maxLength": 3,
                  "minLength": 3,
                  "type": "string",
                  "description": "Three-letter ISO Currency code"
                }
              }
            }
          },
          "customsInvoice": {
            "required": [
              "reasonForExport"
            ],
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "description": "Type of customs invoice required – commercial/proforma",
                "enum": [
                  "commercial",
                  "proforma"
                ]
              },
              "number": {
                "maxLength": 35,
                "minLength": 1,
                "type": "string",
                "description": "Invoice number"
              },
              "date": {
                "type": "string",
                "description": "Date of customs invoice in ISO 8601 format"
              },
              "reasonForExport": {
                "type": "string",
                "description": "The reason for exporting the parcel. Valid values are - [ gift, documents, commercial sample, commercial sale ]",
                "enum": [
                  "gift",
                  "documents",
                  "commercialSample",
                  "commercialSale"
                ]
              }
            },
            "description": "Optional details for a customs invoice"
          },
          "return": {
            "required": [
              "returnAccount"
            ],
            "type": "object",
            "properties": {
              "returnShipmentId": {
                "maxLength": 40,
                "minLength": 1,
                "type": "string",
                "description": "Unique Shipment Identifier for the return shipment. This is by default generated by the API but can be overwritten by clients."
              },
              "customerRef1": {
                "maxLength": 20,
                "type": "string",
                "description": "Customer reference for the generated return shipment (RMA number)"
              },
              "returnAccount": {
                "maxLength": 10,
                "minLength": 1,
                "type": "string",
                "description": "The DHL eCommerce UK return account number. You will receive this after doing the onboarding  with DHL sales."
              },
              "shipmentDesc": {
                "maxLength": 90,
                "type": "string",
                "description": "Description of contents of return shipment"
              },
              "declaredValue": {
                "maximum": 999.99,
                "minimum": 0.01,
                "type": "number",
                "description": "Declared value of the return shipment in the currency specified"
              }
            },
            "description": "Optional details for return shipment for an inboxReturn"
          },
          "extendedLiability": {
            "type": "object",
            "properties": {
              "extendedLiabilityUnits": {
                "maximum": 5,
                "minimum": 1,
                "type": "integer",
                "description": "For consignments delivered in the UK, the number of additional extended liability cover units required"
              },
              "extendedLiabilityRequired": {
                "type": "boolean",
                "description": "For consignments delivered outside the UK, is extended liability cover required?"
              }
            },
            "description": "Optional details of extended liability cover required for this shipment"
          },
          "senderCustomsRegistrations": {
            "$ref": "#/$defs/customsRegistrations"
          },
          "recipientCustomsRegistrations": {
            "type": "array",
            "items": {
              "required": [
                "id",
                "type"
              ],
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "EORI",
                    "FDA",
                    "VAT",
                    "DEFAULT"
                  ]
                },
                "id": {
                  "type": "string",
                  "description": "Customs registration identifier, must be between 10 and 20 characters if type is EORI."
                }
              }
            },
            "description": "An array of recipient customs registrations"
          },
          "customerPrice": {
            "required": [
              "price",
              "tax",
              "taxRate"
            ],
            "type": "object",
            "properties": {
              "price": {
                "description": "Price charged to customer",
                "type": "number"
              },
              "tax": {
                "description": "Tax (eg VAT) charged to customer",
                "type": "number"
              },
              "taxRate": {
                "description": "Tax rate (eg VAT) charged to customer",
                "type": "string",
                "enum": [
                  "standardUk",
                  "zeroRated"
                ]
              }
            }
          },
          "clearanceDeclaration": {
            "$ref": "#/$defs/clearanceDeclaration"
          }
        },
        "description": "Shipment items."
      }
    }
  },
  "$defs": {
    "B2BGreenLaneType": {
      "type": "object",
      "properties": {
        "shipmentMovementType": {
          "type": "string",
          "enum": [
            "B2B"
          ],
          "description": "Use B2B"
        },
        "sendersEORINumber": {
          "type": "string",
          "maximum": 15,
          "description": "An EORI number can be obtained from HMRC note you will need an XI EORI. Mandatory if UKIMS is provided"
        },
        "sendersUKIMSNumber": {
          "type": "string",
          "maximum": 32,
          "description": "UKIMS number (UK Internal Market Scheme number) is issued by HMRC and allows you to declare goods not at risk of entering the EU The UKIMS number must be 32 characters in length.This should correspond to the senders EORI number"
        },
        "recipientEORINumber": {
          "type": "string",
          "maximum": 15,
          "description": "An EORI number can be obtained from HMRC note you will need an XI EORI"
        },
        "recipientUKIMSNumber": {
          "type": "string",
          "maximum": 32,
          "description": "UKIMS number is issued by HMRC and allows you to declare goods not at risk of entering the EU The UKIMS number must be 32 characters in length. This should correspond to the recipients EORI number"
        },
        "totalValue": {
          "minimum": 0.01,
          "type": "number",
          "description": "Sum of all unit value listed as part of the contents.",
          "format": "decimal"
        },
        "currency": {
          "maxLength": 3,
          "minLength": 3,
          "type": "string",
          "description": "Three-letter ISO Currency code. We currently accept only GBP as valid currency."
        },
        "reasonForExport": {
          "type": "string",
          "enum": [
            "gift",
            "commercialSample",
            "commercialSale"
          ],
          "description": "Use one of the following gift,commercialSample,commercialSale"
        },
        "numberOfItems": {
          "minimum": 1,
          "type": "integer",
          "description": "Sum of all item quantity listed as part of contents."
        },
        "items": {
          "type": "array",
          "items": {
            "properties": {
              "descriptionOfGoods": {
                "type": "string",
                "maximum": 90,
                "description": "A detailed description of the article (e.g. men's cotton shirts). General descriptions (e.g. spare parts) are not permitted"
              },
              "commodityCode": {
                "type": "string",
                "description": "A commodity code (also known as a HS code, tariff code) of 10 digits. Please refer to HMRC for more info"
              },
              "unitQuantity": {
                "minimum": 1,
                "type": "integer",
                "description": "Number of items for the given commodityCode"
              },
              "unitValue": {
                "type": "string",
                "description": "Unit value of article including decimal place. Eg £19.88 = 19.88"
              },
              "unitWeight": {
                "minimum": 0.01,
                "type": "number",
                "description": "The Unit Weight of this article in kgs."
              },
              "countryOfManufacture": {
                "pattern": "^[A-Z]{2}$",
                "type": "string",
                "description": "The country where the goods originated (produced/manufactured/assembled). ISO 2 character country code                               "
              },
              "eudr": {
                "$ref": "#/$defs/EUDRData"
              }
            },
            "required": [
              "descriptionOfGoods",
              "unitQuantity",
              "unitWeight",
              "unitValue",
              "countryOfManufacture",
              "commodityCode"
            ]
          }
        }
      },
      "required": [
        "shipmentMovementType",
        "numberOfItems",
        "totalValue"
      ]
    },
    "B2BRedLaneType": {
      "type": "object",
      "properties": {
        "shipmentMovementType": {
          "type": "string",
          "enum": [
            "B2B"
          ],
          "description": "Use B2B"
        },
        "sendersDefermentAccount": {
          "type": "string",
          "maximum": 20,
          "description": "If blank and shipment movement type is B2B red lane then DHL deferment account will be applied"
        },
        "recipientEORINumber*": {
          "type": "string",
          "maximum": 15,
          "description": "An EORI number can be obtained from HMRC note you will need an XI EORI. Mandatory for B2B Red Lane"
        },
        "totalValue": {
          "minimum": 0.01,
          "type": "number",
          "description": "Sum of all unit value listed as part of the contents.",
          "format": "decimal"
        },
        "currency": {
          "maxLength": 3,
          "minLength": 3,
          "type": "string",
          "description": "Three-letter ISO Currency code. We currently accept only GBP as valid currency."
        },
        "reasonForExport": {
          "type": "string",
          "enum": [
            "gift",
            "commercialSample",
            "commercialSale"
          ],
          "description": "Use one of the following gift,commercialSample,commercialSale"
        },
        "shippingCharges": {
          "type": "number",
          "description": "The amount paid to ship the item.",
          "format": "decimal"
        },
        "numberOfItems": {
          "minimum": 1,
          "type": "integer",
          "description": "Sum of all item quantity listed as part of contents."
        },
        "items": {
          "type": "array",
          "items": {
            "properties": {
              "descriptionOfGoods": {
                "type": "string",
                "maximum": 90,
                "description": "A detailed description of the article (e.g. men's cotton shirts). General descriptions (e.g. spare parts) are not permitted"
              },
              "commodityCode": {
                "type": "string",
                "description": "A commodity code (also known as a HS code, tariff code) of 10 digits. Please refer to HMRC for more info"
              },
              "unitQuantity": {
                "minimum": 1,
                "type": "integer",
                "description": "Number of items for the given commodityCode"
              },
              "unitWeight": {
                "minimum": 0.01,
                "type": "number",
                "description": "The Unit Weight of this article in kgs."
              },
              "unitValue": {
                "type": "string",
                "description": "Unit value of article including decimal place. Eg £19.88 = 19.88"
              },
              "countryOfManufacture": {
                "pattern": "^[A-Z]{2}$",
                "type": "string",
                "description": "The country where the goods originated (produced/manufactured/assembled). ISO 2 character country code.                               "
              },
              "eudr": {
                "$ref": "#/$defs/EUDRData"
              }
            },
            "required": [
              "descriptionOfGoods",
              "unitQuantity",
              "unitWeight",
              "unitValue",
              "countryOfManufacture",
              "commodityCode"
            ]
          }
        }
      },
      "required": [
        "shipmentMovementType",
        "shippingCharges",
        "reasonForExport",
        "numberOfItems",
        "totalValue"
      ]
    },
    "B2BType": {
      "oneOf": [
        {
          "$ref": "#/$defs/B2BGreenLaneType"
        },
        {
          "$ref": "#/$defs/B2BRedLaneType"
        }
      ]
    },
    "B2CType": {
      "type": "object",
      "properties": {
        "shipmentMovementType": {
          "type": "string",
          "enum": [
            "B2C"
          ],
          "description": "Use B2C"
        },
        "sendersEORINumber": {
          "type": "string",
          "maximum": 15,
          "description": "An EORI number can be obtained from HMRC note you will need an XI EORI. Mandatory if UKIMS is provided"
        },
        "sendersUKIMSNumber": {
          "type": "string",
          "maximum": 32,
          "description": "UKIMS number (UK Internal Market Scheme number) is issued by HMRC and allows you to declare goods not at risk of entering the EU The UKIMS number must be 32 characters in length.This should correspond to the senders EORI number."
        },
        "recipientEORINumber": {
          "type": "string",
          "maximum": 15,
          "description": "An EORI number can be obtained from HMRC note you will need an XI EORI"
        },
        "recipientUKIMSNumber": {
          "type": "string",
          "maximum": 32,
          "description": "UKIMS number is issued by HMRC and allows you to declare goods not at risk of entering the EU. The UKIMS number must be 32 characters in length. This should correspond to the recipient EORI number"
        },
        "totalValue": {
          "minimum": 0.01,
          "type": "number",
          "description": "Sum of all unit value listed as part of the contents.",
          "format": "decimal"
        },
        "currency": {
          "maxLength": 3,
          "minLength": 3,
          "type": "string",
          "description": "Three-letter ISO Currency code. We currently accept only GBP as valid currency."
        },
        "reasonForExport": {
          "type": "string",
          "enum": [
            "gift",
            "commercialSample",
            "commercialSale"
          ],
          "description": "Use one of the following gift,commercialSample,commercialSale"
        },
        "numberOfItems": {
          "minimum": 1,
          "type": "integer",
          "description": "Sum of all item quantity listed as part of contents."
        },
        "items": {
          "type": "array",
          "items": {
            "properties": {
              "descriptionOfGoods": {
                "type": "string",
                "maximum": 90,
                "description": "A detailed description of the article (e.g. men's cotton shirts). General descriptions (e.g. spare parts) are not permitted"
              },
              "commodityCode": {
                "type": "string",
                "description": "A commodity code (also known as a HS code, tariff code) of 6 digits. Please refer to HMRC for more info"
              },
              "unitValue": {
                "type": "string",
                "description": "Unit value of article including decimal place. Eg £19.88 = 19.88"
              },
              "unitQuantity": {
                "type": "string"
              },
              "eudr": {
                "$ref": "#/$defs/EUDRData"
              }
            },
            "required": [
              "descriptionOfGoods",
              "unitValue",
              "unitQuantity"
            ]
          }
        }
      },
      "required": [
        "shipmentMovementType",
        "totalValue",
        "numberOfItems"
      ]
    },
    "C2BType": {
      "type": "object",
      "properties": {
        "shipmentMovementType": {
          "type": "string",
          "enum": [
            "C2B"
          ],
          "description": "Use C2B"
        },
        "recipientEORINumber": {
          "type": "string",
          "maximum": 15,
          "description": "An EORI number can be obtained from HMRC note you will need an XI EORI"
        },
        "recipientUKIMSNumber": {
          "type": "string",
          "maximum": 32,
          "description": "UKIMS number is issued by HMRC and allows you to declare goods not at risk of entering the EU. The UKIMS number must be 32 characters in length. This should correspond to the recipient EORI number"
        },
        "totalValue": {
          "minimum": 0.01,
          "type": "number",
          "description": "Sum of all unit value listed as part of the contents.",
          "format": "decimal"
        },
        "currency": {
          "maxLength": 3,
          "minLength": 3,
          "type": "string",
          "description": "Three-letter ISO Currency code. We currently accept only GBP as valid currency."
        },
        "reasonForExport": {
          "type": "string",
          "enum": [
            "gift",
            "commercialSample",
            "commercialSale"
          ],
          "description": "Use one of the following gift,commercialSample,commercialSale"
        },
        "numberOfItems": {
          "minimum": 1,
          "type": "integer",
          "description": "Sum of all item quantity listed as part of contents."
        },
        "items": {
          "type": "array",
          "items": {
            "properties": {
              "descriptionOfGoods": {
                "type": "string",
                "maximum": 90,
                "description": "A detailed description of the article (e.g. men's cotton shirts). General descriptions (e.g. spare parts) are not permitted"
              },
              "commodityCode": {
                "type": "string",
                "description": "A commodity code (also known as a HS code, tariff code) of 6 digits. Please refer to HMRC for more info"
              },
              "unitValue": {
                "type": "string",
                "description": "Unit value of article including decimal place. Eg £19.88 = 19.88"
              },
              "unitQuantity": {
                "type": "string"
              }
            },
            "required": [
              "descriptionOfGoods",
              "unitValue",
              "unitQuantity"
            ]
          }
        }
      },
      "required": [
        "shipmentMovementType",
        "totalValue",
        "numberOfItems"
      ]
    },
    "C2CType": {
      "type": "object",
      "properties": {
        "shipmentMovementType": {
          "type": "string",
          "enum": [
            "C2C"
          ]
        },
        "descriptionOfGoods": {
          "type": "string",
          "maximum": 90,
          "description": "A detailed description of the article (e.g. men's cotton shirts). General descriptions (e.g. spare parts) are not permitted"
        },
        "totalValue": {
          "minimum": 0.01,
          "type": "number",
          "description": "Sum of all unit value listed as part of the contents.",
          "format": "decimal"
        },
        "currency": {
          "maxLength": 3,
          "minLength": 3,
          "type": "string",
          "description": "Three-letter ISO Currency code. We currently accept only GBP as valid currency."
        },
        "reasonForExport": {
          "type": "string",
          "enum": [
            "gift",
            "commercialSample",
            "commercialSale"
          ],
          "description": "Use one of the following gift,commercialSample,commercialSale"
        }
      },
      "required": [
        "shipmentMovementType",
        "descriptionOfGoods",
        "totalValue"
      ]
    },
    "EUDRData": {
      "type": "object",
      "description": "Contains the EUDR Due Diligence Statement reference and the associated EUDR type code used to identify the applicable declaration or exemption\n",
      "properties": {
        "ddsReferenceNumber": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 14,
          "description": "Due Diligence Statement (DDS) reference number. Required where the commodity is subject to EUDR requirements."
        },
        "documentCode": {
          "type": "string",
          "pattern": "^[A-Z][0-9]{3}$",
          "description": "EUDR type code used to identify the applicable declaration or exemption"
        }
      },
      "required": [
        "documentCode"
      ]
    },
    "ProductIdentifiers": {
      "type": "object",
      "description": "Product identifiers required for customs compliance for EU shipments.\n",
      "properties": {
        "merchant": {
          "type": "string",
          "maxLength": 70,
          "description": "Merchant product identifier for the item. The product or SKU code used to identify the product in the merchant catalogue.\n"
        },
        "nonStandardised": {
          "type": "string",
          "maxLength": 70,
          "description": "Non-standardised manufacturer product identifier. The model, part or style number assigned by the manufacturer.\n"
        },
        "standardised": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 70,
          "description": "Standardised manufacturer product identifier. Internationally recognised identifier such as EAN, GTIN, UPC or ISBN.\n"
        }
      },
      "additionalProperties": false,
      "required": [
        "merchant",
        "nonStandardised"
      ]
    },
    "clearanceDeclaration": {
      "oneOf": [
        {
          "$ref": "#/$defs/C2CType"
        },
        {
          "$ref": "#/$defs/C2BType"
        },
        {
          "$ref": "#/$defs/B2CType"
        },
        {
          "$ref": "#/$defs/B2BType"
        }
      ]
    },
    "customsRegistrations": {
      "type": "array",
      "items": {
        "required": [
          "id",
          "type"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "EORI",
              "FDA",
              "VAT",
              "IOSS"
            ]
          },
          "id": {
            "type": "string",
            "description": "Customs registration identifier, must be between 14 and 15 characters if type is EORI."
          }
        }
      },
      "description": "An array of customs registrations"
    }
  }
}