Dynamic API

The Dynamic API in the Perkox dashboard is designed to be called by the client (e.g., a user’s device) to retrieve offers tailored to a specific user. This API provides flexibility in visualizing offers based on the user’s progress and preferences. Below is a breakdown of the components and functionality:


1. Dynamic API Overview

This section provides an overview of the Dynamic API and its purpose.

Key Points:

  • Purpose: The Dynamic API returns a list of offers tailored to a specific user based on their progress and preferences.

  • Usage: It is called by the client (e.g., a user’s device) to retrieve personalized offers.


2. API Endpoint

The endpoint for the Dynamic API is provided, along with instructions on how to use it.

Endpoint:

Copy

https://pub.perkox.com/api/v2/dynamic?key=<API_KEY>

Parameters:

  • key: Your API key for authentication.

  • ip: The IP address of the user (e.g., 127.0.0.1).

  • ua: The user agent string of the user’s device (e.g., Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36).

  • per_page: Number of offers to return per page (e.g., per_page=100).

  • page: Page number to retrieve (e.g., page=1).

Example API Call:

Copy

https://pub.perkox.com/api/v2/dynamic?key=f5aa91c9-ff21-46a0-acce-0cc3a62ecee6&ip=127.0.0.1&ua=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36&per_page=100&page=1

1. Response Structure

The API response is structured as follows:

jsonCopy

{
  "success": true,
  "message": "Offers retrieved successfully",
  "data": {
    "current_page": 1,
    "data": [
    {
        "id": 10863,
        "name": "Puzzles & Conquest",
        "thumbnail": "https://main-p.agmcdn.com/offers/1157072-IjK3XgyP.jpg",
        "description": "Build a mighty kingdom, gather resources, explore the vast land & progress through levels of enemies by completing puzzles to attack and by drawing help from your heroes.",
        "requirements": "Reach the listed levels within 30 days.  New users only. You must click “Allow” if tracking permission is requested within the app. Confirms in 7 days",
        "model": "cpa",
        "payout": "0.00",
        "devices": [
          {
            "name": "iOS"
          }
        ],
        "categories": [
          {
            "name": "Gaming"
          }
        ],
        "link": "https://perkox.online/click?pub_id=10410&offer_id=10863",
        "preview": "https://apps.apple.com/us/app/puzzles-conquest/id1485209615",
        "events": [
          {
            "id": "73bcaa4a-130e-11ef-b9cd-069eb31df495",
            "name": "Install",
            "payout": "0.00"
          },
          {
            "id": "73bcbb70-130e-11ef-80d5-069eb31df495",
            "name": "Upgrade Castle to Level 10",
            "payout": "1.40"
          },
          {
            "id": "73bcc2e6-130e-11ef-a6b6-069eb31df495",
            "name": "Upgrade Castle to Level 15 within 4 days",
            "payout": "10.50"
          },
          {
            "id": "c8e673f2-8d75-11ef-a423-069eb31df495",
            "name": "Upgrade Castle to Level 17",
            "payout": "2.80"
          },
          {
            "id": "73bcca84-130e-11ef-b54c-069eb31df495",
            "name": "Upgrade Castle to Level 22",
            "payout": "8.40"
          },
          {
            "id": "73bcd222-130e-11ef-98af-069eb31df495",
            "name": "Upgrade Castle to Level 30",
            "payout": "49.00"
          },
          {
            "id": "73bce9ba-130e-11ef-b151-069eb31df495",
            "name": "Purchase",
            "payout": "2.80"
          },
          {
            "id": "d6090814-193b-11ef-8e45-069eb31df495",
            "name": "Buy Lucifer Deluxe Gift",
            "payout": "7.00"
          },
          {
            "id": "4dba27fc-8a7b-11ef-9183-069eb31df495",
            "name": "Buy Deluxe Summons to unlock awesome rewards",
            "payout": "3.50"
          },
          {
            "id": "02aac4b2-e7df-11ef-963c-069eb31df495",
            "name": "Upgrade Castle to Level 7",
            "payout": "0.42"
          },
          {
            "id": "02ab0c7e-e7df-11ef-ba71-069eb31df495",
            "name": "Buy Silver Weekly Card $4.99",
            "payout": "3.50"
          },
          {
            "id": "8d9d9594-f064-11ef-81c8-069eb31df495",
            "name": "Upgrade Castle to Any Level",
            "payout": "0.00"
          }
        ],
        "countries": [
          "US"
        ]

3. API Key

This section allows you to generate and manage your API key.

Steps to Generate API Key:

  1. Navigate to the API section.

  2. Click on Generate API Key.

  3. Use the generated key in your API calls for authentication.


4. API Documentation

This section provides access to detailed documentation for the Dynamic API.

Steps to Access Documentation:

  1. Navigate to the API section.

  2. Click on API Documentation to view detailed instructions and examples.


Why the Dynamic API Matters

  • Personalization: Retrieve offers tailored to a specific user based on their progress and preferences.

  • Flexibility: Visualize offers in a way that best suits your application or platform.

  • Integration: Seamlessly integrate personalized offers into your existing system.


Additional Notes

  • Authentication: Ensure you use the correct API key for authentication.

  • Pagination: Use the per_page and page parameters to manage large datasets and retrieve specific pages of offers.

  • Testing: Test the API calls to ensure they return the expected data.

Last updated