Welcome to Monetizr Documentation!

Here you will find a comprehensive technical guide
to help you get started with Monetizr SDKs, Plugins,
API reference guide and Console.

Get Started    API Reference

Creating an Offer View

Display products in your game and offer them to players

šŸ“˜

Steps described on this page assume that you have followed previous steps and connected to API .

Step 3: Request offer information

Once you've connected with your API token you can request information about all available products. You can also request a specific product by its tag using cURL or any other REST API client.

curl --request GET \
  --url https://api3.themonetizr.com/api/products \
  --header 'accept: application/json' \
  --header 'authorization: Bearer < accecc token >'
curl --request GET \
  --url https://api3.themonetizr.com/api/products/your_product_1 \
  --header 'accept: application/json' \
  --header 'authorization: Bearer < access token >'

Step 4: Create a list of offers

The product list view is useful if you want to display more than one offer to the player. A common use case for it is listing multiple products in offers with thumbnail pictures and few description details and letting players click on them to get more details (see step 6).

Offer list view example using Monetizr iOS SDK.

The product list contains basic information about each offer. All available details including is_active status are managed through Console. It is up to you to decide how to use this status. Note that the person who will manage applets will be able to disable the applet which will result in is_active: false.

If you're interested in receiving more details within list view callback please contact [email protected].

[
    {
        "name": "T-shirt",
        "product_tag": "T-shirt",
        "is_active": true,
        "claimable": false,
        "product_thumbnail": "https://cdn.shopify.com/s/files/1/0330/7788/7116/products/Shirt-1_a7e28dd7-bfe1-47f7-8a7a-42dc77b5d034.jpg?v=1581433797&width=200"
    },
    {
        "name": "Pin",
        "product_tag": "Pin",
        "is_active": true,
        "claimable": false,
        "product_thumbnail": "https://cdn.shopify.com/s/files/1/0330/7788/7116/products/Shirt-1_a7e28dd7-bfe1-47f7-8a7a-42dc77b5d034.jpg?v=1581433797&width=200"

    },
]

We encourage you to proceed with Step 6 and create a custom Offer View in your game. But you also have an option to use pre-built webview. It is the quickest way to integrate Monetizr in your app and is best suited for games where opening a web page would not brake the player experience.


Step 5: Create Offer View for the player

To create an Offer view and dynamically display details about the product you need to request full product information: https://api3.themonetizr.com/api/products/your_product_1. The callback will include all parameters configured for the selected product. See /api/products/{tag}.

Request for a specific product will provide you details to build an Offer View that can look like this:

Offer View example.

A response example for product request:

{
  "data": {
    "productByHandle": {
      "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0LzQ1Mzg0NjgyMDQ2ODQ=",
      "title": "T-shirt",
      "description": "This is the t-shirt. The beginning of your badge-of-honor game merchandise. A reward for the best players, enticement for undecided and holly grail for those just starting their path to greatness in your game. Hide Easter eggs inside the shirt. Use them to unlock exclusive levels or new game characters. Bring your players straight back to the game. šŸ‘• 100% combed cotton shirt šŸ‘ Ethically sourced šŸ„³ Sizes XS - XXXL šŸ· Customizable inside label, sewn on outside labels, all over print t-shirt šŸ’ø Base cost from $14 for a regular shirt and $27 all-over shirts. Discounts on bulk orders.",
      "descriptionHtml": "",
      "availableForSale": true,
      "onlineStoreUrl": "https://my-game-gear.myshopify.com/products/4334233321538",
      "options": [
        {
          "name": "Size",
          "values": [
            "X-Small (XS)",
            "Small (S)",
            "Medium (M)",
            "Large (L)",
            "X-Large (XL)",
            "2X-Large (XXL)",
            "3X-Large (XXXL)"
          ]
        },
        {
          "name": "Fit",
          "values": [
            "Men",
            "Women"
          ]
        }
      ],
      "images": {
        "edges": [
          {
            "node": {
              "transformedSrc": "https://cdn.shopify.com/s/files/1/0330/7788/7116/products/Shirt-1_a7e28dd7-bfe1-47f7-8a7a-42dc77b5d034_350x350.jpg?v=1581433797"
            }
          },
          {
            "node": {
              "transformedSrc": "https://cdn.shopify.com/s/files/1/0330/7788/7116/products/Shirt-2_0721a569-cdc1-494c-935c-10f42bcfa011_350x350.jpg?v=1581433797"
            }
          },
          {
            "node": {
              "transformedSrc": "https://cdn.shopify.com/s/files/1/0330/7788/7116/products/Shirt-2_350x350.jpg?v=1581433797"
            }
          }
        ]
      },
      "variants": {
        "edges": [
          {
            "node": {
              "id": "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC8zMjA5OTY4NTEwNTgwNA==",
              "product": {
                "title": "T-shirt",
                "description": "This is the t-shirt. The beginning of your badge-of-honor game merchandise. A reward for the best players, enticement for undecided and holly grail for those just starting their path to greatness in your game. Hide Easter eggs inside the shirt. Use them to unlock exclusive levels or new game characters. Bring your players straight back to the game. šŸ‘• 100% combed cotton shirt šŸ‘ Ethically sourced šŸ„³ Sizes XS - XXXL šŸ· Customizable inside label, sewn on outside labels, all over print t-shirt šŸ’ø Base cost from $14 for a regular shirt and $27 all-over shirts. Discounts on bulk orders.",
                "descriptionHtml": "",
                "description_ios": ""
              },
              "title": "X-Small (XS) / Men",
              "selectedOptions": [
                {
                  "name": "Size",
                  "value": "X-Small (XS)"
                },
                {
                  "name": "Fit",
                  "value": "Men"
                }
              ],
              "priceV2": {
                "currencyCode": "$",
                "amount": "22.99",
                "currency": "USD"
              },
              "compareAtPriceV2": {
                "currencyCode": "USD",
                "amount": "27.0"
              },
              "image": {
                "transformedSrc": "https://cdn.shopify.com/s/files/1/0330/7788/7116/products/Shirt-2_0721a569-cdc1-494c-935c-10f42bcfa011_350x350.jpg?v=1581433797"
              }
            }
          }
        ]
      },
      "description_ios": "\nThis is the t-shirt. The beginning of your badge-of-honor game merchandise. A reward for the best players, enticement for undecided and holly grail for those just starting their path to greatness in your game. \n \nHide Easter eggs inside the shirt. Use them to unlock exclusive levels or new game characters. Bring your players straight back to the game. \n \nšŸ‘• 100% combed cotton shirt\nšŸ‘ Ethically sourced\nšŸ„³ Sizes XS - XXXL\nšŸ· Customizable inside label, sewn on outside labels, all over print t-shirt\nšŸ’ø Base cost from $14 for a regular shirt and $27 all-over shirts. Discounts on bulk orders. ",
      "button_title": "Checkout",
      "claimable": false
    }
  }
}

Create product option selectors

When a product is created a few parameters are determined at the creation process. These parameters are called product options. For example: "Fit": "Female", "Color": "Blue", "Size": "Medium" are product options. Combined together they create a single variant of a product. One product can have multiple variants i.e. different sets of options. When a player orders a product s/he actually orders a pre-defined variant of a product even though during the order process the options can dynamically be selected by the player.

Every product request response contains 'options' array with all available options. There can be a maximum of 3 options per product. Each option can have multiple choices i.e. an array. For example in the case of a T-Shirt, the options would contain: "Size", "Fit", "Color". Option array specifies what exactly is available within the option.

Example: "Fit" => ["Male", "Female"], "Size" => ["Medium", "Small", "Large"], "Color" => ["Black", "White", "Blue"].

To determine what options are linked with a specific product the "selectedOptions" array must be used. Know that not all combinations of options will always be available for the product. There might be a situation where T-shirt variant with "Female", "Medium", "Blue" options might not be available for sale. You need to check for product variant availability and then offer product variants to the player.

ā—ļø

Options are text values and can be changed from Monetizr Console so they should not be hardcoded.

Updated 6 months ago



Creating an Offer View


Display products in your game and offer them to players

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.