SaaS API Document
For Publisher
Offline / Static (Server-to-Server) CPI Campaign API
1. Introduction
This document introduces the looopgame API (hereinafter referred to as the API). Advanced partners can retrieve campaign information by calling the API. The looopgame API is built on the HTTP protocol and uses GET / POST methods to obtain the response content.
To call our API, please contact your account manager to obtain your API Key for authentication. Since anyone with the API Key can conduct API requests on your account’s behalf, please keep your API Key confidential.
2. Objective
This document provides directions on how to access looopgame’s offline / static (server-to-server) CPI campaign API.
- The results of this call need to be cached in your back-end server and may not be included directly in any front-end applications.
- If a campaign is deactivated, it will be removed from this feed without further notice.
- We recommend updating offers every 10–15 minutes to ensure you are getting the latest campaigns. Please do not update more often than every 5 minutes.
Please note, you will have to keep track of rules and restrictions.
3. API Request Format
Access to looopgame’s offline API is via HTTP GET using the following URL:
http://api.looopgame.net/get_campaigns?publisher_id={publisher_id}&access_token={access_token}Please contact your account manager to obtain your token.
Example Request (cURL)
curl -G "http://api.looopgame.net/get_campaigns" \ --data-urlencode "publisher_id=1000041" \ --data-urlencode "access_token=YOUR_ACCESS_TOKEN" \ --data-urlencode "geo=us" \ --data-urlencode "fields=event,click_cap"
Request Parameters
| Parameter | Description | Type | Mandatory |
|---|---|---|---|
token | Publisher security identification | String | Yes |
publisher_id | Publisher identification | Int | Yes |
platform | App / Web | String | No |
geo | 2-letter ISO country code; leave blank to return all | String | No |
fields | fields=click_cap: displays click cap for each campaign. fields=event: shows target event for each campaign. Example: fields=event,click_cap,multi_event | String | No |
multi_event | fields=multi_event | String | No |
4. API Response
The API returns a JSON object describing the available campaigns.
Example Response (JSON)
{
"status": 200,
"total": 1,
"payout_type": "CPI",
"platform": "ANDROID",
"deviceid_must": "GAID",
"min_os_version": "4.1",
"geo": ["us"],
"campaigns": [
{
"name": "Uber",
"package": "com.ubercab",
"payout": 2.5,
"cap": 500,
"tracking_url": "http://go.looopgame.net/?campaign_id=3943876&publisher_id=1000041",
"impression_url": "",
"preview_url": "",
"icon_url": "",
"event": "install",
"click_cap": 10000
}
]
}Response Fields
| Parameter | Description | Type | Example |
|---|---|---|---|
total | Amount of campaigns | Int | 1 |
status | Status | Int | 200 |
payout_type | Campaign conversion type | String | CPI |
platform | Android | String | ANDROID / IOS |
deviceid_must | Device ID needed from click URL | String | GAID / IDFA |
min_os_version | Minimum allowed OS version for payment by advertiser | String | 4.1 |
geo | Target country | Array | ['in', 'us'] |
tracking_url | Click tracking URL | String | — |
impression_url | Fire the impression URL when an ad is shown to the audience | String | — |
payout | Campaign payout for publisher | Float | 2.5 |
name | Campaign name | String | Uber |
package | Campaign package ID | String | com.ubercab |
cap | Campaign cap (install) | String | 500 |
preview_url | Preview URL | String | — |
icon_url | Icon URL | String | — |
5. Tracking URL
The click URL contains a number of parameters that must be replaced with relevant values:
http://go.looopgame.net/?campaign_id={campaign_id}&publisher_id={publisher_id}You can append more parameters for your tracking purposes:
Eg: http://go.looopgame.net/?campaign_id=3943876&publisher_id=1000041&channel={your_sub_id}&clickid={your_click_id}Supported Macros
| Macro | Description |
|---|---|
clickid | Click ID |
site | Source traffic package name |
channel | Channel ID |
sub_1 | Custom value sub_1 |
sub_2 | Custom value sub_2 |
sub_3 | Custom value sub_3 |
gaid | Google Advertising ID (GAID) |
idfa | Identifier for Advertisers (IDFA) |
android_id | Android ID |
ip | IP address of the user |
lang | Language (example: en-US, en) |
ua | User agent (URL encoded), e.g. Mozilla%2F5.0+%28iPhone%3B+CPU+iPhone+OS+13_3_1+like+Mac+OS+X%29 |
6. Postback URL
You can contact your account manager to set up the global postback.
Example
http://receive.looopgame.net?clickid={CLICKID}&payout={PAYOUT}Supported Macros
| Macro | Description |
|---|---|
{CLICKID} | Unique click identifier passed in the tracking URL |
{PAYOUT} | Payout amount for the conversion |
{SITE} | Source traffic package name |
{CHANNEL} | Channel ID |
{SUB_CHANNEL} | Sub-channel value |
{SUB_1} | Custom value sub_1 |
{SUB_2} | Custom value sub_2 |
{SUB_3} | Custom value sub_3 |
{IP} | User IP address |
{UA} | URL-encoded user agent |
{LANG} | User language |