SysGetCampaignPageOffset
Returns another page of campaigns, using the encoded context string returned by a previous call to SysGetCampaignPage or to this method.
| Service | Operation |
|---|---|
| campaign | SYS_GET_CAMPAIGN_PAGE_OFFSET |
Method Parameters
| Parameter | Description |
|---|---|
| context | The encoded context string returned by a previous call to SysGetCampaignPage or SysGetCampaignPageOffset. |
| pageOffset | The positive or negative page offset to fetch, relative to the last page retrieved with this context. Pages before the first page return the first page. |
Usage
http://localhost:3000
- C#
- C++
- Obj-C
- Java
- JavaScript
- Dart
- Roblox
- GDScript
- Lua
- Cloud Code
- Raw
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
-- N/A
N/A
-- Cloud Code only. To view example, switch to the Cloud Code tab
var context = "eyJzZWFyY2hDcml0ZXJpYSI6eyJlbmFibGVkIjp0cnVlfSwic29ydENyaXRlcmlhIjp7ImNyZWF0ZWRBdCI6LTF9LCJwYWdpbmF0aW9uIjp7InJvd3NQZXJQYWdlIjoxMCwicGFnZU51bWJlciI6MX19";
var pageOffset = 1;
var campaignProxy = bridge.getCampaignServiceProxy();
var postResult = campaignProxy.sysGetCampaignPageOffset(context, pageOffset);
{
"service": "campaign",
"operation": "SYS_GET_CAMPAIGN_PAGE_OFFSET",
"data": {
"context": "eyJzZWFyY2hDcml0ZXJpYSI6eyJlbmFibGVkIjp0cnVlfSwic29ydENyaXRlcmlhIjp7ImNyZWF0ZWRBdCI6LTF9LCJwYWdpbmF0aW9uIjp7InJvd3NQZXJQYWdlIjoxMCwicGFnZU51bWJlciI6MX19",
"pageOffset": 1
}
}
JSON Response
{
"data": {
"context": "eyJzZWFyY2hDcml0ZXJpYSI6eyJlbmFibGVkIjp0cnVlfSwic29ydENyaXRlcmlhIjp7ImNyZWF0ZWRBdCI6LTF9LCJwYWdpbmF0aW9uIjp7InJvd3NQZXJQYWdlIjoxMCwicGFnZU51bWJlciI6MX19",
"results": {
"count": 11,
"page": 2,
"items": [
{
"campaignCode": "SPRING2027",
"name": "Spring 2027",
"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": false,
"moreBefore": true
}
},
"status": 200
}
Common Error Codes
Status Codes
| Code | Name | Description |
|---|---|---|
| 40358 | MISSING_REQUIRED_PARAMETER | context or pageOffset was not specified. |
| 40616 | CLOUD_CODE_ONLY_METHOD | The method was called from a client. It can only be called from Cloud Code or S2S. |
| 40731 | FEATURE_NOT_SUPPORTED_BY_BILLING_PLAN | Billing plan does not include the Campaign feature. Requires a plan that includes Enterprise features. |