Base URL: https://suite.assertiveyield.com/api/v2
Used to retrieve a Token for access to your entities.
Path : /login/
Method : POST
Auth required : NO
Headers : Content-Type: application/x-www-form-urlencoded
Post Body
email={userAccountEmail}&password={userAccountPassword}
curl --location --request POST 'https://suite.assertiveyield.com/api/v2/login/' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'email=me@mail.com' \
--data-urlencode 'password=mypassword'
Code : 200 OK
Content example
{
"status": "success",
"data": {
"authToken": "VR6LdSgalvO9uduQfgAWecULL4QYz0SfiVQfYw2v62v",
"userId": "p531CkFFhTZH9EbRf"
}
}
Condition : If 'username' and 'password' combination is wrong.
Code : 401 Unauthorized
Content example :
{
"status": "error",
"message": "Unauthorized"
}
For all endpoints that require authentication you must set the userId
and authToken
in the header.
Key | Value |
---|---|
X-Auth-Token | {authToken} |
X-User-Id | {userId} |
Example
curl -H "X-Auth-Token: VR6LdSgalvO9uduQfgAWecULL4QYz0SfiVQfYw2v62v" -H "X-User-Id: p531CkFFhTZH9EbRf" https://suite.assertiveyield.com/api/v2/report
Retrieve a custom report based on one of the dimensions from the UI.
URL : /report
Method : POST
Headers: Content-Type: application/json
Auth required : YES
Mandatory Params :
Key | Type | Value |
---|---|---|
entities | POST Body | Entity id from the welcome page |
timezone | POST Body | See table below |
dimensions | POST Body | See table below |
metrics | POST Body | See table below (use Raw Metrics ) |
filter | POST Body | See table below |
start-/endDate | part of filter | ISO Format like "2019-12-31T00:00:00.000Z" |
Optional Params :
Key | Type | Value |
---|---|---|
timeGranularity | POST Body | One of: by_minute , by_10_minutes , by_hour , by_day , by_week , by_month . You can use up to 150 divisions, for example, you can query 150 days by day. Default: with 3 days and less by_hour otherwise by_day . |
comparator | {filter} field | One of: is_one_of , contains , starts_with , ends_with , matches_regex . Can be preceded with not_ to negate comparison as in not_is_one_of . contains , starts_with , ends_with are case insensitive. matches_regex uses re2 syntax. Defaults to is_one_of |
applyRevenueBias | POST Body | Boolean to set revenue to net revenue |
dimensionsLimit | POST Body | Integer which limits the number of dimensions returned, sorted by impressions - Valid values are between 1 and 100k (up to 10M if responseFormat is compact , compression is enabled, and one single time range of data is asked for) - Defaults to 10k |
responseFormat | POST Body | One of: objects , compact - Defaults to objects |
useSessionStartTimeAsTimestamp | POST Body | Boolean to set session start time instead of timestamp - Defaults to false |
Post Body :
{
"entities": ["ZmtgyGHidF5QWg2HD"],
"timezone": "UTC",
"dimensions": ["host", "client_name"],
"metrics": ["impressions", "prebid_revenue", "pageViews", "sessions"],
"timeGranularity": "by_hour",
"applyRevenueBias": false,
"dimensionsLimit": 10000,
"filter": [
{
"id": "startDate",
"value": "2019-12-01T00:00:00.000Z"
},
{
"id": "endDate",
"value": "2019-12-01T23:59:59.999Z"
},
{
"id": "highest_bidder",
"value": ["appnexus", "rubicon"]
},
{
"id": "preBidWon",
"value": [1]
},
{
"id": "country",
"value": ["United States"],
"comparator": "not_is_one_of"
},
{
"id": "client_name",
"value": ["Chrome", "Safari"],
"comparator": "starts_with"
}
]
}
Dimension | ID | Description |
---|---|---|
Acquisition ClickId | acquisition_clickId | |
Ad Quality Blocking Type | adQualityBlockingType | |
Ad Quality Is Blocked | adQualityIsBlocked | |
Ad Unit | adUnit | |
Advertiser Domain | advertiserDomain | |
Assertive Version | assertiveVersion | |
Bid Landscape | bid | |
Winning Bidder | bidder | The winning/rendered bidder. |
Brand | brand | |
Browser | browser |
Metric | ID |
---|---|
acquisition_cost | acquisition_cost |
acquisition_cost_measurable_session_starts | acquisition_cost_measurable_session_starts |
ad_unfilled_count | ad_unfilled_count |
adSense_impressions | adSense_impressions |
adSense_revenue | adSense_revenue |
aps_impressions | aps_impressions |
aps_revenue | aps_revenue |
blocked_impressions | blocked_impressions |
clicks | clicks |
clicksBounced | clicksBounced |
revenue
and rpm
metrics are a multitude of 1,000,000Filter | ID |
---|---|
Ad Quality Blocking Type | adQualityBlockingType |
Ad Quality Is Blocked | adQualityIsBlocked |
Ad Refresh Count | refreshCount |
Ad Unit | adUnit |
Advertiser Domain | advertiserDomain |
Assertive Version | assertiveVersion |
AY Entity | entityName |
AY Hash K/V | dfpHash |
AY Organization | organizationName |
AY Publisher | publisherName |
The API only provides raw metrics. All other metrics are calculated based on these. Below are the details on how they are calculated.
Metric | ID | Required Raw Metrics | Calculation Formula |
---|---|---|---|
Acquisition Cost | acquisition_cost | acquisition_cost | acquisition_cost |
Acquisition Cost Available | acquisition_cost_measurable_session_starts | acquisition_cost_measurable_session_starts | acquisition_cost_measurable_session_starts |
Ad Unfilled | ad_unfilled | ad_unfilled_count | ad_unfilled_count |
AdS Impressions | adSense_impressions | adSense_impressions | adSense_impressions |
AdS PageView RPM | adSense_pageView_rpm | adSense_revenue pageViews | ( adSense_revenue / pageViews ) * 1000 |
Condition : If everything is OK and the report could be retrieved.
Code : 200 OK
Content example :
{
"status": "success",
"data": [
{
// If you ask for only one dimension _group will be a string.
"_group": ["domain.tld", "Chrome Mobile"],
"_date": "2019-12-01 00:00:00",
"impressions": "241",
"prebid_revenue": "143173528",
"pageViews": "89",
"sessions": "20"
},
{
"_group": ["doamin.tld", "Chrome"],
"_date": "2019-12-01 01:00:00",
"impressions": "54",
"prebid_revenue": "121477291",
"pageViews": "23",
"sessions": "12"
},
...
]
}
Condition : If everything is OK and the report could be retrieved.
Code : 200 OK
Content example :
{
"status": "success",
"data": {
"meta": [
{
"name": "_group",
"type": "LowCardinality(String)"
},
{
"name": "yield_entity_id",
"type": "String"
},
{
"name": "_date",
"type": "DateTime"
},
{
"name": "impressions",
"type": "UInt64"
}
],
"data": [
["123", "the_entity_id", "2022-05-10 00:00:00", "49"],
["123", "the_entity_id", "2022-05-10 00:00:00", "172"]
],
"statistics": {
"elapsed": 1.23,
"rows_read": 123
}
}
}
Condition : If required data is missing.
Code : 400 BAD REQUEST
Content example :
{
"name": ["Incomplete data supplied."]
}
Retrieve a list of publishers and entities you have access to.
URL : /publisher
Method : GET
Headers: Content-Type: application/json
Auth required : YES
Condition : If everything is OK and the report could be retrieved.
Code : 200 OK
Content example :
[
{
"id": "32duwgAeiPKjFcwhq",
"name": "eBay",
"organizationId": "d3sHqM2AsmBLq3w9C",
"organizationName": "O&O",
"entities": [
{
"id": "ht3nGNbqd7M8vyaaY",
"name": "ebay.com",
"currency": "USD"
},
{
"id": "d42hvR5viHfzK2sEEL",
"name": "ebay.de"
}
]
},
{
"id": "FhZgtupa3qwPgzAwB",
"name": "eBay Classifieds",
"organizationId": "d3sHqM2AsmBLq3w9C",
"organizationName": "O&O",
"entities": [
{
"id": "d3sHqM2AsmBLq3w9C",
"name": "kleinanzeigen.de",
"currency": "EUR"
}
]
}
]
Mappings allow you to submit a set of fileds to replace other fields on our reports.
URL : /upload-mappings
Method : POST
Headers: Content-Type: application/json
Auth required : YES
Mandatory Params :
Key | Type | Value |
---|---|---|
timezone | POST Body | see table below |
dimension | POST Body | see table below |
mappings | POST Body | array of objects containing "to", "from" strings |
Dimension | ID |
---|---|
GAM Advertiser | dfpAdvertiser |
GAM Advertiser Id | dfpAdvertiserId |
GAM Order | dfpOrder |
GAM Order Id | dfpOrderId |
GAM Line Item | dfpLineItem |
GAM Line Item Id | dfpLineItemId |
GAM Creative | dfpCreative |
UTM Campaign | utmCampaign |
UTM Content | utmContent |
UTM Medium | utmMedium |
Post Body :
{
"entity": "32duwgAeiPKjFcwhq",
"dimension": "utmSource",
"mappings": [
{
"from": "from1",
"to": "to1"
},
{
"from": "from2",
"to": "to2"
}
]
}
Condition : If everything is OK and the entity was not rate-limited.
Code : 200 OK
Content example :
{
"message": "Uploaded 2 items",
"ok": true
}
Condition : If entity was rate limited.
Code : 403 FORBIDDEN
Content example :
{
"ok": false,
"message": "Rate limit exceeded. Try again in a minute."
}
Condition : If data is missing/not formatted correctly.
Code : 500 ERROR
Content example :
{
"ok": false,
"message": "To 'undefined' is not string. from='from2'"
}
WARNING: This is an early alpha version that should not be used in production. It has not been fully tested nor is the format final.
The session report provides revenue information in real-time about ongoing as well as ended sessions.
URL : /report/session
Method : POST
Headers: Content-Type: application/json
Auth required : YES
Mandatory Params :
Key | Type | Value |
---|---|---|
entities | POST Body | entity id from the welcome page |
timezone | POST Body | see table below |
filter | POST Body | |
session_start_from -/session_start_to | part of filter | ISO Format like "2019-12-31T00:00:00.000Z" |
session_lastUpdate_from -/session_lastUpdate_to | part of filter | ISO Format like "2019-12-31T00:00:00.000Z" |
Timezone | ID |
---|---|
Africa/Abidjan | Africa/Abidjan |
Africa/Accra | Africa/Accra |
Africa/Addis_Ababa | Africa/Addis_Ababa |
Africa/Algiers | Africa/Algiers |
Africa/Asmara | Africa/Asmara |
Africa/Asmera | Africa/Asmera |
Africa/Bamako | Africa/Bamako |
Africa/Bangui | Africa/Bangui |
Africa/Banjul | Africa/Banjul |
Africa/Bissau | Africa/Bissau |
You should provide a set of filters on either session_start
or session_lastUpdate
, or both.
Post Body :
{
"entities": ["ZmtgyGHidF5QWg2HD"],
"timezone": "UTC",
"filter": [
{
"id": "session_start_from",
"value": "2019-12-01T00:00:00.000Z"
},
{
"id": "session_start_to",
"value": "2019-12-01T23:59:59.999Z"
}
]
}
Condition : If everything is OK and the report could be retrieved.
Code : 200 OK
Content example :
{
"status": "success",
"data": [
{
"entityId": "ZmtgyGHidF5QWg2HD",
"session_entryPage": "/the-url/",
"session_utm_source": "",
"session_utm_campaign": "",
"video_revenue": "0",
"session_start": "2021-11-08 15:18:25",
"session_lastUpdate": "2021-11-08 15:18:25",
"sessionId": "1239933369444712830",
"host": "ebay.de",
"session_impressionCount": "1",
"session_pageViewCount": "1",
"prebid_won_revenue": "402",
"dynamicAllocation_revenue_predicted": "0",
"direct_revenue": "0",
"acquisition_clickId": "",
"acquisition_cost": "0",
},
...
]
}
Condition : If required data is missing.
Code : 400 BAD REQUEST
Content example :
{
"status": "error",
"message": "Bad request! [400]",
"details": "Timezone 'America/Torontoooo' is not valid."
}
WARNING: This is an early alpha version that should not be used in production. It has not been fully tested nor is the format final.
URL : /report/spent
Method : POST
Headers: Content-Type: application/json
Auth required : YES
Mandatory Params :
Key | Type | Value |
---|---|---|
entities | POST Body | list of entity ids from the welcome page |
timezone | POST Body | see table below |
currency | POST Body | see table below |
level | POST Body | one of "ad", "publisher", "section" |
metrics | POST Body | list of one of "clicks", "spent" |
dimensions | POST Body | see table below |
filter | POST Body | |
start-/endDate | part of filter | ISO Format like "2019-12-31T00:00:00.000Z" |
Timezone | ID |
---|---|
Africa/Abidjan | Africa/Abidjan |
Africa/Accra | Africa/Accra |
Africa/Addis_Ababa | Africa/Addis_Ababa |
Africa/Algiers | Africa/Algiers |
Africa/Asmara | Africa/Asmara |
Africa/Asmera | Africa/Asmera |
Africa/Bamako | Africa/Bamako |
Africa/Bangui | Africa/Bangui |
Africa/Banjul | Africa/Banjul |
Africa/Bissau | Africa/Bissau |
Dimension | ID |
---|---|
Platform | platform |
Campaign Name | campaign_name |
Ad Group Name | adset_name |
Ad Name | ad_name |
Campaign ID | campaign_id |
Ad Group ID | adset_id |
Ad ID | ad_id |
DSP Sub-Account Id | sub_account_id |
DSP Sub-Account | sub_account_name |
Dimension | ID |
---|---|
Site | site |
Platform | platform |
Site Name | site_name |
Site URL | site_url |
Site ID | site_id |
Campaign Name | campaign_name |
Campaign ID | campaign_id |
Sub Account ID | sub_account_id |
Sub Account Name | sub_account_name |
Dimension | ID |
---|---|
Platform | platform |
Section Name | section_name |
Section URL | section_url |
Section ID | section_id |
Campaign Name | campaign_name |
Campaign ID | campaign_id |
Sub Account ID | sub_account_id |
Sub Account Name | sub_account_name |
Optional Params :
Key | Type | Value |
---|---|---|
timeGranularity | POST Body | One of: by_minute , by_10_minutes , by_hour , by_day , by_week , by_month . You can use up to 150 divisions, for example, you can query 150 days by day. Default: with 3 days and less by_hour otherwise by_day . If level is section or publisher only by_day , by_week , by_month are available. |
comparator | {filter} field | One of: is_one_of , contains , starts_with , ends_with , matches_regex . Can be preceded with not_ to negate comparison as in not_is_one_of . contains , starts_with , ends_with are case insensitive. matches_regex uses re2 syntax. Defaults to is_one_of |
id | {filter} field | One of the dimension ids |
dimensionsLimit | POST Body | Integer which limits the number of dimensions returned, sorted by impressions - Valid values are between 1 and 100k (up to 10M if responseFormat is compact , compression is enabled, and one single time range of data is asked for) - Defaults to 10k |
responseFormat | POST Body | One of: objects , compact - Defaults to objects |
Post Body :
{
"entities": ["ZmtgyGHidF5QWg2HD"],
"currency": "EUR",
"metrics": ["spent", "clicks"],
"timezone": "Europe/Amsterdam",
"timeGranularity": "by_hour",
"dimensions": ["platform", "campaign_name"],
"filter": [
{
"id": "startDate",
"value": "2021-05-01T09:00:00.000Z"
},
{
"id": "endDate",
"value": "2021-05-01T09:59:59.999Z"
}
{
"id": "platform",
"comparator": "is_one_of",
"value": ["baidu"]
}
],
"dimensionsLimit": 500,
"level": "ad"
}
Condition : If everything is OK and the report could be retrieved.
Code : 200 OK
Content example :
{
"status": "success",
"data": [
{
"_date": "2022-10-18",
"_group": ["baidu", "a-b-c"],
"clicks": "0",
"spent": 0
}
]
}
Condition : If required data is missing.
Code : 400 BAD REQUEST
Content example :
{
"status": "error",
"message": "Bad request! [400]",
"details": "Timezone 'America/Torontoooo' is not valid."
}
WARNING: This is an early alpha version that should not be used in production. It has not been fully tested nor is the format final.
URL : /report/web
Method : POST
Headers: Content-Type: application/json
Auth required : YES
Mandatory Params :
Key | Type | Value |
---|---|---|
entities | POST Body | Entity id from the welcome page |
timezone | POST Body | See table below |
dimensions | POST Body | See table below |
metrics | POST Body | See table below (use Raw Metrics ) |
filter | POST Body | See table below |
start-/endDate | part of filter | ISO Format like "2019-12-31T00:00:00.000Z" |
timeGranularity | POST Body | One of: by_minute , by_10_minutes , by_hour , by_day , by_week , by_month .You can use up to 150 divisions, for example, you can query 150 days by day. Default: with 3 days and less by_hour otherwise by_day . |
Optional Params :
Key | Type | Value |
---|---|---|
comparator | {filter} field | One of: is_one_of , contains , starts_with , ends_with , matches_regex . Can be preceded with not_ to negate comparison as in not_is_one_of . contains , starts_with , ends_with are case insensitive. matches_regex uses re2 syntax. Defaults to is_one_of |
applyRevenueBias | POST Body | Boolean to set revenue to net revenue |
dimensionsLimit | POST Body | Integer which limits the number of dimensions returned, sorted by impressions - Valid values are between 1 and 100k (up to 10M if responseFormat is compact , compression is enabled, and one single time range of data is asked for) - Defaults to 10k |
responseFormat | POST Body | One of: objects , compact - Defaults to objects |
useSessionStartTimeAsTimestamp | POST Body | Boolean to set session start time instead of timestamp - Defaults to false |
Post Body :
{
"entities": ["ZmtgyGHidF5QWg2HD"],
"timezone": "UTC",
"dimensions": ["host", "client_name"],
"metrics": ["impressions", "prebid_revenue", "pageViews", "sessions"],
"timeGranularity": "by_hour",
"applyRevenueBias": false,
"dimensionsLimit": 10000,
"filter": [
{
"id": "startDate",
"value": "2019-12-01T00:00:00.000Z"
},
{
"id": "endDate",
"value": "2019-12-01T23:59:59.999Z"
},
{
"id": "highest_bidder",
"value": ["appnexus", "rubicon"]
},
{
"id": "preBidWon",
"value": [1]
},
{
"id": "country",
"value": ["United States"],
"comparator": "not_is_one_of"
},
{
"id": "client_name",
"value": ["Chrome", "Safari"],
"comparator": "starts_with"
}
]
}
Condition : If everything is OK and the report could be retrieved.
Code : 200 OK
Content example :
{
"status": "success",
"data": [
{
// If you ask for only one dimension _group will be a string.
"_group": ["domain.tld", "Chrome Mobile"],
"_date": "2019-12-01 00:00:00",
"impressions": "241",
"prebid_revenue": "143173528",
"pageViews": "89",
"sessions": "20"
},
{
"_group": ["doamin.tld", "Chrome"],
"_date": "2019-12-01 01:00:00",
"impressions": "54",
"prebid_revenue": "121477291",
"pageViews": "23",
"sessions": "12"
},
...
]
}
Condition : If everything is OK and the report could be retrieved.
Code : 200 OK
Content example :
{
"status": "success",
"data": {
"meta": [
{
"name": "_group",
"type": "LowCardinality(String)"
},
{
"name": "yield_entity_id",
"type": "String"
},
{
"name": "_date",
"type": "DateTime"
},
{
"name": "impressions",
"type": "UInt64"
}
],
"data": [
["123", "the_entity_id", "2022-05-10 00:00:00", "49"],
["123", "the_entity_id", "2022-05-10 00:00:00", "172"]
],
"statistics": {
"elapsed": 1.23,
"rows_read": 123
}
}
}
Condition : If required data is missing.
Code : 400 BAD REQUEST
Content example :
Object {
"message": "Failed to parse body - Invalid type. [{
"code": \\"invalid_type\\",
\\"expected\\": \\"array\\",
\\"received\\": \\"undefined\\",
\\"path\\": [
\\"entities\\"
],
\\"message\\": \\"Required\\"
},
...
}
In order to ensure high availability and performance for all publishers, rate limits apply to expensive requests.
Should the given rate limits not be enough for your use case, please reach out.
To enable compression provide the correct "Accept-Encoding" headers in the request, for example gzip
.
Gzip and Deflate compression methods are supported.
Discover helpful resources for deep-dive industry knowledge
Experience faster and more effective assistance with our exclusive AY support
With comprehensive courses and recognizable certificates, take your next steps with us.
Browse an extensive list of industry-related buzzwords and find answers to your questions.
What's new on AY? This collection is an overview of new products and features release in AY tools.