Control the response from the getCustomerServiceMetric method using the following path and query parameters:
- customer_service_metric_type controls the type of customer service transactions evaluated for the metric rating.
- evaluation_type controls the period you want to review.
- evaluation_marketplace_id specifies the target marketplace for the evaluation.
For more detail on the workings of peer benchmarking, see Service metrics policy.
Input
Resource URI (production)
URI parameters
Parameter | Type | Description |
---|---|---|
customer_service_metric_type | CustomerServiceMetricTypeEnum | Use this path parameter to specify the type of customer service metrics and benchmark data you want returned for the seller. Supported types are:
Occurrence: Required |
evaluation_type | EvaluationTypeEnum | Use this path parameter to specify the type of the seller evaluation you want returned, either:
Occurrence: Required |
evaluation_marketplace_id | MarketplaceIdEnum | Use this query parameter to specify the Marketplace ID to evaluate for the customer service metrics and benchmark data. For the list of supported marketplaces, see Analytics API requirements and restrictions. Occurrence: Required |
HTTP request headers
OAuth scope
This request requires an access token created with the authorization code 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/sell.analytics.readonly
See OAuth access tokens for more information.
Output
Output container/field | Type | Description |
---|---|---|
dimensionMetrics | array of DimensionMetric | This container provides a seller's customer service metric performance for a given dimension. In the getCustomerServiceMetric request, specify values for the following request parameters to control the returned dimension and the associated metric values:
Occurrence: Conditional |
dimensionMetrics.dimension | Dimension | This type defines the "dimension," or attributes, against which the associated customer service metric values and benchmark ratings are based. The dimensionKey value is set according to the customer_service_metric_type request parameter and the values in the associated name/value pairs relate to the dimensionKey that's being used to calculate the benchmark rating. Occurrence: Always |
dimensionMetrics.dimension.dimensionKey | DimensionTypeEnum | dimensionKey defines the basis against which the seller's customer service metric is measured. The value of this field gets set according to the value of the customer_service_metric_type input parameter. The following input configurations return the responses shown:
Occurrence: Always |
dimensionMetrics.dimension.name | string | The dimension name returned in this field depends on the dimensionKey:
Occurrence: Always |
dimensionMetrics.dimension.value | string | The value returned in this field depends on the dimensionKey. If dimensionKey equals LISTING_CATEGORY , the value returned in this field is the category ID of the primary (L1) category in which the items being rated were listed. If dimensionKey equals SHIPPING_REGION , one of the following values is returned:
Occurrence: Always |
dimensionMetrics.metrics | array of Metric | This is a list of Metric elements where each element contains data and information related to the transactions grouped by the associated dimension. Occurrence: Always |
dimensionMetrics.metrics.benchmark | MetricBenchmark | This complex type defines a set of benchmark data, which includes the average rating for the group included in the benchmark evaluation and the seller's calculated customer service metric rating for the benchmark. This container is returned only if the associated metricKey value is RATE . Occurrence: Always |
dimensionMetrics.metrics.benchmark.adjustment | RatingAdjustmentTypeEnum | If this field is present, it indicates that the rating given to the seller was "adjusted" for one reason or another. If eBay determines that the normal rating of a seller is impacted by circumstances beyond their control, they can issue an override to adjust the rating given to the seller. Occurrence: Conditional |
dimensionMetrics.metrics.benchmark.basis | BenchmarkTypeEnum | This field returns the "basis" by which the benchmark is calculated for the customer service metric type. Currently, the only supported basis is PEER_BENCHMARK . Occurrence: Always |
dimensionMetrics.metrics.benchmark.metadata | BenchmarkMetadata | This field contains the benchmark data. Occurrence: Conditional |
dimensionMetrics.metrics.benchmark.metadata.average | string | This field returns the average value for the group, as defined by the specified basis. When the benchmark basis is set to PEER_BENCHMARK , the value returned in this field is the benchmark value to which the seller's metric value is compared to determine the seller's rating for the customer service metric. Occurrence: Conditional |
dimensionMetrics.metrics.benchmark.rating | RatingTypeEnum | This field returns seller's rating for the customer service metric. The rating is set to a value that equals the relative deviation between the seller's metric value and the benchmark value for the customer service metric. Deviation values range from LOW to VERY HIGH , and the lower the deviation, the better the seller rating. Occurrence: Always |
dimensionMetrics.metrics.distributions | array of MetricDistribution | Returned when metricKey equals COUNT , this field returns an array of seller data where each set of data is grouped according by an overarching basis. When the seller distribution is returned, the numeric value of the associated value container equals the sum of the transactions where the seller meets the criteria of the customer service metric type for the given dimension during the evaluationCycle. Occurrence: Conditional |
dimensionMetrics.metrics.distributions.basis | string | This field returns the basis, or the method, by which the metric rating is calculated. Occurrence: Conditional |
dimensionMetrics.metrics.distributions.data | array of Distribution | This field returns a list of name/value pairs, where the name indicates the distribution being rated and the value indicates the count of seller transactions that meet the distribution criteria. Occurrence: Conditional |
dimensionMetrics.metrics.distributions.data.name | string | The name of a distribution in which the seller is active. Occurrence: Conditional |
dimensionMetrics.metrics.distributions.data.value | string | This field contains the number of transactions the seller had in the distribution (identified by the associated name field) during the metric evaluationCycle. Occurrence: Conditional |
dimensionMetrics.metrics.metricKey | string | This field indicates the customer service metric being returned in the associated metrics container. The field is set as follows:
Occurrence: Always |
dimensionMetrics.metrics.value | string | This field is set to the seller's numeric rating for the associated metricKey for the given dimension during the evaluationCycle. To determine the seller's rating for this metric, the value of this field is compared to the average metric value of the group. Occurrence: Always |
evaluationCycle | EvaluationCycle | This complex type defines the evaluation type (CURRENT or PROJECTED ) and the transaction lookback period used to calculate the seller's customer service metric. Occurrence: Always |
evaluationCycle.endDate | string | End date and time of the transaction lookback range. All timestamps are based on Mountain Standard Time (MST). The timestamp is formatted as an ISO 8601 string, which is based on the 24-hour Coordinated Universal Time (UTC) clock. Occurrence: Always |
evaluationCycle.evaluationDate | string | The ISO-8601 date and time at which the seller was evaluated for this customer service metric rating. Occurrence: Always |
evaluationCycle.evaluationType | EvaluationTypeEnum | This field specifies the transaction lookback period used for the evaluation. The evaluation_type value specified in the request is returned in this field. There are two possible values:
Occurrence: Always |
evaluationCycle.startDate | string | The start date and time of the transaction lookback range. All timestamps are based on Mountain Standard Time (MST). The timestamp is formatted as an ISO 8601 string, which is based on the 24-hour Coordinated Universal Time (UTC) clock. Format: [YYYY]-[MM]-[DD]T[hh]:[mm]:[ss].[sss]Z Example: 2018-08-04T07:09:00.000Z Occurrence: Always |
marketplaceId | MarketplaceIdEnum | The eBay marketplace ID of the marketplace upon which the customer service metric evaluation is based. The customer_service_metric resource supports a limited set of marketplaces. For a complete list of the supported marketplaces, please see the Service metrics policy page. Occurrence: Conditional |
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.
Status | Meaning |
---|---|
200 | Success |
400 | Bad Request |
404 | Resource not found. Invalid path parameters. |
409 | Business error |
500 | Internal Server Error |
Error codes
For more on errors, plus the codes of other common errors, see Handling errors.
Code | Domain | Category | Meaning |
---|---|---|---|
54000 | API_ANALYTICS | APPLICATION | There was a problem with an eBay internal system or process. Contact eBay developer support for assistance. |
54200 | API_ANALYTICS | BUSINESS | The specified customer service metric is not available for the provided evaluation type and marketplace. Possible error causes are (1) Customer Service Metric values are not returned if the Seller does not have a valid transaction on the specified marketplace during the past 12 months or (2) sellers can retrieve CURRENT values only after they have been active on the specified marketplace for a complete benchmarking period. |
54400 | API_ANALYTICS | REQUEST | The specified customer service metric type is not a valid type. Valid metric types are ITEM_NOT_AS_DESCRIBED or ITEM_NOT_RECEIVED. |
54401 | API_ANALYTICS | REQUEST | The specified marketplace ID is not a supported marketplace. For a complete list of the supported marketplace IDs, see the documentation. |
54402 | API_ANALYTICS | REQUEST | The specified evaluation type is not a valid type. Valid evaluation types are CURRENT or PROJECTED. |
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: Customer service metric: Item Not As Described
For details on using and understanding the response from getCustomerServiceMetric, see Interpreting customer service metric ratings.
Input
- Set customer_service_metric_type to
ITEM_NOT_AS_DESCRIBED
. - Set evaluation_type to
CURRENT
. - Set evaluation_marketplace_id to
EBAY_GB
.
Output
Because the request sets the customer_service_metric_type URI parameter to
ITEM_NOT_AS_DESCRIBED
, the dimension elements in the response have metricKey set to LISTING_CATEGORY
. The example below shows the different types of dimension elements you can expect to receive in an INAD set of metrics.
Sample 2: Customer service metric: Item Not Received
Input
- Set customer_service_metric_type to
ITEM_NOT_RECEIVED
. - Set evaluation_type to
PROJECTED
. - Set evaluation_marketplace_id to
EBAY_GB
.
Output
Because customer_service_metric_type is set to
ITEM_NOT_RECEIVED
, the dimension elements in the response have metricKey set to SHIPPING_REGION
. The response returns metrics for the three shipping corridors.