Skip to main content
Version: 6.1.0

SysGetCampaignPage

Returns a page of the app's campaigns, filtered and sorted using the provided context. The response includes an encoded context string that you can pass to SysGetCampaignPageOffset to fetch the pages before or after it.

A single page returns at most 100 campaigns by default.

ServiceOperation
campaignSYS_GET_CAMPAIGN_PAGE

Method Parameters​

ParameterDescription
contextThe JSON context for the page request. Supports pagination (rowsPerPage, pageNumber), searchCriteria (any simple campaign field, or dot-notation into target, scenarios or campaignJson) and sortCriteria (field name mapped to 1 for ascending or -1 for descending).

Usage​

http://localhost:3000
// Cloud Code only. To view example, switch to the Cloud Code tab
JSON Response
{
"data": {
"context": "eyJzZWFyY2hDcml0ZXJpYSI6eyJlbmFibGVkIjp0cnVlfSwic29ydENyaXRlcmlhIjp7ImNyZWF0ZWRBdCI6LTF9LCJwYWdpbmF0aW9uIjp7InJvd3NQZXJQYWdlIjoxMCwicGFnZU51bWJlciI6MX19",
"results": {
"count": 11,
"page": 1,
"items": [
{
"campaignCode": "SUMMER2026",
"name": "Summer 2026",
"purpose": "Evaluating impact of themes and summer sale on spenders",
"category": null,
"enabled": true,
"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
}
],
"moreAfter": true,
"moreBefore": false
}
},
"status": 200
}
Common Error Codes

Status Codes​

CodeNameDescription
40358MISSING_REQUIRED_PARAMETERcontext was not specified.
40660INVALID_PARAMETER_VALUEsearchCriteria or sortCriteria refers to a field that cannot be queried.
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.