{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/usps/json-schema/usps-campaign-details-response-schema.json",
  "title": "CampaignDetailsResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/usps-informed-delivery-package-campaigns-openapi.yml#/components/schemas/CampaignDetailsResponse",
  "type": "object",
  "properties": {
    "campaigns": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "campaignID": {
            "type": "string",
            "description": "Unique identifier for the campaign."
          },
          "MID": {
            "type": "string",
            "description": "The Mailer ID associated with the campaign."
          },
          "submitterName": {
            "type": "string",
            "description": "The campaign submitter's Name."
          },
          "submitterCRID": {
            "type": "string",
            "description": "The campaign submitter's Customer Registration ID (CRID)."
          },
          "mailOwnerCRID": {
            "type": "string",
            "description": "Customer Registration ID (CRID) of the Mail Owner associated with the Informed Delivery campaign."
          },
          "mailOwnerName": {
            "type": "string",
            "description": "Name of the Mail Owner associated with the Informed Delivery campaign."
          },
          "campaignCode": {
            "type": "string",
            "description": "User defined field that describes the campaign being created. This field is put into the campaign reports created for the campaign."
          },
          "campaignGroupingCode": {
            "type": "string",
            "description": "User defined field that describes the campaign being created. This field is put into the campaign reports created for the campaign."
          },
          "campaignTitle": {
            "type": "string",
            "description": "User defined field that describes the campaign being created. This field is put into the campaign reports created for the campaign."
          },
          "brandDisplayName": {
            "type": "string",
            "description": "User defined field that is placed on Informed Delivery's UIs when campaign is displayed."
          },
          "startDate": {
            "type": "string",
            "description": "First day campaign will be displayed",
            "format": "date"
          },
          "endDate": {
            "type": "string",
            "description": "Last day campaign will be displayed",
            "format": "date"
          },
          "addBarcode": {
            "type": "boolean",
            "description": "Boolean that gives information on whether a campaign is eligible for packages added to it. This flag will be true only if the campaign has an End Date in the future."
          },
          "barcodeCount": {
            "type": "number",
            "description": "Number of packages associated with the campaign."
          },
          "cancel": {
            "type": "boolean",
            "description": "Boolean that gives information on whether a campaign is eligible for cancellation. This flag will be true only if the campaign is in an Active status."
          },
          "createdDatetime": {
            "type": "string",
            "description": "Timestamp of initial campaign creation. This timestamp will be returned in UTC.",
            "format": "date-time"
          },
          "delete": {
            "type": "boolean",
            "description": "Boolean that gives information on whether a campaign is eligible for deletion. This flag will be true only if the campaign is in a Submitted or Inactive status."
          },
          "fullEdit": {
            "type": "boolean",
            "description": "Boolean that gives information on whether a campaign is eligible for edit inclusive of the campaign's MID. This flag will be true only if the campaign is in a Submitted and does not have associated packages. "
          },
          "lastModifiedDatetime": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of last update made to campaign, inclusive of status changes that occur when a campaign activates or completes. This timestamp will be returned in UTC."
          },
          "limitedEdit": {
            "type": "boolean",
            "description": "Boolean that gives information on whether a campaign is eligible for edit, not inclusive of the campaign's MID. This flag will be true only if the campaign is in a Submitted status and already has associated packages."
          },
          "noEdit": {
            "type": "boolean",
            "description": "Boolean that gives information on whether a campaign is not eligible for edit. This flag will be true if the campaign has an Active, Complete, Cancelled, or Deleted status."
          },
          "status": {
            "type": "string",
            "description": "Status of campaign - possible values include Submitted, Active, Complete, Inactive, Cancelled, and Deleted"
          },
          "submittedDatetime": {
            "type": "string",
            "description": "Timestamp of initial campaign submission. This timestamp will be returned in UTC.",
            "format": "date-time"
          }
        }
      }
    },
    "metadata": {
      "type": "object",
      "properties": {
        "totalCount": {
          "type": "integer",
          "description": "The total number of items."
        },
        "page": {
          "type": "integer",
          "description": "The current page number."
        },
        "totalPages": {
          "type": "integer",
          "description": "The total number of pages."
        },
        "limit": {
          "type": "integer",
          "description": "The number of items per page."
        },
        "offset": {
          "type": "integer",
          "description": "The offset of the current page."
        }
      }
    }
  }
}