cURL
curl --request POST \
--url https://api-sandbox.appcharge.com/offering/offer/get-offers \
--header 'x-publisher-token: <x-publisher-token>'import requests
url = "https://api-sandbox.appcharge.com/offering/offer/get-offers"
headers = {"x-publisher-token": "<x-publisher-token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-publisher-token': '<x-publisher-token>'}};
fetch('https://api-sandbox.appcharge.com/offering/offer/get-offers', 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/offer/get-offers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.appcharge.com/offering/offer/get-offers"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-publisher-token", "<x-publisher-token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-sandbox.appcharge.com/offering/offer/get-offers")
.header("x-publisher-token", "<x-publisher-token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.appcharge.com/offering/offer/get-offers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-publisher-token"] = '<x-publisher-token>'
response = http.request(request)
puts response.read_body{
"result": {
"totalCount": 123,
"offers": [
{
"offerId": "<string>",
"publisherOfferId": "<string>",
"name": "<string>",
"displayName": "<string>",
"description": "<string>",
"type": "<string>",
"createdBy": "<string>",
"offerUi": {
"offerUiId": "<string>",
"externalId": "<string>",
"active": true,
"offerUiType": "<string>",
"name": "<string>",
"description": "<string>",
"backgroundImage": "<string>",
"specialOffer": {
"templateType": "<string>",
"presentOfferEndTimer": true,
"title": "<string>",
"fontSize": 123,
"fontWeight": "<string>",
"fontColor": {
"colorOne": "<string>",
"colorTwo": "<string>",
"direction": "<string>"
},
"backgroundColor": {
"colorOne": "<string>",
"colorTwo": "<string>",
"direction": "<string>"
}
}
},
"dynamicOfferUi": {
"badges": [
{
"publisherBadgeId": "<string>",
"position": "<string>"
}
],
"salePercentage": 123,
"salePercentageDisplayType": "percentage"
},
"active": true,
"segments": [
"<string>"
],
"productsSequence": [
{
"index": 123,
"playerAvailability": 123,
"priceInUsdCents": 123,
"products": [
{
"quantity": 123,
"product": {
"publisherProductId": "<string>",
"name": "<string>",
"textFontColorHex": "<string>",
"type": "<string>",
"prefix": "<string>",
"suffix": "<string>",
"priority": "<string>",
"images": [
{
"type": "<string>",
"url": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"productId": "<string>"
}
}
]
}
],
"startOver": true,
"priority": 123,
"showAfter": "<string>",
"triggers": [
{
"type": "<string>",
"eventName": "<string>",
"every": 123,
"rules": [
"<unknown>"
]
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
},
"status": 123,
"message": "<string>"
}{
"message": "<string>",
"requestUrl": "<string>",
"body": "<string>"
}Offers V1 API
Get Offer
POST
/
offering
/
offer
/
get-offers
cURL
curl --request POST \
--url https://api-sandbox.appcharge.com/offering/offer/get-offers \
--header 'x-publisher-token: <x-publisher-token>'import requests
url = "https://api-sandbox.appcharge.com/offering/offer/get-offers"
headers = {"x-publisher-token": "<x-publisher-token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-publisher-token': '<x-publisher-token>'}};
fetch('https://api-sandbox.appcharge.com/offering/offer/get-offers', 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/offer/get-offers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.appcharge.com/offering/offer/get-offers"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-publisher-token", "<x-publisher-token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-sandbox.appcharge.com/offering/offer/get-offers")
.header("x-publisher-token", "<x-publisher-token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.appcharge.com/offering/offer/get-offers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-publisher-token"] = '<x-publisher-token>'
response = http.request(request)
puts response.read_body{
"result": {
"totalCount": 123,
"offers": [
{
"offerId": "<string>",
"publisherOfferId": "<string>",
"name": "<string>",
"displayName": "<string>",
"description": "<string>",
"type": "<string>",
"createdBy": "<string>",
"offerUi": {
"offerUiId": "<string>",
"externalId": "<string>",
"active": true,
"offerUiType": "<string>",
"name": "<string>",
"description": "<string>",
"backgroundImage": "<string>",
"specialOffer": {
"templateType": "<string>",
"presentOfferEndTimer": true,
"title": "<string>",
"fontSize": 123,
"fontWeight": "<string>",
"fontColor": {
"colorOne": "<string>",
"colorTwo": "<string>",
"direction": "<string>"
},
"backgroundColor": {
"colorOne": "<string>",
"colorTwo": "<string>",
"direction": "<string>"
}
}
},
"dynamicOfferUi": {
"badges": [
{
"publisherBadgeId": "<string>",
"position": "<string>"
}
],
"salePercentage": 123,
"salePercentageDisplayType": "percentage"
},
"active": true,
"segments": [
"<string>"
],
"productsSequence": [
{
"index": 123,
"playerAvailability": 123,
"priceInUsdCents": 123,
"products": [
{
"quantity": 123,
"product": {
"publisherProductId": "<string>",
"name": "<string>",
"textFontColorHex": "<string>",
"type": "<string>",
"prefix": "<string>",
"suffix": "<string>",
"priority": "<string>",
"images": [
{
"type": "<string>",
"url": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"productId": "<string>"
}
}
]
}
],
"startOver": true,
"priority": 123,
"showAfter": "<string>",
"triggers": [
{
"type": "<string>",
"eventName": "<string>",
"every": 123,
"rules": [
"<unknown>"
]
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
},
"status": 123,
"message": "<string>"
}{
"message": "<string>",
"requestUrl": "<string>",
"body": "<string>"
}Headers
The publisher token
Query Parameters
Bundle, SpecialOffer, Popup
Record limit (0-500). Defaults to 100 if not defined.
Required range:
0 <= x <= 500Offset (non-negative value).
Required range:
x >= 0To retrieve specific offers. If adding multiple, use ',' to separate.
Was this page helpful?
⌘I
