{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/eloqua/json-schema/eloqua-query-result-campaign-rest20-schema.json",
  "title": "QueryResultCampaign",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/eloqua-application-2-0-campaigns-api-openapi.yml#/components/schemas/QueryResultCampaignRest20",
  "properties": {
    "type": {
      "type": "string",
      "description": "The asset's type in Eloqua."
    },
    "elements": {
      "type": "array",
      "description": "Array of campaign fields.",
      "items": {
        "$ref": "#/$defs/CampaignRest20"
      }
    },
    "total": {
      "type": "integer",
      "description": "The total amount of results."
    },
    "pageSize": {
      "type": "integer",
      "description": "The page size."
    },
    "page": {
      "type": "integer",
      "description": "The specified page."
    }
  },
  "$defs": {
    "CampaignElementRest20": {
      "title": "CampaignElement",
      "properties": {
        "type": {
          "type": "string",
          "description": "The asset's type in Eloqua. This is a read-only property."
        },
        "id": {
          "type": "string",
          "readOnly": true,
          "description": "Id of the campaign element. This is a read-only property."
        },
        "currentStatus": {
          "type": "string",
          "description": "The campaign element's current status."
        },
        "name": {
          "type": "string",
          "description": "Name of the campaign element. This is a read-only property."
        },
        "description": {
          "type": "string",
          "description": "The description of the campaign element."
        },
        "permissions": {
          "type": "array",
          "description": "The permissions for the campaign element granted to your current instance. This is a read-only property.",
          "items": {
            "type": "string"
          }
        },
        "folderId": {
          "type": "string",
          "readOnly": true,
          "description": "Id of the associated folder."
        },
        "sourceTemplateId": {
          "type": "string",
          "description": "The id of the source template."
        },
        "createdBy": {
          "type": "string",
          "readOnly": true,
          "description": "The login id of the user who created the campaign element."
        },
        "createdByName": {
          "type": "string",
          "description": "The name of the user who created the campaign element."
        },
        "createdAt": {
          "type": "string",
          "readOnly": true,
          "description": "The date and time the campaign element was created, expressed in Unix time. "
        },
        "updatedBy": {
          "type": "string",
          "readOnly": true,
          "description": "The login id of the user that last updated the campaign element."
        },
        "updatedByName": {
          "type": "string",
          "description": "The name of the user who last updated the campaign element."
        },
        "updatedAt": {
          "type": "string",
          "readOnly": true,
          "description": "Unix timestamp for the date and time the campaign element was last updated."
        },
        "scheduledFor": {
          "type": "string",
          "readOnly": true,
          "description": "The date the campaign element is scheduled."
        },
        "depth": {
          "type": "string",
          "readOnly": true,
          "description": "Level of detail returned by the request. Eloqua APIs can retrieve entities at three different levels of depth: <code>minimal</code>, <code>partial</code>, and <code>complete</code>. Any other values passed are reset to <code>complete</code> by default. For more information, see <a href='https://docs.oracle.com/cloud/latest/marketingcs_gs/OMCAB/index.html#CSHID=RequestDepth'>Request depth</a>."
        },
        "position": {
          "$ref": "#/$defs/PositionRest20",
          "description": "Array of campaign element position fields."
        },
        "outputTerminals": {
          "type": "array",
          "description": "A list of the campaign element ids within the campaign. This is a read-only property.",
          "items": {
            "$ref": "#/$defs/CampaignOutputTerminalRest20"
          }
        },
        "memberCount": {
          "type": "string",
          "description": "Amount of members within the campaign element. This is a read-only property."
        },
        "memberErrorCount": {
          "type": "string",
          "description": "Amount of members within the campaign element in errored status. This is a read-only property."
        }
      }
    },
    "CampaignOutputTerminalRest20": {
      "title": "CampaignOutputTerminal",
      "properties": {
        "type": {
          "type": "string",
          "description": "The asset's type in Eloqua. This is a read-only property. "
        },
        "id": {
          "type": "string",
          "readOnly": true,
          "description": "Id of the campaign output terminal. This is a read-only property."
        },
        "currentStatus": {
          "type": "string",
          "description": "The campaign output terminal's current status."
        },
        "name": {
          "type": "string",
          "description": "Name of the campaign output terminal."
        },
        "description": {
          "type": "string",
          "description": "The description of the campaign output terminal."
        },
        "permissions": {
          "type": "array",
          "description": "The permissions for the campaign output terminal granted to your current instance.",
          "items": {
            "type": "string"
          }
        },
        "folderId": {
          "type": "string",
          "readOnly": true,
          "description": "Id of the associated folder."
        },
        "sourceTemplateId": {
          "type": "string",
          "description": "The id of the source template."
        },
        "createdBy": {
          "type": "string",
          "readOnly": true,
          "description": "The login id of the user who created the campaign output terminal."
        },
        "createdByName": {
          "type": "string",
          "description": "The name of the user who created the campaign output terminal."
        },
        "createdAt": {
          "type": "string",
          "readOnly": true,
          "description": "The date and time the campaign output terminal was created, expressed in Unix time."
        },
        "updatedBy": {
          "type": "string",
          "readOnly": true,
          "description": "The login id of the user that last updated the campaign output terminal."
        },
        "updatedByName": {
          "type": "string",
          "description": "The name of the user who last updated the campaign output terminal."
        },
        "updatedAt": {
          "type": "string",
          "readOnly": true,
          "description": "Unix timestamp for the date and time the campaign output terminal was last updated. This is a read-only property."
        },
        "scheduledFor": {
          "type": "string",
          "readOnly": true,
          "description": "The date the campaign output terminal is scheduled."
        },
        "depth": {
          "type": "string",
          "readOnly": true,
          "description": "Level of detail returned by the request. Eloqua APIs can retrieve entities at three different levels of depth: <code>minimal</code>, <code>partial</code>, and <code>complete</code>. For more information, see <a href='https://docs.oracle.com/cloud/latest/marketingcs_gs/OMCAB/index.html#CSHID=RequestDepth'>Request depth</a>."
        },
        "terminalType": {
          "type": "string",
          "description": "The campaign output terminal type. This is a read-only property."
        },
        "connectedType": {
          "type": "string",
          "description": "The campaign output terminal's connection type. This is a read-only property."
        },
        "connectedId": {
          "type": "string",
          "description": "The connected id of the campaign output terminal. This is a read-only property."
        }
      }
    },
    "CampaignRest20": {
      "title": "Campaign",
      "properties": {
        "type": {
          "type": "string",
          "description": "The asset's type in Eloqua. This is a read-only property. "
        },
        "id": {
          "type": "string",
          "readOnly": true,
          "description": "Id of the campaign."
        },
        "currentStatus": {
          "type": "string",
          "description": "The campaign's current status: <code>Active</code>, <code>Draft</code>, <code>Scheduled</code>, or <code>Completed</code>."
        },
        "name": {
          "type": "string",
          "description": "The name of the campaign."
        },
        "description": {
          "type": "string",
          "description": "The description of the campaign."
        },
        "permissions": {
          "type": "array",
          "description": "The permissions for the campaign granted to your current instance. This is a read-only property.",
          "items": {
            "type": "string"
          }
        },
        "folderId": {
          "type": "string",
          "readOnly": true,
          "description": "The folder id of the folder which contains the campaign."
        },
        "sourceTemplateId": {
          "type": "string",
          "description": "Id of the template used to create the asset."
        },
        "createdBy": {
          "type": "string",
          "readOnly": true,
          "description": "The login id of the user who created the campaign."
        },
        "createdByName": {
          "type": "string",
          "description": "The name of the user who created the campaign."
        },
        "createdAt": {
          "type": "string",
          "readOnly": true,
          "description": "The date and time the campaign was created, expressed in Unix time."
        },
        "updatedBy": {
          "type": "string",
          "readOnly": true,
          "description": "The login id of the user that last updated the campaign."
        },
        "updatedByName": {
          "type": "string",
          "description": "The name of the user who last updated the campaign."
        },
        "updatedAt": {
          "type": "string",
          "readOnly": true,
          "description": "Unix timestamp for the date and time the campaign was last updated. This is a read-only property."
        },
        "scheduledFor": {
          "type": "string",
          "readOnly": true,
          "description": "The date the campaign is scheduled."
        },
        "depth": {
          "type": "string",
          "readOnly": true,
          "description": "Level of detail returned by the request. Eloqua APIs can retrieve entities at three different levels of depth: <code>minimal</code>, <code>partial</code>, and <code>complete</code>. For more information, see <a href='https://docs.oracle.com/cloud/latest/marketingcs_gs/OMCAB/index.html#CSHID=RequestDepth'>Request depth</a>. "
        },
        "elements": {
          "type": "array",
          "description": "A list of campaign elements.",
          "items": {
            "$ref": "#/$defs/CampaignElementRest20"
          }
        },
        "isReadOnly": {
          "type": "string",
          "description": "Whether or not the campaign is read only."
        },
        "runAsUserId": {
          "type": "string",
          "description": "The login id of the user to activate the campaign."
        },
        "isExitHistoryDisabled": {
          "type": "string",
          "description": "Campaign_Field_IsExitHistoryDisabled_Description"
        },
        "isBypassHistoryDisabled": {
          "type": "string",
          "description": "Campaign_Field_IsBypassHistoryDisabled_Description"
        },
        "startAt": {
          "type": "string",
          "description": "The date time for which the campaign will activate, expressed in Unix time."
        },
        "endAt": {
          "type": "string",
          "description": "The date and time the campaign will end."
        },
        "budgetedCost": {
          "type": "string",
          "description": "The campaign's projected cost."
        },
        "actualCost": {
          "type": "string",
          "description": "The campaign's actual cost."
        },
        "isMemberAllowedReEntry": {
          "type": "string",
          "description": "Whether or not members are allowed to re-enter the campaign."
        },
        "fieldValues": {
          "type": "array",
          "description": "Array containing <code>type</code> and <code>id</code> values for all of the contactFields associated with a given contact. For campaigns, \"fieldValues\" include all custom campaign fields (type, id, value).",
          "items": {
            "$ref": "#/$defs/FieldValueRest20"
          }
        },
        "campaignType": {
          "type": "string",
          "description": "The campaign's type."
        },
        "product": {
          "type": "string",
          "description": "The campaign's product value."
        },
        "region": {
          "type": "string",
          "description": "The campaign's region value."
        },
        "clrEndDate": {
          "type": "string",
          "description": "The end date of the clr."
        },
        "adCampaignId": {
          "type": "string",
          "description": "Campaign_Field_AdCampaignId_Description"
        },
        "campaignClassification": {
          "type": "string",
          "description": "Campaign_Field_CampaignClassification_Description"
        },
        "referenceProduct": {
          "type": "string",
          "description": "Campaign_Field_ReferenceProduct_Description"
        },
        "crmId": {
          "type": "string",
          "description": "The id of the customer relationship management application. When sending update requests, if <code>crmId</code> is not included in the request and a <code>crmId</code> value exists, it will be blanked."
        },
        "crmIds": {
          "type": "array",
          "description": "Campaign_Field_crmIds_Description",
          "items": {
            "$ref": "#/$defs/ExternalCampaignMappingRest20"
          }
        },
        "isSyncedWithCRM": {
          "type": "string",
          "description": "Whether or not the campaign is synced with a customer relationship management application."
        },
        "isIncludedInROI": {
          "type": "string",
          "description": "Whether or not the campaign is included in return on investment."
        },
        "badgeId": {
          "type": "string",
          "description": "The badge id of the campaign."
        },
        "isEmailMarketingCampaign": {
          "type": "string",
          "description": "Whether or not the campaign is an email marketing campaign."
        },
        "campaignCategory": {
          "type": "string",
          "description": "Defines whether a Campaign is simple or multi-step. The value <code>emailMarketing</code> should be used for simple campaigns, and <code>contact</code> for multi-step campaigns."
        },
        "firstActivation": {
          "type": "string",
          "readOnly": true,
          "description": "The date and time the campaign was originally activated."
        },
        "memberCount": {
          "type": "string",
          "readOnly": true,
          "description": "The amount of members that entered the campaign in the last 90 days. This property is only returned when <code>depth</code> is set to <code>partial</code> or <code>complete</code>. This is a read-only property."
        },
        "isUpdatingCrmId": {
          "type": "string",
          "description": "Campaign_Field_IsUpdatingCrmId_Description"
        }
      }
    },
    "ExternalCampaignMappingRest20": {
      "title": "ExternalCampaignMapping",
      "properties": {
        "type": {
          "type": "string"
        },
        "externalSystemId": {
          "type": "integer"
        },
        "value": {
          "type": "string"
        }
      }
    },
    "FieldValueRest20": {
      "title": "FieldValue",
      "properties": {
        "type": {
          "type": "string",
          "description": "The asset's type in Eloqua. This is a read-only property."
        },
        "value": {
          "type": "string",
          "description": "The value to set the corresponding field id to. Date values must be submitted as a unix timestamp."
        },
        "id": {
          "type": "string",
          "readOnly": true,
          "description": "The id of the field to be set to the corresponding value."
        },
        "name": {
          "type": "string",
          "description": "Name of the field value."
        }
      }
    },
    "PositionRest20": {
      "title": "Position",
      "properties": {
        "type": {
          "type": "string",
          "description": "The campaign element's type. This is a read-only property."
        },
        "x": {
          "type": "string",
          "description": "The position of the campaign element on the x axis."
        },
        "y": {
          "type": "string",
          "description": "The position of the campaign element on the y axis."
        }
      }
    }
  }
}