Static API
The Static API in the Perkox dashboard is designed to be called by a backend or server to retrieve a list of all currently available offers. This API can be used to extend your existing offer inventory or build your own offer system. Below is a breakdown of the components and functionality:
1. Static API Overview
This section provides an overview of the Static API and its purpose.
Key Points:
Purpose: The Static API returns a list of all currently available offers.
Usage: It can be called by a backend or server to extend your existing offer inventory or build your own offer system.
2. API Endpoint
The endpoint for the Static API is provided, along with instructions on how to use it.
Endpoint:
Copy
https://pub.perkox.com/api/v2/static?key=<API_KEY>
Parameters:
key: Your API key for authentication.
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/static?key=<API_KEY>&per_page=100&page=1
3. API Key
This section allows you to generate and manage your API key.
Steps to Generate API Key:
Navigate to the API section.
Click on Generate API Key.
Use the generated key in your API calls for authentication.
4. API Documentation
This section provides access to detailed documentation for the Static API.
Steps to Access Documentation:
Navigate to the API section.
Click on API Documentation to view detailed instructions and examples.
Response Structure
The API response is structured as follows:
jsonCopy
{
"success": true,
"message": "Offers retrieved successfully",
"data": {
"current_page": 1,
"data": [
{
"id": 10838,
"name": "Monopoly Go!",
"thumbnail": "https://main-p.agmcdn.com/offers/671310-fNakBu7Y.jpg",
"description": "Hit GO! Roll the dice! Interact with your friends, family members and fellow Tycoons from around the world as you explore the expanding universe of MONOPOLY GO! It’s the new way to play - board flipping cleanup not required!",
"requirements": "Hint: in-app purchases help you complete levels faster. Must be installing Monopoly Go for the first time to receive rewards. Award will pend for 10 days. You must complete goals within 30 days of installing to receive Up to 0. Confirms in 10 days",
"model": "cpa",
"payout": "0.00",
"devices": [
{
"name": "Android"
}
],
"categories": [
{
"name": "Gaming"
}
],
"link": "https://perkox.online/click?pub_id=10410&offer_id=10838",
"preview": "https://play.google.com/store/apps/details?id=com.scopely.monopolygo",
"events": [
{
"id": "1517604e-2812-11ee-ad62-069eb31df495",
"name": "Install",
"payout": "0.00"
},
{
"id": "15179500-2812-11ee-9d25-069eb31df495",
"name": "*BONUS REWARD: Reach Board 19 within 3 days",
"payout": "3.85"
},
{
"id": "33366360-57f4-11ee-9768-069eb31df495",
"name": "*BONUS REWARD: Reach Board 101 within 8 days",
"payout": "31.50"
},
{
"id": "15177ef8-2812-11ee-8edb-069eb31df495",
"name": "Reach Board 5",
"payout": "0.15"
},
{
"id": "15178e02-2812-11ee-8542-069eb31df495",
"name": "Reach Board 12",
"payout": "0.48"
},
{
"id": "1517a342-2812-11ee-93ab-069eb31df495",
"name": "Reach Board 42",
"payout": "1.77"
},
{
"id": "0f1e4ede-57f4-11ee-9674-069eb31df495",
"name": "Reach Board 71",
"payout": "3.85"
},
{
"id": "09da87fe-0cb6-11ef-b920-069eb31df495",
"name": "Reach Board 126",
"payout": "3.50"
},
{
"id": "09db4f18-0cb6-11ef-9ccd-069eb31df495",
"name": "Reach Board 176",
"payout": "11.20"
},
{
"id": "09dbffda-0cb6-11ef-8472-069eb31df495",
"name": "Reach Board 251",
"payout": "38.50"
},
{
"id": "09dcaab6-0cb6-11ef-92e8-069eb31df495",
"name": "Reach Board 301",
"payout": "70.00"
},
{
"id": "8af359d8-df24-11ef-adea-069eb31df495",
"name": "Earn when you play at least 2 minutes daily!",
"payout": "0.01"
}
],
"countries": [
"AU"
]
}
2. Key Fields in the Response
Top-Level Fields:
success: Indicates whether the API call was successful (
true
orfalse
).message: A human-readable message describing the result (e.g., "Offers retrieved successfully").
data: Contains the actual data returned by the API.
Data Fields:
current_page: The current page number of the results (useful for pagination).
data: An array of offer objects.
3. Offer Object Structure
Each offer object contains the following fields:
Offer Details:
id: Unique identifier for the offer (e.g.,
10837
).name: Name of the offer (e.g., "Jackpotland").
thumbnail: URL of the offer’s thumbnail image.
description: A brief description of the offer.
requirements: Instructions or requirements for completing the offer.
payout: The base payout for the offer (e.g.,
"0.00"
).
Device Compatibility:
devices: An array of devices supported by the offer (e.g.,
iOS
).
Categories:
categories: An array of categories the offer belongs to (e.g.,
Casino & Gambling
).
Link:
link: The URL to access the offer.
Events:
events: An array of events or milestones associated with the offer. Each event includes:
id: Unique identifier for the event.
name: Name of the event (e.g., "Reach Level 150").
payout: The payout for completing the event.
4. Example Use Case
Retrieving and Displaying Offers:
Call the API:
Use the endpoint:
https://pub.perkox.com/api/v2/static?key=<API_KEY>&per_page=100&page=1
.Replace
<API_KEY>
with your actual API key.
Parse the Response:
Check the
success
field to ensure the API call was successful.Extract the
data
array to access the list of offers.
Display Offers:
Loop through the
data
array and display each offer’sname
,thumbnail
,description
, andpayout
.Use the
link
field to direct users to the offer.
Handle Events:
For each offer, display the available
events
and their correspondingpayouts
.
5. Pagination
Use the
per_page
andpage
parameters to retrieve specific pages of offers.Example:
https://pub.perkox.com/api/v2/static?key=<API_KEY>&per_page=100&page=1
retrieves the first 100 offers.
Why This Response Matters
Offer Management: Retrieve and display a list of available offers to users.
Event Tracking: Track and reward users for completing specific events or milestones.
Integration: Seamlessly integrate offers into your platform or application.
Why the Static API Matters
Offer Inventory: Retrieve a list of all available offers to extend your inventory.
Customization: Build your own offer system using the data provided by the API.
Integration: Seamlessly integrate offers into your existing backend or server.
Additional Notes
Authentication: Ensure you use the correct API key for authentication.
Pagination: Use the
per_page
andpage
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