Generating a report

How to generate a report

  1. To log in to the Statistics API use the token you got for the API Adfox. If you don't have a token, receive it.

  2. In the HTTP Authorization header pass the received OAuth-token for each request.

    curl -H 'Authorization: OAuth 05dd3dd84ff948fdae2bc4fb91f13e22bb1f289ceef0037' https://adfox.yandex.com/api/report/list/owner
    
  3. Select how detailed you want the report to be. Using methods, find out what reports are available for the selected level of detail, which arguments must be passed to get the report, and the possible periods for generating the report. You can find the full list of arguments here.

  4. Execute a request to generate a report. No more than 3 reports can be processed at the same time.

  5. Execute a request to receive the report. If the report isn't ready yet, you'll get its status in the response.

Level of detail

Available levels of detail:

  • owner: A general report.
  • supercampaign: At the supercampaign level.
  • campaign: At the campaign level.
  • banner: At the banner level.
  • site: At the site level.
  • section: At the site section level.
  • place: At the placement level.

Arguments for building a report

All possible arguments for building reports are listed below. Depending on the selected report, a specific set of arguments needs to be passed in the request. To find out which arguments are required for the selected report, use the method.

  • supercampaignId: The supercampaign ID.
  • campaignId: The campaign ID.
  • bannerId: The banner ID.
  • siteId: The site ID.
  • sectionId: The site section ID.
  • placeId: The placement ID.
  • categoryId: The category ID.
  • criteriaId: The user metric ID.
  • criteria2Id: The user metric ID.
  • name: The report name.
  • dateFrom: The start date of the reporting period, YYYY-MM-DD.
  • dateTo: The end date of the reporting period, YYYY-MM-DD.
  • day: The day that the report is necessary for, YYYY-MM-DD.
  • ownerId: The account owner ID. The argument is only available to placement owners and advertisers.

Note

To build a report on multiple objects, pass the list of IDs as a JSON array. For example, for sites: siteId=[1,2,3].