{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://objectsgrid.com/.well-known/objects-catalog/ParcelDelivery/v1/schema.json",
  "title": "ParcelDelivery",
  "description": "Objects Grid ParcelDelivery. A parcel sent for an Order, stored inside the Order's orderDelivery. Modeled in compliance with https://schema.org/ParcelDelivery.",
  "type": "object",
  "properties": {
    "at_type": {
      "description": "The object type",
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "ParcelDelivery"
      ]
    },
    "identifier": {
      "description": "The parcel's identifier, unique within the Order",
      "type": [
        "string",
        "null"
      ],
      "maxLength": 50
    },
    "trackingNumber": {
      "description": "The shipper's tracking number",
      "type": [
        "string",
        "null"
      ]
    },
    "trackingUrl": {
      "description": "The shipper's tracking page for the parcel",
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "hasDeliveryMethod": {
      "description": "The method used for delivery or shipping",
      "anyOf": [
        {
          "$ref": "https://objectsgrid.com/.well-known/objects-catalog/DeliveryMethod/v1/schema.json"
        },
        {
          "type": "null"
        }
      ]
    },
    "expectedArrivalFrom": {
      "description": "The earliest date the parcel may arrive",
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "expectedArrivalUntil": {
      "description": "The latest date the parcel is expected to arrive",
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "deliveryAddress": {
      "description": "The address the parcel goes to",
      "anyOf": [
        {
          "$ref": "https://objectsgrid.com/.well-known/objects-catalog/PostalAddress/v1/schema.json"
        },
        {
          "type": "null"
        }
      ]
    },
    "originAddress": {
      "description": "The address the parcel is sent from",
      "anyOf": [
        {
          "$ref": "https://objectsgrid.com/.well-known/objects-catalog/PostalAddress/v1/schema.json"
        },
        {
          "type": "null"
        }
      ]
    },
    "itemShipped": {
      "description": "The Order's lines in the parcel, by their orderItemNumber",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 50
      }
    },
    "provider": {
      "x-objectsgrid-erasure": "keep",
      "description": "The carrier delivering the parcel",
      "x-objectsgrid-rangeIncludes": [
        "Organization"
      ],
      "anyOf": [
        {
          "$ref": "https://objectsgrid.com/.well-known/objects-catalog/Reference/v1/schema.json"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "unevaluatedProperties": false
}
