{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dhl/json-schema/dhl-supermodel-io-logistics-tracking-shipments-schema.json",
  "title": "Shipments",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dhl-ecommerce-uk-openapi.json#/components/schemas/supermodelIoLogisticsTrackingShipments",
  "type": "object",
  "properties": {
    "url": {
      "type": "string"
    },
    "prevUrl": {
      "type": "string"
    },
    "nextUrl": {
      "type": "string"
    },
    "firstUrl": {
      "type": "string"
    },
    "lastUrl": {
      "type": "string"
    },
    "shipments": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/supermodelIoLogisticsTrackingShipment"
      }
    },
    "possibleAdditionalShipmentsUrl": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "$defs": {
    "supermodelIoGs1PropertiesCountryCode": {
      "title": "Country Code",
      "type": "string"
    },
    "supermodelIoLogisticsSupportingOrganization": {
      "title": "Organization",
      "type": "object",
      "properties": {
        "organizationName": {
          "type": "string"
        }
      }
    },
    "supermodelIoLogisticsSupportingPerson": {
      "title": "Person",
      "type": "object",
      "properties": {
        "familyName": {
          "type": "string"
        },
        "givenName": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "supermodelIoLogisticsSupportingPlace": {
      "title": "Place",
      "type": "object",
      "properties": {
        "address": {
          "type": "object",
          "properties": {
            "countryCode": {
              "type": "string",
              "allOf": [
                {
                  "$ref": "#/$defs/supermodelIoGs1PropertiesCountryCode"
                }
              ]
            },
            "postalCode": {
              "type": "string"
            },
            "addressLocality": {
              "type": "string"
            },
            "streetAddress": {
              "type": "string"
            }
          }
        }
      }
    },
    "supermodelIoLogisticsSupportingProduct": {
      "title": "Product",
      "type": "object",
      "properties": {
        "productName": {
          "type": "string"
        }
      }
    },
    "supermodelIoLogisticsSupportingTimestamp": {
      "title": "Timestamp",
      "allOf": [
        {
          "$ref": "#/$defs/supermodelIoSchemaorgDateTime"
        },
        {
          "$ref": "#/$defs/supermodelIoSchemaorgDate"
        }
      ]
    },
    "supermodelIoLogisticsTrackingDgfAirport": {
      "title": "DGF Airport",
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/supermodelIoLogisticsTrackingDgfLocation"
        }
      ],
      "properties": {
        "dgf:locationCode": {
          "allOf": [
            {
              "$ref": "#/$defs/supermodelIoSchemaorgPropertiesIataCode"
            }
          ]
        },
        "countryCode": {
          "type": "string",
          "allOf": [
            {
              "$ref": "#/$defs/supermodelIoGs1PropertiesCountryCode"
            }
          ]
        }
      }
    },
    "supermodelIoLogisticsTrackingDgfLocation": {
      "title": "DGF Location",
      "type": "object",
      "properties": {
        "dgf:locationName": {
          "type": "string"
        }
      }
    },
    "supermodelIoLogisticsTrackingDgfRoute": {
      "title": "DGF Route",
      "type": "object",
      "properties": {
        "dgf:vesselName": {
          "type": "string"
        },
        "dgf:voyageFlightNumber": {
          "type": "string"
        },
        "dgf:airportOfDeparture": {
          "$ref": "#/$defs/supermodelIoLogisticsTrackingDgfAirport"
        },
        "dgf:airportOfDestination": {
          "$ref": "#/$defs/supermodelIoLogisticsTrackingDgfAirport"
        },
        "dgf:estimatedDepartureDate": {
          "allOf": [
            {
              "$ref": "#/$defs/supermodelIoLogisticsSupportingTimestamp"
            }
          ]
        },
        "dgf:estimatedArrivalDate": {
          "allOf": [
            {
              "$ref": "#/$defs/supermodelIoLogisticsSupportingTimestamp"
            }
          ]
        },
        "dgf:placeOfAcceptance": {
          "$ref": "#/$defs/supermodelIoLogisticsTrackingDgfLocation"
        },
        "dgf:portOfLoading": {
          "$ref": "#/$defs/supermodelIoLogisticsTrackingDgfLocation"
        },
        "dgf:portOfUnloading": {
          "$ref": "#/$defs/supermodelIoLogisticsTrackingDgfLocation"
        },
        "dgf:placeOfDelivery": {
          "$ref": "#/$defs/supermodelIoLogisticsTrackingDgfLocation"
        }
      }
    },
    "supermodelIoLogisticsTrackingProofOfDelivery": {
      "title": "Proof of Delivery",
      "type": "object",
      "properties": {
        "timestamp": {
          "allOf": [
            {
              "$ref": "#/$defs/supermodelIoLogisticsSupportingTimestamp"
            }
          ]
        },
        "signatureUrl": {
          "type": "string",
          "description": "Provides the full link, including the image extension, that is used in the tracing images API to get the signature image via the imageId. The image is for the total shipment"
        },
        "documentUrl": {
          "type": "string",
          "description": "Provides the full link, including the image extension, that is used in the tracing images API to get the delivery photo via the imageId. The image is for the total shipment"
        },
        "signed": {
          "$ref": "#/$defs/supermodelIoLogisticsSupportingPerson"
        }
      }
    },
    "supermodelIoLogisticsTrackingShipment": {
      "title": "Shipment",
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "service": {
          "enum": [
            "freight",
            "express",
            "post-de",
            "parcel-de",
            "parcel-nl",
            "parcel-pl",
            "dsc",
            "dgf",
            "ecommerce"
          ],
          "type": "string"
        },
        "origin": {
          "$ref": "#/$defs/supermodelIoLogisticsSupportingPlace"
        },
        "destination": {
          "$ref": "#/$defs/supermodelIoLogisticsSupportingPlace"
        },
        "status": {
          "$ref": "#/$defs/supermodelIoLogisticsTrackingShipmentEvent"
        },
        "estimatedTimeOfDelivery": {
          "allOf": [
            {
              "$ref": "#/$defs/supermodelIoLogisticsSupportingTimestamp"
            }
          ]
        },
        "estimatedDeliveryTimeFrame": {
          "type": "object",
          "properties": {
            "estimatedFrom": {
              "allOf": [
                {
                  "$ref": "#/$defs/supermodelIoLogisticsSupportingTimestamp"
                }
              ]
            },
            "estimatedThrough": {
              "allOf": [
                {
                  "$ref": "#/$defs/supermodelIoLogisticsSupportingTimestamp"
                }
              ]
            }
          }
        },
        "estimatedTimeOfDeliveryRemark": {},
        "serviceUrl": {},
        "rerouteUrl": {},
        "details": {
          "$ref": "#/$defs/supermodelIoLogisticsTrackingShipmentDetails"
        },
        "events": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/supermodelIoLogisticsTrackingShipmentEvent"
          }
        }
      }
    },
    "supermodelIoLogisticsTrackingShipmentDetails": {
      "title": "Shipment Details",
      "type": "object",
      "properties": {
        "carrier": {
          "$ref": "#/$defs/supermodelIoLogisticsSupportingOrganization"
        },
        "product": {
          "$ref": "#/$defs/supermodelIoLogisticsSupportingProduct"
        },
        "receiver": {
          "allOf": [
            {
              "$ref": "#/$defs/supermodelIoLogisticsSupportingOrganization"
            },
            {
              "$ref": "#/$defs/supermodelIoLogisticsSupportingPerson"
            }
          ]
        },
        "sender": {
          "allOf": [
            {
              "$ref": "#/$defs/supermodelIoLogisticsSupportingOrganization"
            },
            {
              "$ref": "#/$defs/supermodelIoLogisticsSupportingPerson"
            }
          ]
        },
        "proofOfDelivery": {
          "$ref": "#/$defs/supermodelIoLogisticsTrackingProofOfDelivery"
        },
        "totalNumberOfPieces": {
          "type": "number"
        },
        "pieceIds": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "weight": {
          "type": "object"
        },
        "volume": {
          "type": "object"
        },
        "loadingMeters": {
          "type": "number"
        },
        "dimensions": {
          "type": "object",
          "properties": {
            "width": {
              "type": "object"
            },
            "height": {
              "type": "object"
            },
            "length": {
              "type": "object"
            }
          }
        },
        "references": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "number": {
                "type": "string"
              },
              "type": {
                "enum": [
                  "customer-reference",
                  "customer-confirmation-number",
                  "local-tracking-number",
                  "ecommerce-number",
                  "housebill",
                  "masterbill",
                  "container-number",
                  "shipment-id",
                  "domestic-consignment-id",
                  "reference"
                ],
                "type": "string"
              }
            }
          }
        },
        "dgf:routes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/supermodelIoLogisticsTrackingDgfRoute"
          }
        }
      }
    },
    "supermodelIoLogisticsTrackingShipmentEvent": {
      "title": "Shipment Event",
      "type": "object",
      "properties": {
        "timestamp": {
          "allOf": [
            {
              "$ref": "#/$defs/supermodelIoLogisticsSupportingTimestamp"
            }
          ]
        },
        "location": {
          "$ref": "#/$defs/supermodelIoLogisticsSupportingPlace"
        },
        "statusCode": {
          "enum": [
            "pre-transit",
            "transit",
            "delivered",
            "failure",
            "unknown"
          ],
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "remark": {
          "type": "string"
        },
        "nextSteps": {
          "type": "string"
        }
      }
    },
    "supermodelIoSchemaorgDataType": {
      "title": "DataType"
    },
    "supermodelIoSchemaorgDate": {
      "title": "Date",
      "type": "string",
      "allOf": [
        {
          "$ref": "#/$defs/supermodelIoSchemaorgDataType"
        }
      ]
    },
    "supermodelIoSchemaorgDateTime": {
      "title": "DateTime",
      "type": "string",
      "allOf": [
        {
          "$ref": "#/$defs/supermodelIoSchemaorgDataType"
        }
      ]
    },
    "supermodelIoSchemaorgPropertiesIataCode": {
      "title": "iataCode",
      "allOf": [
        {
          "$ref": "#/$defs/supermodelIoSchemaorgText"
        }
      ]
    },
    "supermodelIoSchemaorgText": {
      "title": "Text",
      "type": "string",
      "allOf": [
        {
          "$ref": "#/$defs/supermodelIoSchemaorgDataType"
        }
      ]
    }
  }
}