v1

latestOpenAPI 3.1.02026-07-2665153355.3 KB
Personalization

Sync player information

<Note> This is a callback API. Appcharge calls this endpoint on your server when specific events occur. </Note>

Notifies your system to personalize the web store for a player. <br /> <br /> Appcharge calls this endpoint when: <ul><li>A player logs in to your web store.</li><li>A player completes a purchase.</li><li>Every 5 minutes after the player’s last sync.</li></ul> Your server responds with the most current player data and all available offers for the player. Appcharge then updates the web store for the player accordingly.

post/{YOUR_PERSONALIZE_WEBSTORE_ENDPOINT}

Headers

x-publisher-tokenstring

Publisher token.

signaturestring

The signed payload.

Request body

playerIdstring

Player ID (the same value as the publisherPlayerId property returned in the Authenticate Player Callback).

Response

Successful operation

versioninteger

The used version. In this case, the value is ‘2’

logostring

Logo ID provided when a file is uploaded to the Assets Library. Use this to display a logo in your web store.

status'valid' | 'invalid' required

Web store personalization request status.

sessionMetadataobject required

Container for storing any pertinent information related to the player's session. If enabled, this is sent back in the Grant Award Callback as well.

profileFrameIdstring

Corresponds to the profile frame picture ID uploaded to the asset library in Appcharge's dashboard. Displayed above the player's profile picture.

playerLevelNamestring

Aligns with the player level picture name/ID uploaded to the asset library in Appcharge's dashboard. Displayed alongside the footer.

bannerExternalIdstring

Aligns with the banner asset ID uploaded to the asset library in Appcharge’s dashboard. Displayed at the top of the screen.

offersOrder'publisherOrder' | 'priceHighToLow' | 'priceLowToHigh'

Defines the order of offers.

sectionsOrderstring[]

An array of publisher’s section ids that defines the order of sections for the store.

segmentsstring[]

The list of segments associated with the player.

attributesobject

A set of custom key-value pairs that you can define to tag players for segmentation and A/B testing. These attributes can then be used to filter players in the Publisher Dashboard.

Example: { "BF_test": "test", "monetization_persona": "non_payer" }

Example response

{
  "version": 2,
  "logo": "MY_LOGO_ASSET_ID",
  "status": "valid",
  "profileFrameId": "profileFrame123",
  "playerLevelName": "playerLevelName",
  "bannerExternalId": "playerLevelAssetId",
  "playerLevel": {
    "assetId": "playerLevel1",
    "text": "10%",
    "endsIn": 1728283121000
  },
  "focus": {
    "publisherBundleId": "bundle123"
  },
  "storeTheme": {
    "bgImageMobile": "mobile_bg_2",
    "bgImageDesktop": "desktop_bg_2",
    "logo": "store_logo_2",
    "profileFrameImage": "profile_frame_2",
    "bannerImage": "banner_2",
    "playerLevelImage": "player_level_2"
  },
  "balances": [
    {
      "publisherProductId": "product123",
      "quantity": 5
    }
  ],
  "offers": [
    {
      "publisherOfferId": "offer123",
      "priceDiscount": {
        "priceBeforeDiscount": 100,
        "discount": 20,
        "type": "percentage"
      },
      "badges": [
        {
          "publisherBadgeId": "badge123",
          "position": "center"
        }
      ],
      "dynamicOfferUi": {
        "badges": [
          {
            "publisherBadgeId": "badge123",
            "position": "center"
          }
        ]
      },
      "productsSequence": [
        {
          "priceDiscount": {
            "priceBeforeDiscount": 100,
            "discount": 20,
            "type": "percentage"
          },
          "badges": [
            {
              "publisherBadgeId": "badge123",
              "position": "center"
            }
          ],
          "progressBarPoints": [
            {
              "publisherBarId": "progress-bar-1",
              "points": 1000
            }
          ],
          "products": [
            {
              "publisherProductId": "product123",
              "quantity": 2,
              "traits": [
                {
                  "assetId": "burn_damage_icon",
                  "text": "Burn Damage"
                }
              ],
              "rarityProductInfo": {
                "stars": 5,
                "tooltip": [
                  {
                    "sectionName": "Special Offers",
                    "products": [
                      {
                        "publisherProductId": "Coin",
                        "text": "20%"
                      }
                    ]
                  }
                ]
              }
            }
          ]
        }
      ]
    }
  ]
}