Skip to main content
POST
/
offering
/
offer
/
popup
cURL
curl --request POST \
  --url https://api-sandbox.appcharge.com/offering/offer/popup \
  --header 'Content-Type: application/json' \
  --header 'x-publisher-token: <x-publisher-token>' \
  --data '{
  "publisherOfferId": "offer1",
  "name": "Test_PopUp",
  "displayName": "<string>",
  "description": "Best offer ever.",
  "type": "PopUp",
  "subType": "<string>",
  "priority": 123,
  "offerUiId": "64a55b82e06998282d3d9b59",
  "offerExternalUiId": "b9c1e7a3d1f8b2a4c6e5d8f3",
  "active": "true",
  "segments": "NewUser",
  "startOver": true,
  "productsSequence": [
    {
      "index": 1,
      "priceInUsdCents": 300,
      "products": [
        {
          "quantity": 500,
          "publisherProductId": "product1"
        }
      ]
    }
  ]
}'
{
  "offerId": "655dc8a546822b3e7586b7b7",
  "publisherOfferId": "offer1",
  "name": "Test_PopUp",
  "displayName": "<string>",
  "description": "N/A",
  "type": "PopUp",
  "subType": "<string>",
  "createdBy": "API",
  "offerUi": {
    "offerUiId": "6548afb2ed7ec741ac8dee3a",
    "externalId": "<string>",
    "active": "true",
    "offerUiType": "PopUp",
    "name": "test_offerUi",
    "description": "Best Offer UI",
    "backgroundImage": "https://media.appcharge.com/defaults/background.png",
    "specialOffer": {
      "templateType": "Single",
      "presentOfferEndTimer": "false",
      "title": "",
      "fontSize": 18,
      "fontWeight": "normal",
      "fontColor": {
        "colorOne": "black",
        "colorTwo": "black",
        "direction": "to right"
      },
      "backgroundColor": {
        "colorOne": "black",
        "colorTwo": "black",
        "direction": "to right"
      }
    }
  },
  "active": "true",
  "coolDownInHours": "1",
  "segments": "[NewUser]",
  "productsSequence": [
    {
      "index": 1,
      "priceInUsdCents": 300,
      "products": [
        {
          "quantity": 500,
          "product": {
            "publisherProductId": "product1",
            "name": "test_product",
            "textFontColorHex": "#FFFF",
            "type": "Time",
            "prefix": "100",
            "suffix": "500",
            "priority": "Main",
            "images": [
              {
                "type": "<string>",
                "url": "<string>"
              }
            ],
            "createdAt": "2023-07-05T12:01:06.113Z",
            "updatedAt": "2023-07-05T12:01:06.113Z",
            "productId": "655dc8a546822b3e7586b7b7"
          }
        }
      ]
    }
  ],
  "startOver": true,
  "priority": 123,
  "showAfter": "<string>",
  "createdAt": "2023-07-05T12:01:06.113Z",
  "updatedAt": "2023-07-05T12:01:06.113Z"
}

Headers

x-publisher-token
string
required

The publisher token

Body

application/json
publisherOfferId
string
required

The publisher offer Id.

Example:

"offer1"

name
string
required

The name of the offer. At least 3 letters.

Example:

"Test_PopUp"

type
string
required

The type of the offer, in this case 'PopUp'.

Example:

"PopUp"

subType
string
required

The type of popup. In this case 'DailyBonus'.

priority
number
required

Choose the priority of the order in which the popups will be displayed, 1 being first

offerUiId
string
required

The Internal ID for the Offer UI. The Offer UI is responsible to add UI elements to the offers such as background image and title. Once you create the Offer UI using the dashboard, you will get the internal ID.

Example:

"64a55b82e06998282d3d9b59"

active
boolean
required

Is the offer active? true/false.

Example:

"true"

segments
string[]
required

The Ids of the player segments to be used in the segmentation algorithm. for example: [“NewUser”, “BigSpender”]. This param is required but can be left empty.

Example:

"NewUser"

startOver
boolean
required

If true, popup will repeat itself.

productsSequence
object[]
required

An array of product sequences, where each sequence represents a day. Only one product sequence is displayed per day.

displayName
string

The display name of the offer. If not specified, the offer name will be used.

description
string

The description of the offer, At least 3 letters.

Example:

"Best offer ever."

offerExternalUiId
string

The offer UI ID as configured by the publisher. If offerExternalUiId is provided, then offerUiId will not be required.

Example:

"b9c1e7a3d1f8b2a4c6e5d8f3"

Response

Create a new Offer

offerId
string

The Id of the offer.

Example:

"655dc8a546822b3e7586b7b7"

publisherOfferId
string

The publisher offer Id.

Example:

"offer1"

name
string

The name of the offer.

Example:

"Test_PopUp"

displayName
string

The display name of the offer. If not specified, the offer name will be used. Conditionally returned.

description
string

The description of the offer, At least 3 letters. Conditionally returned.

Example:

"N/A"

type
string

The type of the offer. In this case: PopUp.

Example:

"PopUp"

subType
string

Price of the products set in cents. Will be returned as 0 since subtype daily bonus.

createdBy
string

The platform which the offer was created from (Dashboard, API)

Example:

"API"

offerUi
object
active
boolean

Is the offer active? true/false.

Example:

"true"

coolDownInHours
number

Used for cooldown between orders. DEPRECATION WARNING: This field will be removed in future releases.

Example:

"1"

segments
string[]

The Ids of the player segments to be used in the segmentation algorithm. for example: [“NewUser”, “BigSpender”].

Example:

"[NewUser]"

productsSequence
object[]

The products sequense containing the sets of products.

startOver
boolean

If true, popup will repeat itself.

priority
number

Defines the order of priority of for displaying popup.

showAfter
string

Event for which only after the popup appear.

createdAt
string<date-time>

the time when the offer was created, in UTC.

Example:

"2023-07-05T12:01:06.113Z"

updatedAt
string<date-time>

the time when the offer was updated, in UTC.

Example:

"2023-07-05T12:01:06.113Z"

I