External Reporting API Endpoint

Endpoint

http://api-sched-v3.admanagerplus.yahoo.com/yamplus_api/extreport/

Create a Report

curl -X POST "http://api-sched-v3.admanagerplus.yahoo.com/yamplus_api/extreport/" \
  -H "Content-Type: application/json" \
  -H "X-Auth-Method: OAUTH" \
  -H "X-Auth-Token: <<ACCESS_TOKEN>>" \
  -d '{
        "reportOption": {
            "timezone": "America/New_York",
            "currency": 4,
            "dimensionTypeIds": [ 5 ],
            "metricTypeIds": [ 44, 1, 2, 23, 11, 41, 43 ]
        },
        "intervalTypeId": 1,
        "dateTypeId": 2,
        "startDate": "2016-07-10T00:00:00-05:00",
        "endDate": "2016-07-10T11:59:59-05:00"
    }'

Note: Replace <<ACCESS_TOKEN>> with the geneated OAUTH access token. See Generate Access Token guide.

Response

The response contains the following fields:

Parameter Type Description
status string Current status of the report generation.
customerReportId string Unique Report ID. Use this in GET call to fetch the URL of the report.

Example Response

{
  "customerReportId": "aa78d3a1-5548-4484-8911-4c0a8eea877f",
  "status": "SUBMITTED"
}

Read Report Status

To retrieve the status and URL of the generated report, make a GET call with the customerReportId parameter.

GET http://api-sched-v3.admanagerplus.yahoo.com/yamplus_api/extreport/{customerReportId}
Name Description Type Required?
customerReportId Unique Report ID. integer Y
curl -X GET "http://api-sched-v3.admanagerplus.yahoo.com/yamplus_api/extreport/aa78d3a1-5548-4484-8911-4c0a8eea877f" \
  -H "Content-Type: application/json" \
  -H "X-Auth-Method: OAUTH" \
  -H "X-Auth-Token: <<ACCESS_TOKEN>>"

Note: Replace <<ACCESS_TOKEN>> with the geneated OAUTH access token. See Generate Access Token guide.

Response

The response contains the following fields:

Parameter Type Description
status string

Current status of the report request.

  • SUCCESS - Report successfully created.
  • FAILED - Report generation failed.
  • SUBMITTED - Report request is in queue.
  • PROCESSING - Report generation is in progress.
URL string If the report is generated successfully, this filed will contain the URL where the report is stored. Use this URL to download your report. Note This URL is only valid for 7 days.
customerReportId string Unique Report ID.

Example Response

{
  "customerReportId": "aa78d3a1-5548-4484-8911-4c0a8eea877f",
  "status": "SUCCESS",
  "url": "https://s.yimg.com/ff/pbp/ext_report/extrep3664231987319550726.csv"
}