External Reporting API Endpoint

POST /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"
    }'

HTTP Request

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

Response

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

Response body is in JSON format with the following attributes.

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

GET /extreport/{id}

Sample GET call to retrieve status/url of generated report

curl -X GET "http://api-sched-v3.admanagerplus.yahoo.com/yamplus_api/extreport/{id}"
  -H "Content-Type: application/json"
  -H "X-Auth-Method: OAUTH"
  -H "X-Auth-Token: ns5kK..."

HTTP Request

GET https://api-sched-v3.admanagerplus.yahoo.com/yamplus_api/extreport/{id}

Note

id is in the response returned from POST call. Do NOT include the braces!

response

{
  "customerReportId": "aa78d3a1-5548-4484-8911-4c0a8eea877f",
  "status": "SUCCESS",
  "url": "https://s.yimg.com/ff/pbp/ext_report/d5df6547-66a1-4f5a-8598-4bfcdedf814b2178382921885476005.plain"
}

This API fetches the report status. Use the url in the response to obtain a CSV file of the report. Note url will only be made available if the report was generated successfully.

Response

Response body is in JSON format with the following attributes.

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