{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/salesforce-commerce-cloud/json-schema/salesforce-commerce-cloud-campaign-schema.json",
  "title": "Campaign",
  "description": "Document representing a campaign.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/salesforce-commerce-cloud-campaigns-api-openapi.yml#/components/schemas/Campaign",
  "additionalProperties": {
    "title": "Additional Property Support",
    "description": "This type supports additional properties passed along with the defined properties of this API.\nTo indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`.\nThe type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix."
  },
  "properties": {
    "campaignId": {
      "$ref": "#/$defs/CampaignId"
    },
    "coupons": {
      "description": "The array of assigned coupon IDs, not sorted.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/CouponId"
      }
    },
    "creationDate": {
      "description": "Returns the value of attribute 'creationDate'.",
      "type": "string",
      "format": "date-time"
    },
    "customerGroups": {
      "description": "The array of assigned customer groups, not sorted.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/CustomerGroupId"
      }
    },
    "description": {
      "maxLength": 4000,
      "description": "The description of the campaign.",
      "type": "string"
    },
    "enabled": {
      "description": "The enabled flag for campaign.",
      "type": "boolean"
    },
    "endDate": {
      "description": "The date the scenario ends.",
      "type": "string",
      "format": "date-time"
    },
    "lastModified": {
      "description": "Returns the value of attribute 'lastModified'.",
      "type": "string",
      "format": "date-time"
    },
    "sourceCodeGroups": {
      "description": "The array of assigned source code groups, not sorted.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/SourceCodeGroupId"
      }
    },
    "startDate": {
      "description": "The date the scenario begins.",
      "type": "string",
      "format": "date-time"
    }
  },
  "type": "object",
  "$defs": {
    "CampaignId": {
      "minLength": 1,
      "maxLength": 256,
      "description": "The ID of the campaign.",
      "type": "string"
    },
    "CouponId": {
      "minLength": 1,
      "maxLength": 256,
      "description": "The ID of the coupon.",
      "type": "string"
    },
    "CustomerGroupId": {
      "minLength": 1,
      "maxLength": 256,
      "description": "The ID of the customer group.",
      "type": "string"
    },
    "SourceCodeGroupId": {
      "minLength": 1,
      "maxLength": 28,
      "description": "The ID of source code group.",
      "type": "string"
    }
  }
}