curl --request PUT \
--url https://api-sandbox.appcharge.com/offering/rolling-offer/{rollingOfferSKU} \
--header 'Content-Type: application/json' \
--header 'x-publisher-token: <x-publisher-token>' \
--data '
{
"name": "<string>",
"active": true,
"productsSequence": [
{
"index": 123,
"products": [
{
"publisherProductId": "<string>",
"quantity": 123
}
],
"priceInUsdCents": 123,
"priceDiscount": {
"discount": 123
},
"productSale": {
"sale": 123
},
"badges": [
{
"publisherBadgeId": "<string>"
}
]
}
],
"publisherOfferId": "<string>",
"type": "RollingOffer",
"priority": 123,
"offerUiId": "<string>",
"offerExternalUiId": "<string>",
"segments": [
"<string>"
],
"schedule": {
"permanent": true,
"timeFrames": [
{
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"notes": "<string>"
}
]
}
}
'import requests
url = "https://api-sandbox.appcharge.com/offering/rolling-offer/{rollingOfferSKU}"
payload = {
"name": "<string>",
"active": True,
"productsSequence": [
{
"index": 123,
"products": [
{
"publisherProductId": "<string>",
"quantity": 123
}
],
"priceInUsdCents": 123,
"priceDiscount": { "discount": 123 },
"productSale": { "sale": 123 },
"badges": [{ "publisherBadgeId": "<string>" }]
}
],
"publisherOfferId": "<string>",
"type": "RollingOffer",
"priority": 123,
"offerUiId": "<string>",
"offerExternalUiId": "<string>",
"segments": ["<string>"],
"schedule": {
"permanent": True,
"timeFrames": [
{
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"notes": "<string>"
}
]
}
}
headers = {
"x-publisher-token": "<x-publisher-token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-publisher-token': '<x-publisher-token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
active: true,
productsSequence: [
{
index: 123,
products: [{publisherProductId: '<string>', quantity: 123}],
priceInUsdCents: 123,
priceDiscount: {discount: 123},
productSale: {sale: 123},
badges: [{publisherBadgeId: '<string>'}]
}
],
publisherOfferId: '<string>',
type: 'RollingOffer',
priority: 123,
offerUiId: '<string>',
offerExternalUiId: '<string>',
segments: ['<string>'],
schedule: {
permanent: true,
timeFrames: [
{
startTime: '2023-11-07T05:31:56Z',
endTime: '2023-11-07T05:31:56Z',
notes: '<string>'
}
]
}
})
};
fetch('https://api-sandbox.appcharge.com/offering/rolling-offer/{rollingOfferSKU}', 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://api-sandbox.appcharge.com/offering/rolling-offer/{rollingOfferSKU}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'active' => true,
'productsSequence' => [
[
'index' => 123,
'products' => [
[
'publisherProductId' => '<string>',
'quantity' => 123
]
],
'priceInUsdCents' => 123,
'priceDiscount' => [
'discount' => 123
],
'productSale' => [
'sale' => 123
],
'badges' => [
[
'publisherBadgeId' => '<string>'
]
]
]
],
'publisherOfferId' => '<string>',
'type' => 'RollingOffer',
'priority' => 123,
'offerUiId' => '<string>',
'offerExternalUiId' => '<string>',
'segments' => [
'<string>'
],
'schedule' => [
'permanent' => true,
'timeFrames' => [
[
'startTime' => '2023-11-07T05:31:56Z',
'endTime' => '2023-11-07T05:31:56Z',
'notes' => '<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-publisher-token: <x-publisher-token>"
],
]);
$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://api-sandbox.appcharge.com/offering/rolling-offer/{rollingOfferSKU}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"active\": true,\n \"productsSequence\": [\n {\n \"index\": 123,\n \"products\": [\n {\n \"publisherProductId\": \"<string>\",\n \"quantity\": 123\n }\n ],\n \"priceInUsdCents\": 123,\n \"priceDiscount\": {\n \"discount\": 123\n },\n \"productSale\": {\n \"sale\": 123\n },\n \"badges\": [\n {\n \"publisherBadgeId\": \"<string>\"\n }\n ]\n }\n ],\n \"publisherOfferId\": \"<string>\",\n \"type\": \"RollingOffer\",\n \"priority\": 123,\n \"offerUiId\": \"<string>\",\n \"offerExternalUiId\": \"<string>\",\n \"segments\": [\n \"<string>\"\n ],\n \"schedule\": {\n \"permanent\": true,\n \"timeFrames\": [\n {\n \"startTime\": \"2023-11-07T05:31:56Z\",\n \"endTime\": \"2023-11-07T05:31:56Z\",\n \"notes\": \"<string>\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-publisher-token", "<x-publisher-token>")
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.put("https://api-sandbox.appcharge.com/offering/rolling-offer/{rollingOfferSKU}")
.header("x-publisher-token", "<x-publisher-token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"active\": true,\n \"productsSequence\": [\n {\n \"index\": 123,\n \"products\": [\n {\n \"publisherProductId\": \"<string>\",\n \"quantity\": 123\n }\n ],\n \"priceInUsdCents\": 123,\n \"priceDiscount\": {\n \"discount\": 123\n },\n \"productSale\": {\n \"sale\": 123\n },\n \"badges\": [\n {\n \"publisherBadgeId\": \"<string>\"\n }\n ]\n }\n ],\n \"publisherOfferId\": \"<string>\",\n \"type\": \"RollingOffer\",\n \"priority\": 123,\n \"offerUiId\": \"<string>\",\n \"offerExternalUiId\": \"<string>\",\n \"segments\": [\n \"<string>\"\n ],\n \"schedule\": {\n \"permanent\": true,\n \"timeFrames\": [\n {\n \"startTime\": \"2023-11-07T05:31:56Z\",\n \"endTime\": \"2023-11-07T05:31:56Z\",\n \"notes\": \"<string>\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.appcharge.com/offering/rolling-offer/{rollingOfferSKU}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-publisher-token"] = '<x-publisher-token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"active\": true,\n \"productsSequence\": [\n {\n \"index\": 123,\n \"products\": [\n {\n \"publisherProductId\": \"<string>\",\n \"quantity\": 123\n }\n ],\n \"priceInUsdCents\": 123,\n \"priceDiscount\": {\n \"discount\": 123\n },\n \"productSale\": {\n \"sale\": 123\n },\n \"badges\": [\n {\n \"publisherBadgeId\": \"<string>\"\n }\n ]\n }\n ],\n \"publisherOfferId\": \"<string>\",\n \"type\": \"RollingOffer\",\n \"priority\": 123,\n \"offerUiId\": \"<string>\",\n \"offerExternalUiId\": \"<string>\",\n \"segments\": [\n \"<string>\"\n ],\n \"schedule\": {\n \"permanent\": true,\n \"timeFrames\": [\n {\n \"startTime\": \"2023-11-07T05:31:56Z\",\n \"endTime\": \"2023-11-07T05:31:56Z\",\n \"notes\": \"<string>\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"publisherOfferId": "<string>",
"offerId": "<string>",
"name": "<string>",
"type": "<string>",
"active": true,
"priority": 123,
"segments": [
"<string>"
],
"offerUi": {
"offerUiId": "<string>",
"offerUIType": "<string>",
"description": "<string>",
"backgroundImage": "<string>",
"borderColor": {},
"borderWidth": 123,
"externalId": "<string>"
},
"productsSequence": [
{
"index": 123,
"priceInUsdCents": 123,
"products": [
{
"publisherProductId": "<string>",
"quantity": 123
}
],
"badges": [
{
"publisherBadgeId": "<string>"
}
]
}
],
"schedule": {
"permanent": true,
"timeFrames": [
{
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"notes": "<string>"
}
]
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}Update Rolling Offer
curl --request PUT \
--url https://api-sandbox.appcharge.com/offering/rolling-offer/{rollingOfferSKU} \
--header 'Content-Type: application/json' \
--header 'x-publisher-token: <x-publisher-token>' \
--data '
{
"name": "<string>",
"active": true,
"productsSequence": [
{
"index": 123,
"products": [
{
"publisherProductId": "<string>",
"quantity": 123
}
],
"priceInUsdCents": 123,
"priceDiscount": {
"discount": 123
},
"productSale": {
"sale": 123
},
"badges": [
{
"publisherBadgeId": "<string>"
}
]
}
],
"publisherOfferId": "<string>",
"type": "RollingOffer",
"priority": 123,
"offerUiId": "<string>",
"offerExternalUiId": "<string>",
"segments": [
"<string>"
],
"schedule": {
"permanent": true,
"timeFrames": [
{
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"notes": "<string>"
}
]
}
}
'import requests
url = "https://api-sandbox.appcharge.com/offering/rolling-offer/{rollingOfferSKU}"
payload = {
"name": "<string>",
"active": True,
"productsSequence": [
{
"index": 123,
"products": [
{
"publisherProductId": "<string>",
"quantity": 123
}
],
"priceInUsdCents": 123,
"priceDiscount": { "discount": 123 },
"productSale": { "sale": 123 },
"badges": [{ "publisherBadgeId": "<string>" }]
}
],
"publisherOfferId": "<string>",
"type": "RollingOffer",
"priority": 123,
"offerUiId": "<string>",
"offerExternalUiId": "<string>",
"segments": ["<string>"],
"schedule": {
"permanent": True,
"timeFrames": [
{
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"notes": "<string>"
}
]
}
}
headers = {
"x-publisher-token": "<x-publisher-token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-publisher-token': '<x-publisher-token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
active: true,
productsSequence: [
{
index: 123,
products: [{publisherProductId: '<string>', quantity: 123}],
priceInUsdCents: 123,
priceDiscount: {discount: 123},
productSale: {sale: 123},
badges: [{publisherBadgeId: '<string>'}]
}
],
publisherOfferId: '<string>',
type: 'RollingOffer',
priority: 123,
offerUiId: '<string>',
offerExternalUiId: '<string>',
segments: ['<string>'],
schedule: {
permanent: true,
timeFrames: [
{
startTime: '2023-11-07T05:31:56Z',
endTime: '2023-11-07T05:31:56Z',
notes: '<string>'
}
]
}
})
};
fetch('https://api-sandbox.appcharge.com/offering/rolling-offer/{rollingOfferSKU}', 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://api-sandbox.appcharge.com/offering/rolling-offer/{rollingOfferSKU}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'active' => true,
'productsSequence' => [
[
'index' => 123,
'products' => [
[
'publisherProductId' => '<string>',
'quantity' => 123
]
],
'priceInUsdCents' => 123,
'priceDiscount' => [
'discount' => 123
],
'productSale' => [
'sale' => 123
],
'badges' => [
[
'publisherBadgeId' => '<string>'
]
]
]
],
'publisherOfferId' => '<string>',
'type' => 'RollingOffer',
'priority' => 123,
'offerUiId' => '<string>',
'offerExternalUiId' => '<string>',
'segments' => [
'<string>'
],
'schedule' => [
'permanent' => true,
'timeFrames' => [
[
'startTime' => '2023-11-07T05:31:56Z',
'endTime' => '2023-11-07T05:31:56Z',
'notes' => '<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-publisher-token: <x-publisher-token>"
],
]);
$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://api-sandbox.appcharge.com/offering/rolling-offer/{rollingOfferSKU}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"active\": true,\n \"productsSequence\": [\n {\n \"index\": 123,\n \"products\": [\n {\n \"publisherProductId\": \"<string>\",\n \"quantity\": 123\n }\n ],\n \"priceInUsdCents\": 123,\n \"priceDiscount\": {\n \"discount\": 123\n },\n \"productSale\": {\n \"sale\": 123\n },\n \"badges\": [\n {\n \"publisherBadgeId\": \"<string>\"\n }\n ]\n }\n ],\n \"publisherOfferId\": \"<string>\",\n \"type\": \"RollingOffer\",\n \"priority\": 123,\n \"offerUiId\": \"<string>\",\n \"offerExternalUiId\": \"<string>\",\n \"segments\": [\n \"<string>\"\n ],\n \"schedule\": {\n \"permanent\": true,\n \"timeFrames\": [\n {\n \"startTime\": \"2023-11-07T05:31:56Z\",\n \"endTime\": \"2023-11-07T05:31:56Z\",\n \"notes\": \"<string>\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-publisher-token", "<x-publisher-token>")
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.put("https://api-sandbox.appcharge.com/offering/rolling-offer/{rollingOfferSKU}")
.header("x-publisher-token", "<x-publisher-token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"active\": true,\n \"productsSequence\": [\n {\n \"index\": 123,\n \"products\": [\n {\n \"publisherProductId\": \"<string>\",\n \"quantity\": 123\n }\n ],\n \"priceInUsdCents\": 123,\n \"priceDiscount\": {\n \"discount\": 123\n },\n \"productSale\": {\n \"sale\": 123\n },\n \"badges\": [\n {\n \"publisherBadgeId\": \"<string>\"\n }\n ]\n }\n ],\n \"publisherOfferId\": \"<string>\",\n \"type\": \"RollingOffer\",\n \"priority\": 123,\n \"offerUiId\": \"<string>\",\n \"offerExternalUiId\": \"<string>\",\n \"segments\": [\n \"<string>\"\n ],\n \"schedule\": {\n \"permanent\": true,\n \"timeFrames\": [\n {\n \"startTime\": \"2023-11-07T05:31:56Z\",\n \"endTime\": \"2023-11-07T05:31:56Z\",\n \"notes\": \"<string>\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.appcharge.com/offering/rolling-offer/{rollingOfferSKU}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-publisher-token"] = '<x-publisher-token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"active\": true,\n \"productsSequence\": [\n {\n \"index\": 123,\n \"products\": [\n {\n \"publisherProductId\": \"<string>\",\n \"quantity\": 123\n }\n ],\n \"priceInUsdCents\": 123,\n \"priceDiscount\": {\n \"discount\": 123\n },\n \"productSale\": {\n \"sale\": 123\n },\n \"badges\": [\n {\n \"publisherBadgeId\": \"<string>\"\n }\n ]\n }\n ],\n \"publisherOfferId\": \"<string>\",\n \"type\": \"RollingOffer\",\n \"priority\": 123,\n \"offerUiId\": \"<string>\",\n \"offerExternalUiId\": \"<string>\",\n \"segments\": [\n \"<string>\"\n ],\n \"schedule\": {\n \"permanent\": true,\n \"timeFrames\": [\n {\n \"startTime\": \"2023-11-07T05:31:56Z\",\n \"endTime\": \"2023-11-07T05:31:56Z\",\n \"notes\": \"<string>\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"publisherOfferId": "<string>",
"offerId": "<string>",
"name": "<string>",
"type": "<string>",
"active": true,
"priority": 123,
"segments": [
"<string>"
],
"offerUi": {
"offerUiId": "<string>",
"offerUIType": "<string>",
"description": "<string>",
"backgroundImage": "<string>",
"borderColor": {},
"borderWidth": 123,
"externalId": "<string>"
},
"productsSequence": [
{
"index": 123,
"priceInUsdCents": 123,
"products": [
{
"publisherProductId": "<string>",
"quantity": 123
}
],
"badges": [
{
"publisherBadgeId": "<string>"
}
]
}
],
"schedule": {
"permanent": true,
"timeFrames": [
{
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"notes": "<string>"
}
]
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}Headers
The publisher token used for authentication.
Path Parameters
The SKU of the rolling offer.
Body
The updated name of the rolling offer.
Whether the rolling offer is active.
The sequence of products included in the rolling offer. At least 2 productsSequences should be added.
Show child attributes
Show child attributes
The unique identifier for the rolling offer.
The type of offer - RollingOffer.
RollingOffer The priority level of the rolling offer. Rolling offers will be sorted by priority, and only the rolling offer with the highest priority will be returned. Rolling offers with no priority will be sorted by the createdAt date.
Internal ID for the Offer UI (required if offerExternalUiId not provided).
The external UI ID for the rolling offer.
List of player segments that this rolling offer applies to.
The schedule for when the rolling offer is available.
Show child attributes
Show child attributes
Response
Rolling offer updated successfully.
The unique identifier for the rolling offer.
The unique identifier of the rolling offer.
The name of the rolling offer.
The type of rolling offer.
Whether the rolling offer is active.
The priority level of the rolling offer.
The player segments associated with the rolling offer.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Timestamp when the rolling offer was created.
Timestamp when the rolling offer was last updated.
Was this page helpful?
