HomeBook a Demo

Revenue reports

Pull your organization's daily revenue for each publisher: fields, dates, when numbers change, how often to pull, pagination, and errors.

GET /v1/reports/revenue returns your organization's revenue for each publisher and day. It needs the reporting:read scope. The numbers are the same as the dashboard revenue export's, though a response can be up to 15 minutes behind it.

curl "https://partner-api.getinline.tech/v1/reports/revenue?start_date=2026-10-01&end_date=2026-10-07" \
  -H "Authorization: Bearer $INLINE_API_TOKEN"

Fields

Each row is one publisher on one UTC date.

FieldMeaning
dateThe UTC date.
publisher_idThe publisher's Inline ID.
primary_domainThe publisher's primary domain, such as example.com. Revenue from the publisher's other domains is included in this row.
gross_revenueWhat ad partners paid, before the revenue share.
net_revenueYour share of gross_revenue.
impressionsPaid ad impressions reported by ad partners.
currencyAn ISO 4217 code. Always USD today.
is_finaltrue when the date is at least two UTC days old and none of the row's revenue is under review. See when numbers change.
  • Store rows by date and publisher_id. Use primary_domain to match rows to your own sites; you don't need to keep a map of Inline IDs.
  • A day with no revenue may have no row. Treat a missing row as zero.
  • Amounts are rounded to 6 decimal places.
  • There is no breakdown by ad partner.

Dates

  • start_date and end_date are UTC dates in YYYY-MM-DD form. Both are included, so start_date=2026-10-01&end_date=2026-10-07 is seven days.
  • end_date cannot be before start_date.
  • One request covers up to 92 days. For a longer range, make several requests.
  • A future date is allowed; it has no rows yet.
  • The API works only in UTC. Convert to your time zone after you fetch the rows.
  • An unknown query parameter, or one sent twice, returns 400.

To get one publisher's rows, add publisher_id. A publisher your token cannot see returns 404.

When numbers change

Ad partners report late and sometimes revise their numbers:

  • is_final: true: the date is at least two UTC days old, and none of the row's revenue is under review.
  • is_final: false: the numbers can still change.

For example, on 2026-10-24, rows for 2026-10-22 and earlier are final. Rows for 2026-10-23 and 2026-10-24 are not.

Sometimes we hold back a demand partner's revenue while we confirm it with them. That revenue is left out of gross_revenue, net_revenue, and impressions, and the row stays is_final: false until it is confirmed and added back, whatever its date. Rows without revenue under review are unaffected.

A change to your revenue share can still change net_revenue for any date, final or not. So when you reconcile, pull the whole range again (for example, the whole month you are closing) and replace the rows you stored.

How often to pull

Pull at most a few times a day. Revenue updates about every four hours, and responses can be cached for up to 15 minutes, so repeating a request sooner gains nothing.

A simple schedule: once or twice a day, pull from the start of the period you reconcile through today. Then replace the rows you stored for that range.

meta.data_through is the latest date with revenue loaded, or null if none has loaded for your range.

Pagination

  • Rows are sorted by date, then publisher_id, then currency, all ascending.
  • limit sets the rows per page, from 1 to 1000. The default is 1000.
  • When meta.next_cursor is null, you have the last page. Otherwise, send it as cursor, with the same other parameters, to get the next page.
  • Paging never skips or repeats a row, even when new revenue loads between pages. Revenue that loads for a page you already fetched shows up on your next sync.
  • A cursor sent with different parameters returns 400.
  • Cursors are opaque. Do not decode or build them.

Sync example

This Python script pages through a report and retries 429 and 5xx responses with backoff. It uses the requests library.

import os
import time
 
import requests
 
BASE_URL = "https://partner-api.getinline.tech"
HEADERS = {"Authorization": f"Bearer {os.environ['INLINE_API_TOKEN']}"}
RETRY_STATUSES = {429, 500, 502, 503, 504}
 
 
def get_page(path, params):
    for attempt in range(6):
        resp = requests.get(BASE_URL + path, headers=HEADERS, params=params, timeout=60)
        if resp.status_code not in RETRY_STATUSES:
            resp.raise_for_status()
            return resp.json()
        time.sleep(int(resp.headers.get("Retry-After", 2 ** attempt)))
    raise RuntimeError(f"{path} kept failing; request ID {resp.headers.get('X-Request-Id')}")
 
 
def report_rows(path, params):
    cursor = None
    while True:
        page = get_page(path, {**params, **({"cursor": cursor} if cursor else {})})
        yield from page["data"]
        cursor = page["meta"]["next_cursor"]
        if cursor is None:
            return
 
 
for row in report_rows("/v1/reports/revenue", {"start_date": "2026-10-01", "end_date": "2026-10-24"}):
    print(row["date"], row["primary_domain"], row["gross_revenue"], row["net_revenue"], row["is_final"])

Errors

  • 400 invalid_request: a bad date, a range over 92 days, an unknown or repeated parameter, or a cursor reused with different parameters. The message names the parameter.
  • 404 not_found: a publisher_id your token cannot see.
  • 503 unavailable: the report took more than about 20 seconds. Retry with backoff. If it keeps failing, ask for fewer days or one publisher_id.

See errors for every code.