{"components":{"callbacks":{},"examples":{},"headers":{},"links":{},"parameters":{},"requestBodies":{},"responses":{"DSPReportsBadGateway":{"content":{"application/vnd.dsperror.v1+json":{"schema":{"$ref":"#/components/schemas/DSPReportsError"}}},"description":"Bad Gateway Exception."},"DSPReportsBadRequest":{"content":{"application/vnd.dsperror.v1+json":{"schema":{"$ref":"#/components/schemas/DSPReportsError"}}},"description":"Bad request"},"DSPReportsEndpointRequestTimedOut":{"content":{"application/vnd.dsperror.v1+json":{"schema":{"$ref":"#/components/schemas/DSPReportsError"}}},"description":"Endpoint Request Timed-out Exception. This can be due to intermittent issue and can be retried"},"DSPReportsForbidden":{"content":{"application/vnd.dsperror.v1+json":{"schema":{"$ref":"#/components/schemas/DSPReportsError"}}},"description":"Forbidden - Request failed because user does not have access to a specified resource."},"DSPReportsInternalServerError":{"content":{"application/vnd.dsperror.v1+json":{"schema":{"$ref":"#/components/schemas/DSPReportsError"}}},"description":"Internal Server Error - Something went wrong on the server. Retry later and report an error if unresolved.."},"DSPReportsNotFound":{"content":{"application/vnd.dsperror.v1+json":{"schema":{"$ref":"#/components/schemas/DSPReportsError"}}},"description":"Not Found - Requested resource does not exist or is not visible for the authenticated user."},"DSPReportsServiceUnavailable":{"content":{"application/vnd.dsperror.v1+json":{"schema":{"$ref":"#/components/schemas/DSPReportsError"}}},"description":"Service Unavailable Exception."},"DSPReportsTooManyRequests":{"content":{"application/vnd.dsperror.v1+json":{"schema":{"$ref":"#/components/schemas/DSPReportsError"}}},"description":"Too Many Requests - Request was rate-limited. Retry later."},"DSPReportsUnauthorized":{"content":{"application/vnd.dsperror.v1+json":{"schema":{"$ref":"#/components/schemas/DSPReportsError"}}},"description":"Unauthorized - Request failed because user is not authenticated or is not allowed to invoke the operation."},"DSPReportsUnprocessableEntity":{"content":{"application/vnd.dsperror.v1+json":{"schema":{"$ref":"#/components/schemas/DSPReportsError"}}},"description":"Unprocessable entity - Failed due to invalid parameters."},"DSPReportsUnsupportedMediaType":{"content":{"application/vnd.dsperror.v1+json":{"schema":{"$ref":"#/components/schemas/DSPReportsError"}}},"description":"415 - Unsupported Media Type"}},"schemas":{"CreateReportRequestBodyV3":{"properties":{"advertiserIds":{"description":"List of advertisers specified by identifier to include in the report. This should not be present if accountId is advertiser. To learn more about when to use advertiserIds, see [Reporting by account type](https://advertising.amazon.com/API/docs/en-us/reporting/dsp/reporting-by-account-type).","items":{"type":"string"},"maxItems":100,"minItems":0,"type":"array"},"dimensions":{"description":"List of dimensions to include in the report. Specify one or many comma-delimited strings of dimensions. For example: [\"ORDER\", \"LINE_ITEM\", \"CREATIVE\"]. Adding a dimension in this array determines the aggregation level of the report data and also adds the fields for that dimension in the report. If the list is null or empty, the aggregation of the report data is at `ORDER` level. The allowed values can be used together in this array as an allowed value in which case the report aggregation will be at the lowest aggregation level and the report will contain the fields for all the dimensions included in the report. To see a list of metrics available by dimension, see [Dimensions](https://advertising.amazon.com/API/docs/en-us/reporting/dsp/dimensions).","items":{"enum":["BROWSER_TYPE","BROWSER_VERSION","CITY","CONVERSION_SOURCE","COUNTRY","CREATIVE","DEAL","DEVICE_TYPE","DMA","ENVIRONMENT_TYPE","LINE_ITEM","OPERATING_SYSTEM","ORDER","POSTAL_CODE","SITE","STATE_COUNTY_REGION","SUPPLY"],"type":"string"},"maxItems":20,"minItems":0,"type":"array"},"endDate":{"description":"Date in yyyy-MM-dd format. The report contains only metrics generated on the specified date range between startDate and endDate. The maximum date range between startDate and endDate is 31 days. The endDate can be up to 90 days older from today.","format":"date","type":"string"},"format":{"default":"JSON","description":"The report file format.","enum":["CSV","JSON"],"type":"string"},"metrics":{"description":"Specify a list of metrics field names to include in the report. For example: [\"impressions\", \"clickThroughs\", \"CTR\", \"eCPC\", \"totalCost\", \"eCPM\"]. If no metric field names are specified, only the default fields and selected `DIMENSION` fields are included by default. Specifying default fields returns an error. To view the metrics available by report type, see [DSP report types](https://advertising.amazon.com/API/docs/en-us/reporting/dsp/report-types)","items":{"type":"string"},"maxItems":1000,"minItems":0,"type":"array"},"orderIds":{"description":"List of orders specified by identifier to include in the report.","items":{"type":"string"},"maxItems":100,"minItems":0,"type":"array"},"startDate":{"description":"Date in yyyy-MM-dd format. The report contains only metrics generated on the specified date range between startDate and endDate. The maximum date range between startDate and endDate is 31 days. The startDate can be up to 90 days older from today.","format":"date","type":"string"},"timeUnit":{"default":"SUMMARY","description":"Adding timeUnit determines the aggregation level (`SUMMARY` or `DAILY`) of the report data. If the timeUnit is null or empty, the aggregation of the report data is at the `SUMMARY` level and aggregated at the time period specified. `DAILY` timeUnit is not supported for `AUDIENCE` report type. The report will contain the fields based on timeUnit:\u003cdetails\u003e\u003csummary\u003e`SUMMARY`\u003c/summary\u003eintervalStart\u003c/br\u003eintervalEnd\u003c/details\u003e\u003c/br\u003e\u003cdetails\u003e\u003csummary\u003e`DAILY`\u003c/summary\u003eDate\u003c/details\u003e","enum":["DAILY","SUMMARY"],"type":"string"},"type":{"default":"CAMPAIGN","description":"The report type.","enum":["AUDIENCE","CAMPAIGN","CONVERSION_SOURCE","GEOGRAPHY","INVENTORY","PRODUCTS","TECHNOLOGY"],"type":"string"}},"required":["endDate","startDate"],"type":"object"},"DSPReportsError":{"description":"The error response object.","properties":{"errors":{"description":"A list of errors. Please check the values in this field for report validation errors.","items":{"$ref":"#/components/schemas/DSPReportsSubError"},"maxItems":100,"minItems":0,"type":"array"},"message":{"description":"A human-readable description of the response.","type":"string"},"requestId":{"description":"A unique identifier of the request.","type":"string"}},"required":["message"],"type":"object"},"DSPReportsSubError":{"description":"The sub-error object.","properties":{"errorType":{"description":"Enumerated error type.","type":"string"},"field":{"description":"Request body field which is cause of the error.","type":"string"},"message":{"description":"Detailed error description","type":"string"}},"required":["errorType","message"],"type":"object"},"ReportMetadataV3":{"properties":{"expiration":{"description":"The expiration time of the URI in the location property in date-time format(yyyy-MM-ddTHH:mm:ss). The expiration time is the time when the download link expires.","format":"date-time","type":"string"},"format":{"description":"The data format of the report.","enum":["CSV","JSON"],"type":"string"},"location":{"description":"The URI address of the report.","type":"string"},"reportId":{"description":"The identifier of the report.","type":"string"},"status":{"description":"The build status of the report.","enum":["FAILURE","IN_PROGRESS","SUCCESS"],"type":"string"},"statusDetails":{"description":" A human-readable description of the current status.","type":"string"},"type":{"description":"The type of report.","enum":["AUDIENCE","CAMPAIGN","CONVERSION_SOURCE","GEOGRAPHY","INVENTORY","PRODUCTS","TECHNOLOGY"],"type":"string"}},"type":"object"}},"securitySchemes":{}},"info":{"description":"Fetch reports with performance metrics for DSP campaigns.","title":"DSP Reports","version":"3.0"},"openapi":"3.0.1","paths":{"/accounts/{accountId}/dsp/reports":{"post":{"description":"Use this operation to request creation of a report that includes metrics about your Amazon DSP campaigns. Specify the `type` of report and the `metrics` you\u0027d like to include. Note that the value specified for the `dimensions` field affects the metrics included in the report. See the `dimensions` field description for more information.\n\n**Authorized resource type**:\nDSP Rodeo Entity ID, DSP Advertiser Account ID\n\n**Parameter name**:\naccountId\n\n**Parameter in**:\npath\n\n**Requires one of these permissions**:\n[\"view_performance_dashboard\"]","operationId":"createReportV3","parameters":[{"description":"The client identifier. See [create API authorization and refresh tokens](https://advertising.amazon.com/API/docs/en-us/setting-up/generate-api-tokens) for more information.","in":"header","name":"Amazon-Advertising-API-ClientId","required":true,"schema":{"type":"string"}},{"description":"Account Identifier you use to access the DSP. This is your DSP Entity ID if you have access to all DSP advertisers within that entity, or your DSP Advertiser ID if you only have access to a specific advertiser ID.","in":"path","name":"accountId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/vnd.dspcreatereports.v3+json":{"schema":{"$ref":"#/components/schemas/CreateReportRequestBodyV3"}}},"description":"Create report request body. Version of request can be specified in the accept.","required":true},"responses":{"202":{"content":{"application/vnd.dspcreatereports.v3+json":{"schema":{"$ref":"#/components/schemas/ReportMetadataV3"}}},"description":"Request successfully accepted. Version can be specified in the accept. By default returns latest version"},"400":{"$ref":"#/components/responses/DSPReportsBadRequest"},"401":{"$ref":"#/components/responses/DSPReportsUnauthorized"},"403":{"$ref":"#/components/responses/DSPReportsForbidden"},"404":{"$ref":"#/components/responses/DSPReportsNotFound"},"415":{"$ref":"#/components/responses/DSPReportsUnsupportedMediaType"},"422":{"$ref":"#/components/responses/DSPReportsUnprocessableEntity"},"429":{"$ref":"#/components/responses/DSPReportsTooManyRequests"},"500":{"$ref":"#/components/responses/DSPReportsInternalServerError"},"502":{"$ref":"#/components/responses/DSPReportsBadGateway"},"503":{"$ref":"#/components/responses/DSPReportsServiceUnavailable"},"504":{"$ref":"#/components/responses/DSPReportsEndpointRequestTimedOut"}},"summary":"Creates a report request.","tags":["Reports"]}},"/accounts/{accountId}/dsp/reports/{reportId}":{"get":{"description":"Pass the identifier of a previously requested report in the `reportId` field to get the current status of the report. While the report is pending, `status` is set to `IN_PROGRESS`. When a response with `status` set to `SUCCESS` is returned, the report is available for download at the address specified in the `location` field.\n\n**Authorized resource type**:\nDSP Rodeo Entity ID, DSP Advertiser Account ID\n\n**Parameter name**:\naccountId\n\n**Parameter in**:\npath\n\n**Requires one of these permissions**:\n[\"view_performance_dashboard\"]","operationId":"getCampaignReportV3","parameters":[{"description":"The client identifier. See [create API authorization and refresh tokens](https://advertising.amazon.com/API/docs/en-us/setting-up/generate-api-tokens) for more information. ","in":"header","name":"Amazon-Advertising-API-ClientId","required":true,"schema":{"type":"string"}},{"description":"Account Identifier for DSP. Please input DSP entity ID if you want to retrieve reports\u003cbr /\u003efor a group of advertisers, or input DSP advertiser ID if you want to retrieve reports for a single advertiser.","in":"path","name":"accountId","required":true,"schema":{"type":"string"}},{"description":"The identifier of the requested report.","in":"path","name":"reportId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/vnd.dspgetreports.v3+json":{"schema":{"$ref":"#/components/schemas/ReportMetadataV3"}}},"description":"Successful operation. Version can be specified in the accept. By default returns latest version"},"400":{"$ref":"#/components/responses/DSPReportsBadRequest"},"403":{"$ref":"#/components/responses/DSPReportsForbidden"},"404":{"$ref":"#/components/responses/DSPReportsNotFound"},"415":{"$ref":"#/components/responses/DSPReportsUnsupportedMediaType"},"429":{"$ref":"#/components/responses/DSPReportsTooManyRequests"},"500":{"$ref":"#/components/responses/DSPReportsInternalServerError"},"502":{"$ref":"#/components/responses/DSPReportsBadGateway"},"503":{"$ref":"#/components/responses/DSPReportsServiceUnavailable"},"504":{"$ref":"#/components/responses/DSPReportsEndpointRequestTimedOut"}},"summary":"Gets the metadata of a report previously requested.","tags":["Reports"]}}}}