{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/vepathos-com/json-schema/vepathos-com-delivery-response-schema.json",
  "title": "DeliveryResponse",
  "x-generated": "2026-11-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/vepathos-com-openapi.json#/components/schemas/DeliveryResponse",
  "properties": {
    "destination": {
      "type": "string",
      "title": "Destination",
      "description": "Stop location. Coordinates in ISO 6709 decimal degrees, latitude then longitude with signs, e.g. `+40.7128-74.0060`."
    },
    "method": {
      "anyOf": [
        {
          "$ref": "#/$defs/DeliveryMethod"
        },
        {
          "type": "null"
        }
      ]
    },
    "schedules": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Schedules",
      "description": "Time windows. RFC 5545 VEVENT: `DTSTART` plus `DTEND` or `DURATION`, optionally `RRULE`. Join lines with `\\n`."
    },
    "width": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Width",
      "description": "Package width, in `length_unit`. Integer."
    },
    "height": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Height",
      "description": "Package height, in `length_unit`. Integer."
    },
    "depth": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Depth",
      "description": "Package depth, in `length_unit`. Integer."
    },
    "length_unit": {
      "anyOf": [
        {
          "$ref": "#/$defs/LengthUnit"
        },
        {
          "type": "null"
        }
      ]
    },
    "volume": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Volume",
      "description": "Package volume, in `volume_unit`. Integer."
    },
    "volume_unit": {
      "anyOf": [
        {
          "$ref": "#/$defs/VolumeUnit"
        },
        {
          "type": "null"
        }
      ]
    },
    "weight": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Weight",
      "description": "Package weight, in `weight_unit`. Integer; use `GRAMS` for fractional kilograms."
    },
    "weight_unit": {
      "anyOf": [
        {
          "$ref": "#/$defs/WeightUnit"
        },
        {
          "type": "null"
        }
      ]
    },
    "packaging": {
      "anyOf": [
        {
          "$ref": "#/$defs/PackagingType"
        },
        {
          "type": "null"
        }
      ]
    },
    "handling": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/SpecialHandling"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Handling"
    },
    "value_cents": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Value Cents",
      "description": "Declared value in minor units (`5000` is 50.00)."
    },
    "value_currency": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Value Currency",
      "description": "ISO 4217 currency code."
    },
    "extra": {
      "anyOf": [
        {},
        {
          "type": "null"
        }
      ],
      "title": "Extra",
      "description": "Your own metadata, returned as sent. The planner reads `lat`, `lng`, `packages` and `zone` if present."
    },
    "id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "integer"
        }
      ],
      "title": "Id"
    },
    "milestone": {
      "anyOf": [
        {
          "$ref": "#/$defs/MilestoneResponse"
        },
        {
          "type": "null"
        }
      ]
    },
    "arrival_time": {
      "description": "Estimated arrival in minutes after midnight, including the route start from `config.schedule.start_at`. Present on deliveries inside plan routes.",
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "type": "object",
  "required": [
    "destination",
    "id",
    "milestone"
  ],
  "$defs": {
    "DeliveryMethod": {
      "type": "string",
      "enum": [
        "DELIVERY",
        "PICKUP",
        "SIGNATURE"
      ],
      "title": "DeliveryMethod"
    },
    "LengthUnit": {
      "type": "string",
      "enum": [
        "CENTIMETER",
        "METER",
        "KILOMETER",
        "INCH",
        "FEET",
        "MILE"
      ],
      "title": "LengthUnit"
    },
    "MilestoneCategory": {
      "type": "string",
      "enum": [
        "DEPOT",
        "DISTRIBUTION_CENTER",
        "LOADING_POINT",
        "WAREHOUSE",
        "TRANSFER_POINT"
      ],
      "title": "MilestoneCategory"
    },
    "MilestoneResponse": {
      "properties": {
        "name": {
          "type": "string",
          "title": "Name",
          "description": "Display name."
        },
        "location": {
          "type": "string",
          "title": "Location",
          "description": "Coordinates in ISO 6709 decimal degrees, latitude then longitude with signs, e.g. `+40.7128-74.0060`."
        },
        "category": {
          "anyOf": [
            {
              "$ref": "#/$defs/MilestoneCategory"
            },
            {
              "type": "null"
            }
          ],
          "description": "Kind of location."
        },
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "integer"
            }
          ],
          "title": "Id"
        }
      },
      "type": "object",
      "required": [
        "name",
        "location",
        "id"
      ],
      "title": "MilestoneResponse"
    },
    "PackagingType": {
      "type": "string",
      "enum": [
        "BOX",
        "ENVELOPE",
        "BAG",
        "CARTON",
        "PALLET",
        "SHRINK_WRAP"
      ],
      "title": "PackagingType"
    },
    "SpecialHandling": {
      "type": "string",
      "enum": [
        "FRAGILE",
        "PERISHABLE",
        "HAZARDOUS",
        "REFRIGERATED"
      ],
      "title": "SpecialHandling"
    },
    "VolumeUnit": {
      "type": "string",
      "enum": [
        "CUBIC_CENTIMETER",
        "CUBIC_METER",
        "LITER",
        "CUBIC_INCH",
        "CUBIC_FEET",
        "GALLON"
      ],
      "title": "VolumeUnit"
    },
    "WeightUnit": {
      "type": "string",
      "enum": [
        "GRAMS",
        "KILOGRAMS",
        "OUNCES",
        "POUNDS"
      ],
      "title": "WeightUnit"
    }
  }
}