Manage campaigns
With the Remote Control API, you can create, update or delete you campaigns but also the variations of itself. A campaign is an aggregation of variation groups, which are themselves an aggregation of variations. The campaign architecture is the following :
{
"id": "c1",
"name": "My campaign",
"variation_groups": [
{
"id": "vg1",
"name": "variation_group",
"variations": [
{
"id": "v1",
"name": "Variation 1"
},
{
"id": "v2",
"name": "Variation 2"
}
]
}
]
}List your campaigns
👍 Required scope : campaign.list
Create a campaign
👍 Required scope : campaign.create
Replace {BODY} with the following json :
The previous example will create a campaign with type ab, with 2 variations returning the flag color red or blue. The targeting applied means that the context for the visitor should CONTAIN "isVIP" and its value must be "true".
Create a new variation group in a campaign
Replace {BODY} with the same previous payload (variation_group part) :
Create a new variation in a variation group
Replace {BODY} with the same previous payload (variation part) :
View a campaign
👍 Required scope : campaign.read
View variation groups of a campaign
View a specific variation group
View variations of a variation group
View a specific variation
Update a campaign
👍 Required scope : campaign.update
As you prefer, you can use the global campaign routes to edit the children variations, variation_groups of your campaign or you can use the specific routes to updates them.
❗️ Be careful
If you use the global campaign route to edit variations or variation groups, you have to put in the payload the entire sub collection of it, and don't forget to add the parameter id to each child. If you don't do this, the entire sub-collection will be replaced and the old children will be erased or replaced.
To avoid this, when you need to update a specific item in the variations for example, prefer to use the direct route to edit one variation.
Update a specific variation group
Update a specific variation
Toggle a campaign
👍 Required scope : campaign.toggle
📘 The different states are active , paused , interrupted .
Delete a campaign
👍 Required scope : campaign.delete
❗️ Be careful, there is no confirmation step when you call these routes. It will delete it definitively.
Delete a specific variation group
Delete a specific variation
Last updated
Was this helpful?

