{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/postnl/json-schema/postnl-shippingstatus-response-schema.json",
  "title": "shippingstatusResponse",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/postnl-shippingstatus-api-openapi.yml#/components/schemas/shippingstatusResponse",
  "type": "object",
  "properties": {
    "CompleteStatus": {
      "type": "object",
      "description": "The current status and old statuses of the shipment",
      "properties": {
        "Shipment": {
          "$ref": "#/$defs/completeStatusShipment"
        }
      }
    },
    "CurrentStatus": {
      "type": "object",
      "description": "The current status and old statuses of the shipment",
      "properties": {
        "Shipment": {
          "$ref": "#/$defs/currentStatusShipment"
        }
      }
    },
    "Warnings": {
      "description": "Possible warnings (see [Error Codes](https://developer.postnl.nl/docs/#/http/reference-data/error-codes) for possible values)",
      "type": "array",
      "items": {
        "$ref": "#/$defs/shippingstatusWarning"
      }
    }
  },
  "$defs": {
    "completeStatusShipment": {
      "type": "object",
      "properties": {
        "MainBarcode": {
          "type": "string",
          "description": "The main barcode of the shipment"
        },
        "Barcode": {
          "type": "string",
          "description": "The barcode of the shipment"
        },
        "ShipmentAmount": {
          "type": "string",
          "description": "The amount of parcels in the multi-collo shipment"
        },
        "ShipmentCounter": {
          "type": "string",
          "description": "The sequence of this parcel in the multi-collo shipment"
        },
        "Customer": {
          "$ref": "#/$defs/shippingstatusCustomer"
        },
        "ProductCode": {
          "type": "string",
          "description": "The product code of the shipment"
        },
        "ProductDescription": {
          "type": "string",
          "description": "The description of the product code"
        },
        "Reference": {
          "type": "string",
          "description": "The customer reference belonging to the shipment"
        },
        "DeliveryDate": {
          "type": "string",
          "description": "The expected delivery date of the shipment"
        },
        "Dimension": {
          "$ref": "#/$defs/shippingstatusDimension"
        },
        "Amount": {
          "$ref": "#/$defs/shippingstatusAmount"
        },
        "Address": {
          "type": "array",
          "description": "A list of addresses belonging to the shipment",
          "items": {
            "$ref": "#/$defs/shippingstatusAddress"
          }
        },
        "Event": {
          "type": "array",
          "description": "The events of the shipment. (see the [Event Codes](https://developer.postnl.nl/docs/#/http/reference-data/t-t-status-codes/event-codes) for possible values.",
          "items": {
            "type": "object",
            "properties": {
              "Code": {
                "type": "string",
                "description": "The event code"
              },
              "Description": {
                "type": "string",
                "description": "The event description"
              },
              "DestinationLocationCode": {
                "type": "string",
                "description": "Location code of the destination"
              },
              "LocationCode": {
                "type": "string",
                "description": "The current location code"
              },
              "RouteCode": {
                "type": "string",
                "description": "The route code"
              },
              "RouteNumber": {
                "type": "string",
                "description": "The route number"
              },
              "TimeStamp": {
                "type": "string",
                "description": "Timestamp of the event"
              }
            }
          }
        },
        "Expectation": {
          "type": "object",
          "description": "The expected delivery timeframe",
          "properties": {
            "ETAFrom": {
              "type": "string",
              "description": "The start of the timeframe"
            },
            "ETATo": {
              "type": "string",
              "description": "The end of the timeframe"
            }
          }
        },
        "ProductOptions": {
          "type": "array",
          "description": "A list of product options.",
          "items": {
            "$ref": "#/$defs/shippingstatusProductOptions"
          }
        },
        "Status": {
          "type": "object",
          "description": "The current status of the shipment (see the [Status codes](https://developer.postnl.nl/docs/#/http/reference-data/t-t-status-codes/event-codes) for possible values.",
          "properties": {
            "TimeStamp": {
              "type": "string",
              "description": "The status timestamp"
            },
            "StatusCode": {
              "type": "string",
              "description": "The status code"
            },
            "StatusDescription": {
              "type": "string",
              "description": "The status description"
            },
            "PhaseCode": {
              "type": "string",
              "description": "The phase code"
            },
            "PhaseDescription": {
              "type": "string",
              "description": "The phase description"
            }
          }
        },
        "OldStatus": {
          "type": "array",
          "description": "A list of previous status codes (see the [Status codes](https://developer.postnl.nl/docs/#/http/reference-data/t-t-status-codes/event-codes) for possible values.",
          "items": {
            "type": "object",
            "properties": {
              "TimeStamp": {
                "type": "string",
                "description": "The status timestamp"
              },
              "StatusCode": {
                "type": "string",
                "description": "The status code"
              },
              "StatusDescription": {
                "type": "string",
                "description": "The status description"
              },
              "PhaseCode": {
                "type": "string",
                "description": "The phase code"
              },
              "PhaseDescription": {
                "type": "string",
                "description": "The phase description"
              }
            }
          }
        }
      }
    },
    "currentStatusShipment": {
      "type": "object",
      "properties": {
        "MainBarcode": {
          "type": "string",
          "description": "The main barcode of the shipment"
        },
        "Barcode": {
          "type": "string",
          "description": "The barcode of the shipment"
        },
        "ShipmentAmount": {
          "type": "string",
          "description": "The amount of parcels in the multi-collo shipment"
        },
        "ShipmentCounter": {
          "type": "string",
          "description": "The sequence of this parcel in the multi-collo shipment"
        },
        "Customer": {
          "$ref": "#/$defs/shippingstatusCustomer"
        },
        "ProductCode": {
          "type": "string",
          "description": "The product code of the shipment"
        },
        "ProductDescription": {
          "type": "string",
          "description": "The description of the product code"
        },
        "Reference": {
          "type": "string",
          "description": "The customer reference belonging to the shipment"
        },
        "DeliveryDate": {
          "type": "string",
          "description": "The expected delivery date of the shipment"
        },
        "Dimension": {
          "$ref": "#/$defs/shippingstatusDimension"
        },
        "Address": {
          "type": "array",
          "description": "A list of addresses belonging to the shipment",
          "items": {
            "$ref": "#/$defs/shippingstatusAddress"
          }
        },
        "ProductOptions": {
          "type": "array",
          "description": "A list of product options.",
          "items": {
            "$ref": "#/$defs/shippingstatusProductOptions"
          }
        },
        "Status": {
          "type": "object",
          "description": "The current status of the shipment (see the [Status codes](https://developer.postnl.nl/docs/#/http/reference-data/t-t-status-codes/event-codes) for possible values.",
          "properties": {
            "TimeStamp": {
              "type": "string",
              "description": "The status timestamp"
            },
            "StatusCode": {
              "type": "string",
              "description": "The status code"
            },
            "StatusDescription": {
              "type": "string",
              "description": "The status description"
            },
            "PhaseCode": {
              "type": "string",
              "description": "The phase code"
            },
            "PhaseDescription": {
              "type": "string",
              "description": "The phase description"
            }
          }
        }
      }
    },
    "shippingstatusAddress": {
      "type": "object",
      "properties": {
        "FirstName": {
          "type": "string",
          "description": "The first name"
        },
        "LastName": {
          "type": "string",
          "description": "The last name"
        },
        "CompanyName": {
          "type": "string",
          "description": "The company name"
        },
        "DepartmentName": {
          "type": "string",
          "description": "The department name"
        },
        "CountryCode": {
          "type": "string",
          "description": "The ISO2 country code"
        },
        "Zipcode": {
          "type": "string",
          "description": "The zipcode"
        },
        "Region": {
          "type": "string",
          "description": "The region name"
        },
        "District": {
          "type": "string",
          "description": "The district name"
        },
        "City": {
          "type": "string",
          "description": "The city name"
        },
        "Street": {
          "type": "string",
          "description": "The street name"
        },
        "HouseNumber": {
          "type": "string",
          "description": "The house number"
        },
        "HouseNumberSuffix": {
          "type": "string",
          "description": "The house number suffix"
        },
        "Building": {
          "type": "string",
          "description": "The building name"
        },
        "Floor": {
          "type": "string",
          "description": "The floor of the building"
        },
        "Remark": {
          "type": "string",
          "description": "An additional remark"
        }
      }
    },
    "shippingstatusAmount": {
      "type": "object",
      "description": "The amounts belonging to the shipment",
      "properties": {
        "RemboursBedrag": {
          "type": "string",
          "description": "The cash-on-delivery (COD) amount"
        },
        "VerzekerdBedrag": {
          "type": "string",
          "description": "The insurance amount of the shipment"
        }
      }
    },
    "shippingstatusCustomer": {
      "type": "object",
      "properties": {
        "CustomerCode": {
          "type": "string",
          "description": "The customer code of the shipment"
        },
        "CustomerNumber": {
          "type": "string",
          "description": "The customer number of the shipment"
        },
        "Name": {
          "type": "string",
          "description": "The customer name"
        }
      }
    },
    "shippingstatusDimension": {
      "type": "object",
      "properties": {
        "Weight": {
          "type": "string",
          "description": "The weight of the shipment"
        },
        "Height": {
          "type": "string",
          "description": "The height of the shipment"
        },
        "Length": {
          "type": "string",
          "description": "The length of the shipment"
        },
        "Width": {
          "type": "string",
          "description": "The width of the shipment"
        },
        "Volume": {
          "type": "string",
          "description": "The volume of the shipment"
        }
      }
    },
    "shippingstatusProductOption": {
      "type": "object",
      "properties": {
        "OptionCode": {
          "type": "string",
          "description": "The product option code for this ProductOption."
        },
        "CharacteristicCode": {
          "type": "string",
          "description": "The characteristic of the ProductOption."
        }
      }
    },
    "shippingstatusProductOptions": {
      "type": "object",
      "properties": {
        "ProductOption": {
          "$ref": "#/$defs/shippingstatusProductOption"
        }
      }
    },
    "shippingstatusWarning": {
      "type": "object",
      "properties": {
        "Message": {
          "type": "string",
          "description": "Warning message"
        },
        "Code": {
          "type": "string",
          "description": "Warning code"
        }
      }
    }
  }
}