Skip to main content
POST
/
offering
/
offer
cURL
curl --request POST \
  --url https://api-sandbox.appcharge.com/offering/offer \
  --header 'Content-Type: application/json' \
  --header 'x-publisher-token: <x-publisher-token>' \
  --data '{
  "publisherOfferId": "offer1",
  "name": "Test_Bundle",
  "type": "Bundle",
  "active": true,
  "segments": [
    "NewUser"
  ],
  "productsSequence": [
    {
      "index": 1,
      "priceInUsdCents": 300,
      "products": []
    }
  ],
  "priceDiscount": {
    "priceBeforeDiscount": 1000,
    "discount": 10,
    "type": "percentage"
  }
}'
{
  "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": [
        "<any>"
      ]
    }
  ],
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Headers

x-publisher-token
string
required

The publisher token

Body

application/json
publisherOfferId
string
required

The publisher offer Id

name
string
required

The name of the offer (at least 3 letters)

type
string
required

The type of the offer - Bundle, SpecialOffer

active
boolean
required

Whether the offer is active

segments
string[]
required

IDs of player segments (["NewUser", "BigSpender"] etc.)

productsSequence
object[]
required
displayName
string

If not specified, the offer name will be used

description
string

The description of the offer (conditionally returned)

offerUiId
string

Internal ID for the Offer UI (required if offerExternalUiId not provided)

offerExternalUiId
string

The offer UI ID as configured by the publisher (if provided, offerUiId is not required)

publisherSectionId
string

The publisher section ID (applies only to Bundle)

dynamicOfferUi
object
schedule
object
priceDiscount
object

Response

Create a new Offer

offerId
string
publisherOfferId
string
name
string
displayName
string
description
string
type
string
createdBy
string
offerUi
object
dynamicOfferUi
object
active
boolean
segments
string[]
productsSequence
object[]
startOver
boolean
priority
number
showAfter
string
triggers
object[]
createdAt
string<date-time>
updatedAt
string<date-time>
I