{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/usps/json-schema/usps-close-odcontainer-request-schema.json",
  "title": "CloseODContainerRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/usps-pmod-openapi.yml#/components/schemas/CloseODContainerRequest",
  "type": "object",
  "properties": {
    "mailingDate": {
      "description": "The mailing date for when the container will be shipped, when included in the request all packages nested to the container will be updated to align with the associated mailingDate. The mailing date may be today plus 0 to 7 days in advance.",
      "allOf": [
        {
          "$ref": "#/$defs/MailingDateOptions"
        }
      ]
    },
    "generateScanForm": {
      "type": "boolean",
      "description": "Designates whether a scan form will be returned in the response",
      "default": false
    },
    "scanFormImageType": {
      "type": "string",
      "description": "The type of scan form image requested.  \nIf omitted then the default image type is `PDF`.\n- PDF\n- TIFF\n- JPG\n- PNG\n- GIF\n- SVG\n- NONE\n"
    }
  },
  "$defs": {
    "MailingDate": {
      "type": "string",
      "description": "The date package will be mailed. The mailing date may be today plus 0 to 7 days in advance. Enter the date in the full-date notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6).",
      "format": "date"
    },
    "MailingDateOptions": {
      "type": "string",
      "description": "The mailing date for when the container will be shipped.\nThe mailing date may be today plus 0 to 7 days in advance.",
      "oneOf": [
        {
          "$ref": "#/$defs/MailingDate"
        },
        {
          "$ref": "#/$defs/MailingDateTime"
        }
      ]
    },
    "MailingDateTime": {
      "type": "string",
      "description": "The date and time a package will be mailed. The mailing date may be today plus 0 to 7 days in advance. Enter the date in the date-time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6).",
      "format": "date-time"
    }
  }
}