{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/usps/json-schema/usps-package-campaign-schema.json",
  "title": "PackageCampaign",
  "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/PackageCampaign",
  "required": [
    "MID",
    "submitterName",
    "mailOwnerCRID",
    "mailOwnerName",
    "campaignCode",
    "campaignGroupingCode",
    "campaignTitle",
    "brandDisplayName",
    "startDate",
    "endDate",
    "targetUrl",
    "rideAlong"
  ],
  "type": "object",
  "properties": {
    "campaignID": {
      "type": "string",
      "description": "Unique identifier for the campaign.",
      "readOnly": true
    },
    "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).",
      "readOnly": true
    },
    "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"
    },
    "targetUrl": {
      "type": "string",
      "description": "The URL that users are redirected to when clicking on the Ridealong image or Learn More link for a campaign. This field is required."
    },
    "rideAlong": {
      "type": "string",
      "description": "The image that is displayed for packages matched with a package campaign. When clicked, this image will take users to the Target URL of the campaign. This field is required.",
      "format": "byte"
    },
    "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.",
      "readOnly": true
    },
    "barcodeCount": {
      "type": "number",
      "description": "Number of packages associated with the campaign.",
      "readOnly": true
    },
    "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.",
      "readOnly": true
    },
    "createdDatetime": {
      "type": "string",
      "description": "Timestamp of initial campaign creation. This timestamp will be returned in UTC.",
      "readOnly": true,
      "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.",
      "readOnly": true
    },
    "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. ",
      "readOnly": true
    },
    "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.",
      "readOnly": true
    },
    "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.",
      "readOnly": true
    },
    "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.",
      "readOnly": true
    },
    "status": {
      "type": "string",
      "description": "Status of campaign - possible values include Submitted, Active, Complete, Inactive, Cancelled, and Deleted",
      "readOnly": true
    },
    "submittedDatetime": {
      "type": "string",
      "description": "Timestamp of initial campaign submission. This timestamp will be returned in UTC.",
      "readOnly": true,
      "format": "date-time"
    }
  },
  "additionalProperties": false
}