Publishers API
- 1 1. Get started
- 2 2.1. Search for the Offers (include tracking links)
- 3 2.2. Get Offer details
- 4 2.3. Get Offers list
- 5 2.4. Get conversions report
- 6 2.5. Search offers by domain
- 7 2.6. Apply to the Offer
- 8 3.1. Get coupons
- 9 4.1. Get publisher's sources types
- 10 4.2 Get a list of the publisher's sources
- 11 4.3 Get or create a tracking link
- 12 5 Feeds
- 13 5.1 Fetch possible offer list to generate feeds.
- 14 5.2 Generate feed
Updated:
1. Get started
API token can be retrieved on the “Account->Api Settings” page.
You can add token in two ways:
– through GET parameter ?token=yourtoken
– through Authorization Header Bearer {yourtoken}
2) Routes
The main route of all requests:
2.1. Search for the Offers (include tracking links)
Desc: This API method provides the ability to filter offers by type, category, status, geo, and keyword. Also, it allows getting tracking links included in the response if source_id would be provided. Please take note that the response doesn't contain data about offer visibility and application status to the offers with "need approval" visibility, "2.3. Get Offers list" should be used in case information about the offer visibility and application status is required.
API Users should also take note of the errors returned by the API in the data.*.tracking_link response field.
Route: /getOffers
Type: GET
Update 30/03/2023: fixed a bug with the returned list of campaigns if there was no filtering by status. Previously all campaigns were returned by default, but now the API method will return only active ones.
Name | Values | Description | Example | Required |
type | cps, cpa, cpi | type=cps | No | |
category | filter by category name | category=nameOfCategory | No | |
status | inactive, all, active | Offer status. The default value is active | No | |
search | Search by offer title, offer description and offer URL. | No | ||
geo | geo of ISO 3166-1 alpha-2 format https://gist.github.com/vxnick/380904 Set GEOs by comma | geo=AI,AF | No | |
limit | int, min:1, max:100, default:25 | Limit set number of offers in response | limit=25 | No |
page | int | Page in the total amount of response results | page=5 | No |
overage | true,false | filter by overage CAP | overage=true | No |
source_id | int | source_id could be taken from the list of sources in the platform or using "4.2 Get a list of the publisher's sources" API method. It is required to get tracking links in response | source_id=1232 | No |
Response fields:
Name | Values | Description |
status | success, error | Request status |
message | Success or error message | |
count | Number of results in response (in data array) | |
totalCount | Number of total results | |
totalPages | Number of available pages (according to used limit value) | |
page | Current page number | |
data | List of offers | |
data.*.id | Offer id | |
data.*.website_url | Offer website preview link | |
data.*.status | Offer status | |
data.*.category | Offer category | |
data.*.category.name | Offer category name | |
data.*.geo | Countries, in which this offer is available | |
*source_id required to get tracking link Tracking link or error message if something went wrong. Errors list:
| ||
data.*.type | Offer types | |
data.*.payout | Offer payout description | |
data.*.short_payout | Offer short payout description | |
data.*.hold_period | Hold periods. Number of days | |
data.*.cookie_lifetime | Cookie lifetime in days | |
data.*.deeplink | true/false | offer deeplink |
data.*.hold_period | hold period | |
data.*.cookie_lifetime | cookie lifetime | |
data.*.cookie_lifetime_is_hours | true/false | Determine if the cookie lifetime is in hours (true) or not (false) |
data.*.traffic_restrictions | Offer traffic restriction | |
data.*.traffic_restrictions.*.name | Traffic restriction name | |
data.*.traffic_restrictions.*.status | allowed, forbiden, need approval | Traffic restriction status |
data.*.logo | Offer logo link | |
data.*.banners | List of offer banners | |
data.*.banners.*.size | Banner size (e.g. "100-120" => width 100px, height 120px) | |
data.*.banners.*.file | Banner file name | |
data.*.banners.*.link | Banner download link | |
data.*.landing_pages | List of offer landing pages | |
data.*.landing_pages.*.id | Landing page id | |
data.*.landing_pages.*.title | Landing page title (name) | |
data.*.landing_pages.*.preview_url | Landing page URL |
2.2. Get Offer details
Route: /getOffer/{id}?source_id={source_id}
Type: GET
Parameters:
Name | Values | Description | Example | Required |
id | int | Offer id | Yes | |
source_id | int | source_id could be taken from the list of sources in the platform or using "4.2 Get a list of the publisher's sources" API method. It is required to get tracking links in response | source_id=1232 | No |
Response Fields:
Name | Values | Description |
id | offer id | |
status | offer status | |
website_url | Offer website preview link | |
status | Offer status | |
category | Offer category | |
geo | Countries, in which this offer is available | |
tracking_link | *source_id required to get tracking link Tracking link or error message if something went wrong. Errors list:
| |
type | Offer types | |
deeplink | true/false | offer deeplink |
hold_period | hold period | |
cookie_lifetime | cookie lifetime | |
traffic_restrictions | traffic names | |
logo | Offer logo link | |
banners | banners | |
landing_pages | landing pages |
2.3. Get Offers list
Desc: The API method will provide an offers list with information about the users application status for said offers. When the offer visibility returned is “need approval” then the additional fields applied
, allowed
, and rejected
will be listed in response. These Boolean fields indicate the status of the user application. Find more detail here in the fields description .
Route: /offers
Type: GET
Parameters:
Name | Values | Description | Example | Required |
page | int | Page in total amount of response results | page=5 | No |
Response fields:
Name | Values | Description |
total | Number of total offers | |
per_page | Number of data limit in one page | |
current_page | Number of current page | |
last_page | Number of last page | |
first_page_url | URL for first page | |
last_page_url | URL for last page | |
next_page_url | URL for next page | |
prev_page_url | URL for previous page | |
path | Path of URL | |
from | Number of first data in current page | |
to | Number of last data in current page | |
data | List of offers | |
data.title | offer name | |
data.type | cps, cpl, etc. | |
data.deleted_at | ||
data.id_thumbnail | ||
data.advertiser_id | ||
data.geo | ||
data.short_payout | ||
data.preview_url | ||
data.cr | conversions rate | |
data.category_id | ||
data.created_at | ||
data.overage |
|
|
data.visibility | active, need approval, private, testing | Offer visibility rules: private - private offer, available for particular publishers only. testing - an offer that is used for testing or it’s integration with Indoleads is in progress. |
bool | * Used only if visibility is ‘need approval' | |
data.applied | bool | * Used only if visibility is 'need approval' The field has TRUE If Publisher applied to the offer and the application is pending, FALSE - if application was approved, rejected or doesn’t exists. |
data.rejected | bool | * Used only if visibility is 'need approval' The field has TRUE If Publisher`s application to the offer was rejected, FALSE - if publisher doesn’t applied to the offer or the application is pending or approved. |
data.blocked | bool | Displays if user was banned for using the offer. |
data.active | bool | |
data.advertiser | ||
data.traffic_restrictions | ||
data.caps |
Example:
Request:curl -H 'Accept: application/json' -H "Authorization: Bearer ${TOKEN}" https://app.indoleads.com/api/offers
Response:
{
"current_page": 1,
"data": [
{
"id": 3,
"title": "Zalora Hong Kong",
"type": "cps",
"deleted_at": null,
"id_thumbnail": "3_5a685fc227207.jpg",
"advertiser_id": "59d23374b6920d0dc868ce3e",
"geo": "HK",
"short_payout": "HKD160; 6%",
"preview_url": "https:\/\/www.zalora.com.hk",
"cr": 0.04,
"category_id": 60,
"created_at": "2018-04-03 07:05:50",
"visibility": "need approval",
"overage": 0,
"allowed": false,
"applied": true,
"rejected": false,
"blocked": false,
"active": true,
"advertiser": {
"id": "59d23374b6920d0dc868ce3e",
"name": "-",
"active": true
},
"traffic_restrictions": [
{
"id": 1,
"name": "Paid search (Brand)",
"description": "Google Adwords, Yandex Direct, Bing Ads and usage of \"branded\" keywords",
"created_at": "2018-04-17 05:34:12",
"updated_at": "2018-11-22 21:56:16",
"network_id": 3,
"status": "forbidden"
},
{
"id": 2,
"name": "PPC (not search)",
"description": "Adwords, Yandex Direct, Bing ads. Without usage of branded keywords",
"created_at": "2018-04-17 05:34:21",
"updated_at": "2018-11-22 22:10:53",
"network_id": 3,
"status": "allow"
},
{
"id": 3,
"name": "SEO",
"description": "websites-satellites, doorways, landing pages",
"created_at": "2018-04-17 05:34:36",
"updated_at": "2018-11-22 21:59:44",
"network_id": 3,
"status": "need approval"
},
...
],
"caps": []
},
{
"id": 47,
"title": "Chic Me - World",
"type": "cps",
"deleted_at": null,
"id_thumbnail": "47_c69529f75ef9b.png",
"advertiser_id": "5a54be18b6920d7eaa5ffec0",
"geo": "ALL",
"short_payout": "13%",
"preview_url": "https:\/\/www.chicme.com\/",
"cr": 0.3,
"category_id": 516,
"created_at": "2018-04-03 07:06:20",
"visibility": "active",
"overage": 0,
"blocked": false,
"active": true,
"advertiser": {
"id": "5a54be18b6920d7eaa5ffec0",
"name": "-",
"active": true
},
"traffic_restrictions": [...],
"caps": []
},
...
],
"first_page_url": "https:\/\/app.indoleads.com\/api\/offers?page=1",
"from": 1,
"last_page": 336,
"last_page_url": "https:\/\/app.indoleads.com\/api\/offers?page=336",
"next_page_url": "https:\/\/ap.indoleads.com\/api\/offers?page=2",
"path": "https:\/\/app.indoleads.com\/api\/offers",
"per_page": 10,
"prev_page_url": null,
"to": 10,
"total": 3351
}
2.4. Get conversions report
Route: /conversions
Type: GET
Parameters:
Name | Values | Description | Example | Required |
startDate | Start date filter format 2018-07-27 | startDate=2018-07-27 | Yes | |
endDate | End date filter format 2018-07-27 | endDate=2018-07-27 | Yes | |
limit | Conversion limit for one request Default limit is 1000 conversions max limit is 1000 min limit is 1 | limit=300 | No | |
page | if count of conversions are more than your Limit use page | page=2 | No | |
ConversionId | Get only by this parameter | No | ||
ClickId | Get only by this parameter | No | ||
status | pending, declined, approved, overaged, paid | No | ||
offer | Filter by offers, set offer ides by comma | offer=1,2,3 | No |
Response Fields:
Name | Values | Description |
status | Enum: error | Request processing status |
message | string | Error message |
count | integer | Numer of conversions in response |
data | array | List of conversions. Each item inside of the data list represents Conversion instance |
data.*.conversion_id | UUID | Conversion ID |
data.*.offer_id | integer | Offer ID / Campaign ID |
data.*.date | string | Conversion date (in YYYY-MM-DD format) |
data.*.status | Enum: | Conversion status |
data.*.created | integer | Conversion created date timestamp |
data.*.currency | string, | Conversion currency |
data.*.payout | float | Payout, publisher`s reward |
data.*.payout_usd | float | Payout reward converted to the USD |
data.*.sale_amount | float | Order amount |
data.*.offer_title | string |