{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/purolator/main/json-schema/purolator-get-summary-manifest-response-schema.json",
  "title": "GetSummaryManifestResponse",
  "x-generated": "2026-10-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/purolator-get-summary-manifest-openapi.yml#/components/schemas/GetSummaryManifestResponse",
  "type": "object",
  "required": [
    "requestReference",
    "language"
  ],
  "properties": {
    "requestReference": {
      "$ref": "#/$defs/RequestReference"
    },
    "language": {
      "type": "string"
    },
    "lineOfBusiness": {
      "$ref": "#/$defs/LineOfBusiness"
    },
    "manifestBatch": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ManifestBatch"
      }
    },
    "errors": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ErrorItem"
      }
    }
  },
  "$defs": {
    "Error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "description": "Error code"
        },
        "description": {
          "type": "string",
          "description": "Detailed error description in the requested language."
        }
      }
    },
    "ErrorItem": {
      "type": "object",
      "required": [
        "error"
      ],
      "properties": {
        "error": {
          "$ref": "#/$defs/Error"
        }
      }
    },
    "LineOfBusiness": {
      "type": "string",
      "enum": [
        "Courier",
        "Freight"
      ],
      "description": "Line of business. Case-insensitive. Only Courier is supported."
    },
    "ManifestBatch": {
      "type": "object",
      "properties": {
        "shipmentManifestDateTime": {
          "type": "string",
          "description": "12-hour clock datetime."
        },
        "manifestCloseDateTime": {
          "type": "string"
        },
        "manifestBatchDetail": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ManifestBatchDetail"
          }
        }
      }
    },
    "ManifestBatchDetail": {
      "type": "object",
      "properties": {
        "documentType": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "documentStatus": {
          "type": "string"
        }
      }
    },
    "RequestReference": {
      "type": "string",
      "maxLength": 36,
      "description": "A unique identifier for the request. Can be used to match request with the response. If not provided, a random UUID is generated."
    }
  }
}