{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/purolator/main/json-schema/purolator-void-shipment-response-schema.json",
  "title": "VoidShipmentResponse",
  "x-generated": "2026-10-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/purolator-create-void-shipment-openapi.yml#/components/schemas/VoidShipmentResponse",
  "type": "object",
  "required": [
    "requestReference",
    "shipmentVoided"
  ],
  "properties": {
    "requestReference": {
      "$ref": "#/$defs/RequestReference"
    },
    "shipmentVoided": {
      "type": "string",
      "enum": [
        "true",
        "false"
      ]
    },
    "bannerMessage": {
      "type": "string",
      "description": "Present on successful void."
    },
    "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"
        }
      }
    },
    "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."
    }
  }
}