Publishers API documentation version 2.3.0
https://api3.adsterratools.com/publisher/{token}/
Rate Limit: 1200 requests per minute, per user.
- token: required (string - pattern: ^[a-z0-9]{32}$)
Token can be aquired through Tracking page inside user panel. Token is valid until it's invalidated manualy due to possible security issues or any other reasons. There can only be one valid token at a time.
Example:
dd3896d8ed80163c6fa10392b378f0b2
Domains
Returns an array of domains.
get /domains.{format}
Returns an array of domains.
To make a request to an API, you should pass token as part of URL.
URI Parameters
- format: required (one of json, xml, csv)
HTTP status code 200
Success
Body
Media type: application/json
Example:
{
"items": [
{
"id": 11104450,
"title": "title1.com"
},
{
"id": 11561045,
"title": "title2.com"
}
],
"itemCount": 2
}
HTTP status code 401
Unauthorized request
Body
Media type: application/json
Type: object
Example:
Token does not exist
{
"code": 401,
"message": "Token not found",
"data": null
}
HTTP status code 403
Access denied
Body
Media type: application/json
Type: object
Examples:
Invalid token:
Token has invalid state
{
"code": 403,
"message": "Invalid token",
"data": null
}
Invalid owner type:
Token with another owner type
{
"code": 403,
"message": "Invalid owner type",
"data": null
}
Secured by Token based authorization
Domain placements
Returns an array of placements for specific domain.
get /domain/{domain_id}/placements.{format}
Returns an array of placements for specific domain.
To make a request to an API, you should pass token as part of URL.
URI Parameters
- domain_id: required (integer)
Domains` placements ID
- format: required (one of json, xml, csv)
HTTP status code 200
Success
Body
Media type: application/json
Example:
{
"items": [
{
"id": 34895644,
"title": "Popunder_1",
"alias": "Popunder_1",
"direct_url": "https://www.directurl.com/p67vbgm2?key=e2ptum41vg83gkg92r9g"
},
{
"id": 34845646,
"title": "Vast_1",
"alias": "Vast_1"
},
{
"id": 34854561,
"title": "NativeBanner_1",
"alias": "NativeBanner_1"
},
{
"id": 348567652,
"title": "NativeBanner_2",
"alias": "NativeBanner_2"
}
],
"itemCount": 4
}
HTTP status code 401
Unauthorized request
Body
Media type: application/json
Type: object
Example:
Token does not exist
{
"code": 401,
"message": "Token not found",
"data": null
}
HTTP status code 403
Access denied
Body
Media type: application/json
Type: object
Examples:
Invalid token:
Token has invalid state
{
"code": 403,
"message": "Invalid token",
"data": null
}
Invalid owner type:
Token with another owner type
{
"code": 403,
"message": "Invalid owner type",
"data": null
}
Secured by Token based authorization
Publisher` placements
Returns an array of publishers placements.
get /placements.{format}
Returns an array of publishers placements.
To make a request to an API, you should pass token as part of URL.
URI Parameters
- format: required (one of json, xml, csv)
HTTP status code 200
Success
Body
Media type: application/json
Example:
{
"items": [
{
"id": 15928739,
"domain_id": 123455,
"title": "Popunder_1",
"alias": "Popunder_1",
"direct_url": "https://www.directurl.com/p67vbgm2?key=e2ptum41vg83gkg92r9g"
},
{
"id": 34675906,
"domain_id": 123456,
"title": "Vast_1",
"alias": "Vast_1"
}
],
"itemCount": 2
}
HTTP status code 401
Unauthorized request
Body
Media type: application/json
Type: object
Example:
Token does not exist
{
"code": 401,
"message": "Token not found",
"data": null
}
HTTP status code 403
Access denied
Body
Media type: application/json
Type: object
Examples:
Invalid token:
Token has invalid state
{
"code": 403,
"message": "Invalid token",
"data": null
}
Invalid owner type:
Token with another owner type
{
"code": 403,
"message": "Invalid owner type",
"data": null
}
Secured by Token based authorization
Statistics
Statistics
get /stats.{format}
Statistics
To make a request to an API, you should pass token as part of URL.
URI Parameters
- format: required (one of json, xml, csv)
Query Parameters
- domain: (integer)
Domain id
- placement: (integer)
Placement id
- start_date: required (string)
The start date for the date range filter.
Example:
2017-11-03
- finish_date: required (string)
The end date for the date range filter.
Example:
2017-11-03
- group_by: required (array - default: [date])
Example:
/stats.(json/xml/csv)?domain={domain_id}&country={country}&placement={placement_id}&start_date={start_date}&finish_date={finish_date}&group_by[]={date/domain/placement/country/placement_sub_id}
- country: (string)
Two-letters ISO code
HTTP status code 200
Success
Body
Media type: application/json
Examples:
group_by_date:
Group by date
{
"items": [
{
"date": "2018-10-04",
"impression": 3014,
"clicks": 175,
"ctr": 5.806,
"cpm": 0.383,
"revenue": 1.154
},
{
"date": "2018-10-05",
"impression": 3485,
"clicks": 155,
"ctr": 4.448,
"cpm": 0.396,
"revenue": 1.379
}
],
"itemCount": 2,
"dbLastUpdateTime": "2018-10-08 14:47:49",
"dbDateTime": "2018-10-08 14:47:54"
}
group_by_country:
Group by country
{
"items": [
{
"country": "AT",
"impression": 889,
"clicks": 38,
"ctr": 4.274,
"cpm": 0.673,
"revenue": 0.598
},
{
"country": "CH",
"impression": 408,
"clicks": 21,
"ctr": 5.147,
"cpm": 0.875,
"revenue": 0.357
},
{
"country": "DE",
"impression": 5557,
"clicks": 342,
"ctr": 6.154,
"cpm": 0.31,
"revenue": 1.721
}
],
"itemCount": 3,
"dbLastUpdateTime": "2018-10-08 14:55:53",
"dbDateTime": "2018-10-08 14:55:58"
}
group_by_domain:
Group by domain
{
"items": [
{
"domain": 281040,
"impression": 75301,
"clicks": 4633,
"ctr": 6.153,
"cpm": 0.346,
"revenue": 26.043
},
{
"domain": 291463,
"impression": 160779,
"clicks": 1371,
"ctr": 0.853,
"cpm": 1.888,
"revenue": 303.481
}
],
"itemCount": 2,
"dbLastUpdateTime": "2018-10-08 14:59:14",
"dbDateTime": "2018-10-08 14:59:19"
}
group_by_placement:
Group by placement
{
"items": [
{
"placement": 1578458751,
"impression": 8114,
"clicks": 433,
"ctr": 5.336,
"cpm": 0.354,
"revenue": 2.869
},
{
"placement": 34848952,
"impression": 67187,
"clicks": 4200,
"ctr": 6.251,
"cpm": 0.345,
"revenue": 23.174
},
{
"placement": 65846782,
"impression": 156616,
"clicks": 0,
"ctr": 0,
"cpm": 1.901,
"revenue": 297.794
},
{
"placement": 23849888,
"impression": 4163,
"clicks": 1371,
"ctr": 32.933,
"cpm": 1.366,
"revenue": 5.687
}
],
"itemCount": 4,
"dbLastUpdateTime": "2018-10-08 15:00:02",
"dbDateTime": "2018-10-08 15:00:07"
}
group_by_placement_sub_id:
Group by placement sub id
{
"items": [
{
"placement_sub_id": "-",
"impression": 569,
"clicks": 1845,
"ctr": 1.29,
"cpm": 0.986,
"revenue": 0.561
}
],
"itemCount": 1,
"dbLastUpdateTime": "2018-10-08 15:27:17",
"dbDateTime": "2018-10-08 15:27:22"
}
HTTP status code 401
Unauthorized request
Body
Media type: application/json
Type: object
Example:
Token does not exist
{
"code": 401,
"message": "Token not found",
"data": null
}
HTTP status code 403
Access denied
Body
Media type: application/json
Type: object
Examples:
Invalid token:
Token has invalid state
{
"code": 403,
"message": "Invalid token",
"data": null
}
Invalid owner type:
Token with another owner type
{
"code": 403,
"message": "Invalid owner type",
"data": null
}