Skip to main content
PUT
/
offering
/
offer
/
popup
/
{offerSKU}
cURL
curl --request PUT \
  --url https://api-sandbox.appcharge.com/offering/offer/popup/{offerSKU} \
  --header 'Content-Type: application/json' \
  --header 'x-publisher-token: <x-publisher-token>' \
  --data '{
  "publisherOfferId": "Test_Popup_New",
  "name": "Test_Popup",
  "displayName": "<string>",
  "description": "Best offer ever.",
  "offerUiId": "64a55b82e06998282d3d9b59",
  "offerExternalUiId": "b9c1e7a3d1f8b2a4c6e5d8f3",
  "dynamicOfferUi": {
    "badges": [
      {
        "publisherBadgeId": "badge1",
        "badge": {
          "badgeId": "6548afb2ed7ec741ac8deeff",
          "publisherBadgeId": "badge1",
          "position": "right",
          "name": "test_badge",
          "type": "emblem",
          "emblem": {
            "imageUrl": "<string>"
          },
          "ribbon": {
            "text": "<string>",
            "backgroundColor": {
              "gradientDirection": "<string>",
              "colorOne": "<string>",
              "colorTwo": "<string>"
            },
            "textColor": {
              "gradientDirection": "<string>",
              "colorOne": "<string>",
              "colorTwo": "<string>"
            }
          }
        }
      }
    ],
    "salePercentage": 123,
    "salePercentageDisplayType": "<string>"
  },
  "active": "true",
  "startOver": true,
  "showAfter": "<string>",
  "triggers": [
    {
      "type": "event",
      "eventName": "purchase",
      "every": 123,
      "rules": [
        {
          "fieldName": "publisherOfferId",
          "operator": "in",
          "value": [
            "<string>"
          ]
        }
      ]
    }
  ],
  "segments": "NewUser",
  "productsSequence": [
    {
      "index": 1,
      "playerAvailability": 2,
      "priceInUsdCents": 300,
      "products": [
        {
          "quantity": 500,
          "publisherProductId": "product1"
        }
      ]
    }
  ]
}'
{
  "offerId": "655dc8a546822b3e7586b7b7",
  "publisherOfferId": "offer1",
  "name": "Test_popup",
  "displayName": "<string>",
  "description": "N/A",
  "type": "Popup",
  "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"
      }
    }
  },
  "dynamicOfferUi": {
    "badges": [
      {
        "publisherBadgeId": "badge1",
        "badge": {
          "badgeId": "6548afb2ed7ec741ac8deeff",
          "publisherBadgeId": "badge1",
          "position": "right",
          "name": "test_badge",
          "type": "emblem",
          "emblem": {
            "imageUrl": "<string>"
          },
          "ribbon": {
            "text": "<string>",
            "backgroundColor": {
              "gradientDirection": "<string>",
              "colorOne": "<string>",
              "colorTwo": "<string>"
            },
            "textColor": {
              "gradientDirection": "<string>",
              "colorOne": "<string>",
              "colorTwo": "<string>"
            }
          }
        }
      }
    ],
    "salePercentage": 123,
    "salePercentageDisplayType": "<string>"
  },
  "active": "true",
  "coolDownInHours": "1",
  "segments": "[NewUser]",
  "productsSequence": [
    {
      "index": 1,
      "playerAvailability": 2,
      "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>",
  "triggers": [
    {
      "type": "<string>",
      "eventName": "<string>",
      "every": 123,
      "rules": [
        "<any>"
      ]
    }
  ],
  "createdAt": "2023-07-05T12:01:06.113Z",
  "updatedAt": "2023-07-05T12:01:06.113Z"
}

Headers

x-publisher-token
string
required

The publisher token

Path Parameters

offerSKU
string
required

The publisher Id of the offer.

Body

application/json
publisherOfferId
string

The new Id of the offer.

Example:

"Test_Popup_New"

name
string

The name of the offer. At least 3 letters.

Example:

"Test_Popup"

displayName
string

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

description
string

The description of the offer.

Example:

"Best offer ever."

offerUiId
string

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. This must correspond with the type of offer you configure. In this case "Popup".

Example:

"64a55b82e06998282d3d9b59"

offerExternalUiId
string

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

Example:

"b9c1e7a3d1f8b2a4c6e5d8f3"

dynamicOfferUi
object

UI element that can be configured dynamically.

active
boolean

Is the offer active? true/false.

Example:

"true"

startOver
boolean

Popup will repeat itself.

showAfter
string

Optional values: "login", "purchase"

triggers
object[]

An array of objects specifying the conditions under which the popup should be triggered.

segments
string[]

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

Example:

"NewUser"

productsSequence
object[]

Relevant only for rolling offers, for any other offer (store tile, single promotion) report all products under sequence ‘1’

Response

Update Offer by Id

offerId
string

The Id of the offer.

Example:

"655dc8a546822b3e7586b7b7"

publisherOfferId
string

The offer publisher 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.

description
string

The description of the offer. Conditionally returned.

Example:

"N/A"

type
string

The type of the offer. In this case "Popup"

Example:

"Popup"

createdBy
string

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

Example:

"API"

offerUi
object
dynamicOfferUi
object

UI element that can be configured dynamically.

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

Will the popup repeat itself?

priority
number

The priority of the PopUp.

showAfter
string

Either "login" or "purchase"

triggers
object[]

An array of objects specifying the conditions under which the popup should be triggered.

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