Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 46 Next »


1. Get started

Api token can be retrieved on “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:

https://app.indoleads.com/api


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

Parameters:

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

data.*.tracking_link


*source_id required to get tracking link

Tracking link or error message if something went wrong.

Errors list:
error: source_id is required to get tracking link URL - in case if source_id is not provided or empty.

error: tracking links available only for publishers - if request is send by user with role different from publisher.

error: invalid source_id value provided - if provided source_id is not exists or related to the other account.

error: source type is restricted by offer rules - source type of the source provided in request is not listed in the Offer traffic restrictions rules.

error: source type is forbidden by offer rules - some offers may forbid different traffic sources. Please check the Offer traffic restrictions section to select the source correctly.

error: please apply to the offer to get tracking link - in case if the Offer has “need approval“ visibility, and application to the Offer is required to work with that Offer.

error: you application to the offer is pending - if publisher`s application to the offer is created but pending (awaiting for approval).

error: you application to the offer is rejected, contact to you manager to get details - if publishers`s application to use the Offer was rejected.

error: unknown problem, please contact support to get more details - unknown problem that requires investigation.

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


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:
error: source_id is required to get tracking link URL - in case if source_id is not provided or empty.

error: tracking links available only for publishers - if request is send by user with role different from publisher.

error: invalid source_id value provided - if provided source_id is not exists or related to the other account.

error: source type is restricted by offer rules - source type of the source provided in request is not listed in the Offer traffic restrictions rules.

error: source type is forbidden by offer rules - some offers may forbid different traffic sources. Please check the Offer traffic restrictions section to select the source correctly.

error: please apply to the offer to get tracking link - in case if the Offer has “need approval“ visibility, and application to the Offer is required to work with that Offer.

error: you application to the offer is pending - if publisher`s application to the offer is created but pending (awaiting for approval).

error: you application to the offer is rejected, contact to you manager to get details - if publishers`s application to use the Offer was rejected.

error: unknown problem, please contact support to get more details - unknown problem that requires investigation.

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:
active - visible for all.
need approval - publishers have to apply to the offer and get approval to use it. Application status is described in allowed, applied and rejected fields.

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.

data.allowed

bool

* Used only if visibility is ‘need approval'
The field has TRUE If Publisher`s application to the offer was approved, FALSE - if publisher doesn’t applied to the offer or his application is pending or rejected.

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


Fields:

Name

Values

Description

conversion_id


conversion id

offer_id


offer id

date


conversion date

status


conversion status

created


conversion created in timestamp

currency


conversion currency

payout


payout

payout_usd


payout usd

sale_amount


sale amount

offer_title


offer title

click_time


click time


2.5. Search offers by domain

Route: /search_offers

Type: GET


Parameters:

Name

Values

Description

domain


Filter offers by website URL. Required field 

url


Deep link that will be added to tracking link

p1


Custom parameter #1 that will be added to tracking link

p2


Custom parameter #2 that will be added to tracking link

p3


Custom parameter #3 that will be added to tracking link

p4


Custom parameter #4 that will be added to tracking link

publisherId


Only for network and advertiser roles. Sets publisher for offer tracking link

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 


Fields:

Name

Values

Description

id


Offer id

title


Offer title

preview_url


Offer website preview link

logo


Offer logo link

type

cps, cpa, cpi

Offer types

tracking_link


Offer tracking link, that should be placed for traffic generating

*source_id required

geo

Country codes

Countries, in which this offer is available


2.6. Apply to the Offer

Desc: This API method should be used by publishers to send applications to the Offer(s) with "need approval" visibility.

Route: /offers/{offerId}/apply

Type: POST


Parameters:

Name

Values

Description

Required

source

int

Identifier of publisher source

yes


Return status message of offer requesting.


3.1.  Get coupons

Route: /getCoupons

Type: GET


Fields:

Name

Values

Description

id


Offer id

short_description


Offer title

description


Offer website preview link

discount


Offer logo link

discount_type

percent,

Offer types

geo

Country codes


start_duration



end_duration



code



offer



offer.id



offer.title



offer.logo



offer.short_desc



offer.geo



offer.type



offer.payout




To receive tracking links for coupons via API, you must
1. Take the offer.id value from the getCoupons method (https://confluence.indoleads.com/display/PUB/API#API-3.1.Getcoupons), for example, 972
2. Use the getOffer method through the input of which to transfer the Id of the offer, for example, 972: https://app.indoleads.com/api/getOffer/972
3. Take a link from the tracking_link parameter


4.1. Get publisher's sources types

Route: /getPublisherSourcesTypes/{publisher_id}

Type: GET

Parameters:

Name

Values

Description

Example

Required

publisher_id


Publisher id


Yes


Response fields:

Name

Values

Description

status

success, error

Request status

message


Empty or error message

count


Number of results in response (in data array)

data


List of source types

data.*.id


Offer id

data.*.name


Source type title


Possible source types and its ids:

id

title

description

1

Paid search (Brand)

Google Adwords, Yandex Direct, Bing Ads and usage of "branded" keywords

2

PPC (not search)

Adwords, Yandex Direct, Bing ads. Without usage of branded keywords

3

SEO

websites-satellites, doorways, landing pages

4

Emails


5

Popunder/Clickunder


6

Reachmedia


7

Teaser Networks


8

Retargeting

Any retargeting/remarketing platform

9

Display Traffic

Non-Google or Facebook, Demand-Supply side platforms

10

Google Display

Google Display Network

11

Coupons


12

Cashbacks


13

Incentive


14

Social Media

Personal page in Facebook, Twitter, Instagram, Vkontakte, Youtube

15

Websites

Blog, personal website, marketplace, ecommerce, online magazine

16

Context ads

Any pay-per-click platform not related to search engines

33

Re-brokering


34

Push Notification


35

Native ads


36

Facebook Display

Facebook Ads & Instagram

43

Doorways

web pages that are created for the deliberate manipulation of search engine indexes

93

Toolbar



4.2 Get a list of the publisher's sources

Route: /sources

Type: GET


Response fields:

Name

Values

Description

status

success, error

Request status

message


Empty or error message

list


List of sources

list.*.id


Source ID

list.*.type


Source type title

list.*.url


Website URL (if source type is a website)


Route: /tracking_links

Type: POST


Parameters:

Name

Values

Description

Example

Required

offer_id

int

Offer ID

2017

Yes

source_id

int

Source ID

1234

Yes

p1

string

Custom parameter to add to the tracking link


No

p2

string

Custom parameter to add to the tracking link


No

p3

string

Custom parameter to add to the tracking link


No

p4

string

Custom parameter to add to the tracking link


No

deeplink_url

string

Deeplink URL that should be the final landing page of tracking link


No


Response fields:

Name

Values

Description

status

success, error

Request status

message


Empty or error message

tracking_link


Tracking link


5 Feeds

5.1 Fetch possible offer list to generate feeds.

Route: /api/feed/offers

Type: GET

Parameters: none

Response fields:

Name

Values

Description

active

boolean

Offer active status

allowed

boolean

True If you are requested to this offer

applied

boolean

True If request is approved

blocked

boolean

True If request is declined

description

string

Offer description

geo

string country codes.

ALL - All

Offer geo information

id

int

Offer id

id_thumbnail

string

Logo file name

in_blacklist

boolean

True If you are blacklisted for this offer

logoCDN

string

Link to logo on CDN services

preview_url

string


rejected

boolean


short_payout

percentage string


title

string


type

cps, cpa, cpi

Offer types

visibility

active, need approval, private

Offer visibility


5.2 Generate feed

Route: /api/feed/generate

Type: POST

Parameters:

Name

Values

Description

Example

Required

offer

int

Offer ID

2017

Yes

Return status message. Link for feed will be sent to your email

  • No labels