Skip to main content
Version: 6.1.0

SysReadCampaign

Reads a campaign by campaign code and returns the full campaign configuration. Optionally includes the full configuration of every scenario in the campaign.

ServiceOperation
campaignSYS_READ_CAMPAIGN

Method Parameters​

ParameterDescription
campaignCodeThe campaign code to read.
includeScenarioDetailsIf true, the response includes a scenarioDetails array with the full configuration of every scenario in the campaign, including the control scenario. Defaults to false.

Usage​

http://localhost:3000
// Cloud Code only. To view example, switch to the Cloud Code tab
JSON Response
{
"data": {
"campaignCode": "SUMMER2026",
"name": "Summer 2026",
"purpose": "Evaluating impact of themes and summer sale on spenders",
"category": null,
"enabled": false,
"startAt": 1811808000000,
"endAt": 1814227200000,
"trigger": "LOGIN",
"target": {
"type": "SEGMENT",
"segmentCode": "spenders"
},
"scenarios": [
{
"scenarioCode": "_",
"weight": 100
}
],
"campaignJson": {
"customFieldA": "summer",
"customFieldB": 1,
"customFieldC": true
},
"abGoalType": "revenue",
"abConfidence": null,
"notes": null,
"version": 1,
"createdAt": 1811721600000,
"updatedAt": 1811721600000,
"scenarioDetails": [
{
"campaignCode": "SUMMER2026",
"scenarioCode": "_",
"scenarioCampaignCode": "SUMMER2026:_",
"description": "Control — no changes",
"overrides": {
"globalProperties": {},
"cashProducts": {},
"items": {}
},
"scenarioJson": null,
"version": 1,
"createdAt": 1811721600000,
"updatedAt": 1811721600000
},
{
"campaignCode": "SUMMER2026",
"scenarioCode": "A",
"scenarioCampaignCode": "SUMMER2026:A",
"description": "Beach",
"overrides": {
"globalProperties": {
"xpMultiplier": {
"name": "xpMultiplier",
"value": "2"
},
"ThemeJson": {
"name": "ThemeJson",
"value": "{\"season\":\"Summer\",\"extra\":\"Beach\"}"
}
},
"cashProducts": {
"coinBundle10": {
"itemId": "coinBundle10",
"notForSale": false,
"priceId": 1,
"showAsListPrice": false
}
},
"items": {
"beachHat": {
"defId": "beachHat",
"buyPriceDisabled": false,
"buyPrice": {
"coin": 200
},
"showAsListPrice": false
},
"summerHat": {
"defId": "summerHat",
"buyPriceDisabled": true,
"buyPrice": null,
"showAsListPrice": false
}
}
},
"scenarioJson": {
"customField1": "beach"
},
"version": 1,
"createdAt": 1811725200000,
"updatedAt": 1811725200000
}
]
},
"status": 200
}
Common Error Codes

Status Codes​

CodeNameDescription
40345MISSING_RECORDNo campaign exists for the specified campaignCode.
40616CLOUD_CODE_ONLY_METHODThe method was called from a client. It can only be called from Cloud Code or S2S.
40731FEATURE_NOT_SUPPORTED_BY_BILLING_PLANBilling plan does not include the Campaign feature. Requires a plan that includes Enterprise features.