Publishers API

Publishers API


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:

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

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

google_ads_compatible_only

true,false

Filter the offers to return only those that are compatible with Google Ads

google_ads_compatible_only=1

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_plans

 



Offer payout plans

data.*.payout_plans.*.title

 

 

Offer payout plan title

data.*.payout_plans.*.type

 

 

Offer payout plan type (percent/fixed)

data.*.payout_plans.*.rate

 

 

Offer payout plan type rate

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

data.*.rating

 

 

Offer rating

data.*.google_ads_compatible

 

true/false

Identify offers compatible with Google Ads



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:
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