curl --request POST \
--url https://{host}/promotion/v2/groups \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"groupId": "summer-game-rewards",
"minimumActiveCampaignsRequired": 1,
"campaignIds": [
"ece06dde-b2a2-41ae-a1cf-bdddaa7d36dd",
"6124192d-6cbe-4a35-b1bf-5233193b7297"
],
"validFrom": "2026-11-06T00:00:00Z",
"validTo": "2026-12-06T00:00:00Z"
}
'import requests
url = "https://{host}/promotion/v2/groups"
payload = {
"groupId": "summer-game-rewards",
"minimumActiveCampaignsRequired": 1,
"campaignIds": ["ece06dde-b2a2-41ae-a1cf-bdddaa7d36dd", "6124192d-6cbe-4a35-b1bf-5233193b7297"],
"validFrom": "2026-11-06T00:00:00Z",
"validTo": "2026-12-06T00:00:00Z"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
groupId: 'summer-game-rewards',
minimumActiveCampaignsRequired: 1,
campaignIds: ['ece06dde-b2a2-41ae-a1cf-bdddaa7d36dd', '6124192d-6cbe-4a35-b1bf-5233193b7297'],
validFrom: '2026-11-06T00:00:00Z',
validTo: '2026-12-06T00:00:00Z'
})
};
fetch('https://{host}/promotion/v2/groups', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/promotion/v2/groups",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'groupId' => 'summer-game-rewards',
'minimumActiveCampaignsRequired' => 1,
'campaignIds' => [
'ece06dde-b2a2-41ae-a1cf-bdddaa7d36dd',
'6124192d-6cbe-4a35-b1bf-5233193b7297'
],
'validFrom' => '2026-11-06T00:00:00Z',
'validTo' => '2026-12-06T00:00:00Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{host}/promotion/v2/groups"
payload := strings.NewReader("{\n \"groupId\": \"summer-game-rewards\",\n \"minimumActiveCampaignsRequired\": 1,\n \"campaignIds\": [\n \"ece06dde-b2a2-41ae-a1cf-bdddaa7d36dd\",\n \"6124192d-6cbe-4a35-b1bf-5233193b7297\"\n ],\n \"validFrom\": \"2026-11-06T00:00:00Z\",\n \"validTo\": \"2026-12-06T00:00:00Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{host}/promotion/v2/groups")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"groupId\": \"summer-game-rewards\",\n \"minimumActiveCampaignsRequired\": 1,\n \"campaignIds\": [\n \"ece06dde-b2a2-41ae-a1cf-bdddaa7d36dd\",\n \"6124192d-6cbe-4a35-b1bf-5233193b7297\"\n ],\n \"validFrom\": \"2026-11-06T00:00:00Z\",\n \"validTo\": \"2026-12-06T00:00:00Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/promotion/v2/groups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"groupId\": \"summer-game-rewards\",\n \"minimumActiveCampaignsRequired\": 1,\n \"campaignIds\": [\n \"ece06dde-b2a2-41ae-a1cf-bdddaa7d36dd\",\n \"6124192d-6cbe-4a35-b1bf-5233193b7297\"\n ],\n \"validFrom\": \"2026-11-06T00:00:00Z\",\n \"validTo\": \"2026-12-06T00:00:00Z\"\n}"
response = http.request(request)
puts response.read_body{
"groupId": "summer-game-rewards",
"minimumActiveCampaignsRequired": 1,
"type": "game",
"validFrom": "2026-11-06T00:00:00Z",
"validTo": "2026-12-06T00:00:00Z",
"assignedTickets": 128,
"campaigns": [
{
"unifiedCampaignId": "c7809a52-2b6e-4fbc-908a-04996b1d2fa8",
"campaignId": "122182d4-2d30-48fd-9019-69766f18be44",
"campaignName": "coca_cola_10p_off",
"validFrom": "2026-11-05T00:00:00Z",
"validTo": "2026-11-11T00:00:00Z",
"previewVisibleFrom": null,
"campaignType": "game",
"scope": "Individual",
"content": {
"iconTags": [],
"title": "10% Off Coca-Cola & Fanta – Chain 1 Deal",
"description": "Refresh your day with a cool discount! For a limited time, get 10% off Coca-Cola or Fanta when purchased without any other offers. This exclusive deal for Chain 1 is your ticket to crisp, bubbly savings—no stacking needed.",
"brand": "Coca-Cola Refreshments",
"imageUrl": "https://example.com/assets/coke_fanta_discount.jpg",
"discountLabel": "10% Off Coca-Cola & Fanta",
"normalPriceLabel": "Non-member price 5EUR",
"pricePerUnitLabelEnabled": true,
"unitOfMeasure": "L",
"conditionLabel": "Buy 1 Coca-Cola or Fanta",
"receiptDisplayText": "10% off Coca-Cola or Fanta",
"tags": [],
"icons": [],
"autogenerateDiscountLabel": null
},
"prices": {
"currency": "EUR",
"normalPrice": 5,
"price": 4.5,
"normalPricePerUnit": 10,
"pricePerUnit": 9
},
"discount": null,
"status": "Active",
"redemptionLimit": 1,
"totalCoupons": null,
"statistics": null,
"chainIds": null,
"storeIds": null,
"isDefault": false,
"offerSynchronized": true,
"fundedBy": "Coca-Cola Refreshments",
"audience": null,
"metadata": null,
"authorName": "Integration",
"isTemplate": false,
"displayPriority": 5,
"preactivated": false,
"ignoreOnPos": false,
"defaultValidForDays": null,
"rewardRedemptionSettings": null,
"modifiedDate": "2026-11-04T12:20:15.5070285Z",
"modifiedBy": "Integration"
}
]
}{
"name": "<string>",
"message": "<string>",
"details": null
}Upsert offers group
Your backend calls this to create or change a group: a set of published offers of one type from which a customer who holds
a ticket for the group picks one coupon. When no group has the given groupId, the group is created; otherwise its offers,
dates and minimum replace the stored ones.
The offers must all be published, share one type, and have validity periods that overlap each other.
minimumActiveCampaignsRequired is how many of them must still be active, with coupons left, before a ticket can be
assigned to the group; omitted, one is enough.
curl --request POST \
--url https://{host}/promotion/v2/groups \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"groupId": "summer-game-rewards",
"minimumActiveCampaignsRequired": 1,
"campaignIds": [
"ece06dde-b2a2-41ae-a1cf-bdddaa7d36dd",
"6124192d-6cbe-4a35-b1bf-5233193b7297"
],
"validFrom": "2026-11-06T00:00:00Z",
"validTo": "2026-12-06T00:00:00Z"
}
'import requests
url = "https://{host}/promotion/v2/groups"
payload = {
"groupId": "summer-game-rewards",
"minimumActiveCampaignsRequired": 1,
"campaignIds": ["ece06dde-b2a2-41ae-a1cf-bdddaa7d36dd", "6124192d-6cbe-4a35-b1bf-5233193b7297"],
"validFrom": "2026-11-06T00:00:00Z",
"validTo": "2026-12-06T00:00:00Z"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
groupId: 'summer-game-rewards',
minimumActiveCampaignsRequired: 1,
campaignIds: ['ece06dde-b2a2-41ae-a1cf-bdddaa7d36dd', '6124192d-6cbe-4a35-b1bf-5233193b7297'],
validFrom: '2026-11-06T00:00:00Z',
validTo: '2026-12-06T00:00:00Z'
})
};
fetch('https://{host}/promotion/v2/groups', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/promotion/v2/groups",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'groupId' => 'summer-game-rewards',
'minimumActiveCampaignsRequired' => 1,
'campaignIds' => [
'ece06dde-b2a2-41ae-a1cf-bdddaa7d36dd',
'6124192d-6cbe-4a35-b1bf-5233193b7297'
],
'validFrom' => '2026-11-06T00:00:00Z',
'validTo' => '2026-12-06T00:00:00Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{host}/promotion/v2/groups"
payload := strings.NewReader("{\n \"groupId\": \"summer-game-rewards\",\n \"minimumActiveCampaignsRequired\": 1,\n \"campaignIds\": [\n \"ece06dde-b2a2-41ae-a1cf-bdddaa7d36dd\",\n \"6124192d-6cbe-4a35-b1bf-5233193b7297\"\n ],\n \"validFrom\": \"2026-11-06T00:00:00Z\",\n \"validTo\": \"2026-12-06T00:00:00Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{host}/promotion/v2/groups")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"groupId\": \"summer-game-rewards\",\n \"minimumActiveCampaignsRequired\": 1,\n \"campaignIds\": [\n \"ece06dde-b2a2-41ae-a1cf-bdddaa7d36dd\",\n \"6124192d-6cbe-4a35-b1bf-5233193b7297\"\n ],\n \"validFrom\": \"2026-11-06T00:00:00Z\",\n \"validTo\": \"2026-12-06T00:00:00Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/promotion/v2/groups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"groupId\": \"summer-game-rewards\",\n \"minimumActiveCampaignsRequired\": 1,\n \"campaignIds\": [\n \"ece06dde-b2a2-41ae-a1cf-bdddaa7d36dd\",\n \"6124192d-6cbe-4a35-b1bf-5233193b7297\"\n ],\n \"validFrom\": \"2026-11-06T00:00:00Z\",\n \"validTo\": \"2026-12-06T00:00:00Z\"\n}"
response = http.request(request)
puts response.read_body{
"groupId": "summer-game-rewards",
"minimumActiveCampaignsRequired": 1,
"type": "game",
"validFrom": "2026-11-06T00:00:00Z",
"validTo": "2026-12-06T00:00:00Z",
"assignedTickets": 128,
"campaigns": [
{
"unifiedCampaignId": "c7809a52-2b6e-4fbc-908a-04996b1d2fa8",
"campaignId": "122182d4-2d30-48fd-9019-69766f18be44",
"campaignName": "coca_cola_10p_off",
"validFrom": "2026-11-05T00:00:00Z",
"validTo": "2026-11-11T00:00:00Z",
"previewVisibleFrom": null,
"campaignType": "game",
"scope": "Individual",
"content": {
"iconTags": [],
"title": "10% Off Coca-Cola & Fanta – Chain 1 Deal",
"description": "Refresh your day with a cool discount! For a limited time, get 10% off Coca-Cola or Fanta when purchased without any other offers. This exclusive deal for Chain 1 is your ticket to crisp, bubbly savings—no stacking needed.",
"brand": "Coca-Cola Refreshments",
"imageUrl": "https://example.com/assets/coke_fanta_discount.jpg",
"discountLabel": "10% Off Coca-Cola & Fanta",
"normalPriceLabel": "Non-member price 5EUR",
"pricePerUnitLabelEnabled": true,
"unitOfMeasure": "L",
"conditionLabel": "Buy 1 Coca-Cola or Fanta",
"receiptDisplayText": "10% off Coca-Cola or Fanta",
"tags": [],
"icons": [],
"autogenerateDiscountLabel": null
},
"prices": {
"currency": "EUR",
"normalPrice": 5,
"price": 4.5,
"normalPricePerUnit": 10,
"pricePerUnit": 9
},
"discount": null,
"status": "Active",
"redemptionLimit": 1,
"totalCoupons": null,
"statistics": null,
"chainIds": null,
"storeIds": null,
"isDefault": false,
"offerSynchronized": true,
"fundedBy": "Coca-Cola Refreshments",
"audience": null,
"metadata": null,
"authorName": "Integration",
"isTemplate": false,
"displayPriority": 5,
"preactivated": false,
"ignoreOnPos": false,
"defaultValidForDays": null,
"rewardRedemptionSettings": null,
"modifiedDate": "2026-11-04T12:20:15.5070285Z",
"modifiedBy": "Integration"
}
]
}{
"name": "<string>",
"message": "<string>",
"details": null
}Authorizations
Body
The group to create or update: its id, its offers, its dates and the minimum of active offers.
A group of offers to create or update.
How many of the group's offers must be active, with coupons left, for a ticket to be assigned to the group. Checked at every ticket assignment. With a minimum of 2, a group with one offer, or with two offers of which one has expired or has no coupons left, takes no tickets.
Response
The group as stored, with its offers.
A group of offers of one type that a ticket holder picks one coupon from.
The offer's type, which determines how its coupons reach customers and where they are used will be used. Types used so far: game, appCoupon, gift, preferredStore, memberOffer, stampCard, stickersCampaign. All offers within the group have the same type
1 - 255How many of the group's offers must be active, with coupons left, for a ticket to be assigned to the group. Checked at every ticket assignment. With a minimum of 2, a group with one offer, or with two offers of which one has expired or has no coupons left, takes no tickets.