marketing APIv1.10.0

getReportMetadataForReportType

GET
/ad_report_metadata/{report_type}
This call retrieves metadata that details the fields used by a specific Promoted Listings report type. Use the report_type path parameter to indicate metadata to retrieve.

This method does not use a request payload.

Input

Resource URI (production)

GET https://api.ebay.com/sell/marketing/v1/ad_report_metadata/{report_type}

URI parameters

ParameterTypeDescription
report_typestringThe name of the report type whose metadata you want to get.

For details about each report type, see ReportTypeEnum.

Valid values:
   ACCOUNT_PERFORMANCE_REPORT
   CAMPAIGN_PERFORMANCE_REPORT
   CAMPAIGN_PERFORMANCE_SUMMARY_REPORT
   LISTING_PERFORMANCE_REPORT
   INVENTORY_PERFORMANCE_REPORT

Occurrence: Required

HTTP request headers

All requests made to eBay REST operations require you to provide the Authorization HTTP header for authentication authorization.

OAuth scope

This request requires an access token created with the client credentials grant flow, using one or more scopes from the following list (please check your Application Keys page for a list of OAuth scopes available to your application):

https://api.ebay.com/oauth/api_scope

See OAuth access tokens for more information.

Output

HTTP response headers

Output container/fieldTypeDescription
dimensionMetadataarray of DimensionMetadataA list containing the metadata for the dimension used in the report.

Occurrence: Always

dimensionMetadata.dataTypeDataTypeEnumThe data type of the dimension value used to create the report.

Occurrence: Always

dimensionMetadata.dimensionKeystringThe name of the dimension used to create the report.

Occurrence: Always

dimensionMetadata.dimensionKeyAnnotationsarray of DimensionKeyAnnotationAn list of annotation keys associated with the specified dimension of the report.

Occurrence: Always

dimensionMetadata.dimensionKeyAnnotations.annotationKeystringAn annotation key associated with the dimension.

Occurrence: Always

dimensionMetadata.dimensionKeyAnnotations.dataTypeDataTypeEnumThe data type of the annotation key value.

Occurrence: Always

maxNumberOfDimensionsToRequestintegerThe maximum number of dimensions that can be requested for the specified report type.

Occurrence: Always

maxNumberOfMetricsToRequestintegerThe maximum number of metrics that can be requested for the specified report type.

Occurrence: Always

metricMetadataarray of MetricMetadataA list containing the metadata for the metrics in the report.

Occurrence: Always

metricMetadata.dataTypeDataTypeEnumThe data type of the returned metric value.

Occurrence: Always

metricMetadata.metricKeystringThe name of the metric.

Occurrence: Always

reportTypeReportTypeEnumThe report_type, as specified in the request to create the report task.

Occurrence: Always

HTTP status codes

This call can return one of the following HTTP status codes. For an overview of the status codes, see HTTP status codes in Using eBay RESTful APIs.

StatusMeaning
200Success
404Not Found
500Internal Server error

Error codes

For more on errors, plus the codes of other common errors, see Handling errors.

CodeDomainCategoryMeaning
35001API_MARKETINGAPPLICATIONThere was a problem with an eBay internal system or process. Contact eBay Developer Technical Support for assistance.
35116API_MARKETINGREQUESTSupplied 'report_type' not found. Valid values are: {supportedReportTypes}.

Warnings

Samples

New to making API calls? Please see Making a Call.

Note: Identifiers, such as order IDs or user IDs, and personal data in these samples might be anonymized or may no longer be active on eBay. If necessary, substitute current, relevant eBay data in your requests.

Sample 1: Get MetaData for a Specific Report

This sample returns the metadata that is included in the specified report type.

Input

Specify the report type you want returned using the report_type URI parameter.
GET
https://api.ebay.com/sell/marketing/v1/ad_report_metadata/ACCOUNT_PERFORMANCE_REPORT

Output

If successful, the call returns a reportType container with the dimensionMetadata, metricMetadata, maxNumberOfDimensionsToRequest, and maxNumberOfMetricsToRequest fields for the specified report type.