GET/customer_service_metric/{customer_service_metric_type}/{evaluation_type}
Use this method to retrieve a seller's performance and rating for the customer service metric.
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 details on using and understanding the response from this method, see Interpreting customer service metric ratings.
Input
Resource URI
This method is supported in Sandbox environment. To access the endpoint, just replace the api.ebay.com
root URI with api.sandbox.ebay.com
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 evaluation period to use for the performance metrics. See EvaluationTypeEnum for more information on the supported values. 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
All requests made to eBay REST operations require you to provide the Authorization
HTTP header for authentication authorization.
All other standard RESTful request headers are optional. For more information on standard RESTful request headers, see the HTTP request headers- opens rest request components page table.
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.
Request payload
This call has no payload.
Request fields
This call has no field definitions.
Output
HTTP response headers
This call has no response headers.
Response payload
Response fields
Output container/field | Type | Description |
---|---|---|
dimensionMetrics | array of DimensionMetric | This container provides a seller's customer service metric performance for a given dimension.
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. Occurrence: Always |
dimensionMetrics.dimension.dimensionKey | DimensionTypeEnum | dimensionKey defines the basis against which the seller's customer service metric is measured.
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.
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. 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. Occurrence: Conditional |
dimensionMetrics.metrics.benchmark.basis | BenchmarkTypeEnum | This field returns the "basis" by which the benchmark is calculated for the customer service metric type. 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. Occurrence: Conditional |
dimensionMetrics.metrics.benchmark.rating | RatingTypeEnum | This field returns seller's rating for the customer service metric. Occurrence: Always |
dimensionMetrics.metrics.distributions | array of MetricDistribution | Returned when metricKey equals 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. Occurrence: Always |
evaluationCycle | EvaluationCycle | This complex type defines the evaluation type ( Occurrence: Always |
evaluationCycle.endDate | string | End date and time of the transaction lookback range. All timestamps are based on Mountain Standard Time (MST). 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.
Occurrence: Always |
evaluationCycle.startDate | string | The start date and time of the transaction lookback range. All timestamps are based on Mountain Standard Time (MST). Occurrence: Always |
marketplaceId | MarketplaceIdEnum | The eBay marketplace ID of the marketplace upon which the customer service metric evaluation is based. 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
This call has no 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
This example shows the CURRENT customer service metrics for Item not as described transactions.
For details on using and understanding the response from getCustomerServiceMetric, see Interpreting customer service metric ratings.
Input
This method does not use a request payload, but configures an INAD request with the following URI parameters:
- Set customer_service_metric_type to
ITEM_NOT_AS_DESCRIBED
. - Set evaluation_type to
CURRENT
. - Set evaluation_marketplace_id to
EBAY_GB
.
GEThttps://api.ebay.com/sell/analytics/v1/customer_service_metric/ITEM_NOT_AS_DESCRIBED/CURRENT?evaluation_marketplace_id=EBAY_GB
Output
When successful, the call returns a response similar to this example sample shown.
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
This example shows the PROJECTED customer service metrics for Item not received transactions.
Input
There is no request payload for this call. Instead, this example configures the INR request using these URI parameters:
- Set customer_service_metric_type to
ITEM_NOT_RECEIVED
. - Set evaluation_type to
PROJECTED
. - Set evaluation_marketplace_id to
EBAY_GB
.
GEThttps://api.ebay.com/sell/analytics/v1/customer_service_metric/ITEM_NOT_RECEIVED/PROJECTED?evaluation_marketplace_id=EBAY_US
Output
When successful, the call returns a response payload similar to the sample shown.
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.