{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/usps/json-schema/usps-campaign-edit-schema.json",
  "title": "CampaignEdit",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/usps-informed-delivery-mail-campaigns-openapi.yml#/components/schemas/CampaignEdit",
  "type": "object",
  "properties": {
    "campaignType": {
      "type": "string",
      "description": "Identifier on what types of mail pieces the campaign should be applied to\n * LETTER\n * CARD\n * FLAT\n * PACKAGE          "
    },
    "mailpieceShape": {
      "type": "string",
      "description": "Identifier on what types of mail pieces the campaign should be applied to\n * LT (Letter)\n * CD (Card)\n * FL (Flat)"
    },
    "MID": {
      "type": "string",
      "description": "The Mailer ID for the campaign - this field will be used to match IMBs to MID and SEQ type campaigns. If an IMB has the Mailer ID (MID) associated with an active MID/SEQ campaign, it is eligible to be displayed with the campaign's image and Target URL."
    },
    "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."
    },
    "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"
    },
    "startSerial": {
      "type": "string",
      "description": "The lower limit of the serial range for SEQ type campaigns. This field is required for SEQ campaigns only and is not allowed for submission for any other campaign types."
    },
    "endSerial": {
      "type": "string",
      "description": "The upper limit of the serial range for SEQ type campaigns. This field is required for SEQ campaigns only and is not allowed for submission for any other campaign types."
    },
    "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 below the replacement or mailpiece image for mailpieces matched with a mail campaign. When clicked, this image will take users to the Target URL of the campaign. This field is required."
    },
    "replacementImage": {
      "type": "string",
      "description": "The image that is displayed instead of the mailpiece image for mailpieces matched with a mail campaign. This field is required if the Campaign Shape Type is 'FL', otherwise this field is optional."
    },
    "isShareable": {
      "type": "boolean",
      "description": "An indicator dictating whether a campaign is eligible for Social Sharing. By default, mail campaigns will be displayed alongside options to share the campaign to various social media platforms. If a mailer opts out of this feature, then these options will not be displayed with the campaign."
    },
    "hasUrlParams": {
      "type": "boolean",
      "description": "An indicator dictating whether a campaign is eligible for MID and Serial Number parameters to be appended to the end of the Target URL for tracking purposes. By default, the MID and Serial Number parameters for a given mailpiece will be added to end of the Target URL that users are taken to upon clicking on a campaign. If a mailer opts out of this feature, then these MID and Serial Number fields will not be appended to the campaign's Target URL."
    }
  }
}