openapi: 3.0.0 info: title: eBay Account Advertising_eligibility Customer_service_metric_task API description: The Account API gives sellers the ability to configure their eBay seller accounts, including the seller's policies (eBay business policies and seller-defined custom policies), opt in and out of eBay seller programs, configure sales tax tables, and get account information.

For details on the availability of the methods in this API, see Account API requirements and restrictions. contact: name: eBay Inc, license: name: eBay API License Agreement url: https://go.developer.ebay.com/api-license-agreement version: v1.9.2 servers: - url: https://api.ebay.com{basePath} description: Production variables: basePath: default: /sell/account/v1 tags: - name: Customer_service_metric_task paths: /customer_service_metric_task: get: tags: - Customer_service_metric_task description: Use this method to return an array of customer service metric tasks. You can limit the tasks returned by specifying a date range.

Note: You can pass in either the look_back_days or date_range, but not both.

operationId: getCustomerServiceMetricTasks parameters: - name: date_range in: query description: 'The task creation date range. The results are filtered to include only tasks with a creation date that is equal to the dates specified or is within the specified range. Do not use with the look_back_days parameter.

Format: UTC

For example, tasks within a range:

yyyy-MM-ddThh:mm:ss.SSSZ..yyyy-MM-ddThh:mm:ss.SSSZ

Tasks created on March 8, 2020

2020-03-08T00:00.00.000Z..2020-03-09T00:00:00.000Z

Maximum: 90 days

' required: false schema: type: string - name: feed_type in: query description: The feed type associated with the tasks being retrieved. The only presently supported value is CUSTOMER_SERVICE_METRICS_REPORT. required: false schema: type: string - name: limit in: query description: The number of customer service metric tasks to return per page of the result set. Use this parameter in conjunction with the offset parameter to control the pagination of the output.

For example, if offset is set to 10 and limit is set to 10, the call retrieves tasks 11 thru 20 from the result set.

If this parameter is omitted, the default value is used.

Note:This feature employs a zero-based list, where the first item in the list has an offset of 0.

Default: 10

Maximum: 500

required: false schema: type: string - name: look_back_days in: query description: The number of previous days in which to search for tasks. Do not use with the date_range parameter. If both date_range and look_back_days are omitted, this parameter's default value is used.

Default value: 7

Range: 1-90 (inclusive)

required: false schema: type: string - name: offset in: query description: 'The number of customer service metric tasks to skip in the result set before returning the first task in the paginated response.

Combine offset with the limit query parameter to control the items returned in the response. For example, if you supply an offset of 0 and a limit of 10, the first page of the response contains the first 10 items from the complete list of items retrieved by the call. If offset is 10 and limit is 20, the first page of the response contains items 11-30 from the complete result set.

Default: 0' required: false schema: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/CustomerServiceMetricTaskCollection' '400': description: Bad Request x-response-codes: errors: '160002': domain: API_FEED category: REQUEST description: The authentication scope {scope} is incorrect for 'feed_type' {feedType}. Refer to documentation for details about the scopes. '160005': domain: API_FEED category: REQUEST description: Both 'feed_type' and 'schedule_id' were provided. Please remove one of them. '160006': domain: API_FEED category: REQUEST description: The 'feed_type' {feedTypeValue} is invalid. '160008': domain: API_FEED category: REQUEST description: Both 'look_back_days' and 'date_range' were provided. Please remove one of them. '160009': domain: API_FEED category: REQUEST description: The format of the 'date_range' is invalid. The format for a date range is yyyy-MM-ddThh:mm:ss.SSSZ..yyyy-MM-ddThh:mm:ss.SSSZ. '160010': domain: API_FEED category: REQUEST description: The 'date_range' must be less than or equal to 90 days. '160011': domain: API_FEED category: REQUEST description: The 'look_back_days' value must be greater than zero and less than or equal to 90. '160012': domain: API_FEED category: REQUEST description: The 'limit' value must be greater than zero and less than or equal to 500. '160013': domain: API_FEED category: REQUEST description: The 'offset' value cannot be less than zero. '160029': domain: API_FEED category: REQUEST description: The 'offset' value must be a multiple of the 'limit' value. '403': description: Forbidden '500': description: Internal Server Error x-response-codes: errors: '160001': domain: API_FEED category: APPLICATION description: There was a problem with an eBay internal system or process. Contact eBay Developer Technical Support for assistance. security: - api_auth: - https://api.ebay.com/oauth/api_scope/sell.analytics.readonly post: tags: - Customer_service_metric_task description:

Use this method to create a customer service metrics download task with filter criteria for the customer service metrics report. When using this method, specify the feedType and filterCriteria including both evaluationMarketplaceId and customerServiceMetricType for the report. The method returns the location response header containing the call URI to use with getCustomerServiceMetricTask to retrieve status and details on the task.

Only CURRENT Customer Service Metrics reports can be generated with the Sell Feed API. PROJECTED reports are not supported at this time. See the getCustomerServiceMetric method document in the Analytics API for more information about these two types of reports.

Note: Before calling this API, retrieve the summary of the seller's performance and rating for the customer service metric by calling getCustomerServiceMetric (part of the Analytics API). You can then populate the create task request fields with the values from the response. This technique eliminates failed tasks that request a report for a customerServiceMetricType and evaluationMarketplaceId that are without evaluation.

operationId: createCustomerServiceMetricTask parameters: - name: Accept-Language in: header description: Use this header to specify the natural language in which the authenticated user desires the response. For example, en-US for English or de-DE for German. required: true schema: type: string - name: Content-Type in: header description: This header indicates the format of the request body provided by the client. Its value should be set to application/json.

For more information, refer to HTTP request headers. required: true schema: type: string requestBody: description: Request payload containing version, feedType, and optional filterCriteria. content: application/json: schema: description: Request payload containing version, feedType, and optional filterCriteria. $ref: '#/components/schemas/CreateServiceMetricsTaskRequest' required: true responses: '202': description: Accepted '400': description: Bad Request x-response-codes: errors: '160017': domain: API_FEED category: REQUEST description: The 'feedType' is missing or invalid. '160018': domain: API_FEED category: REQUEST description: The 'schemaVersion' is invalid. '160024': domain: API_FEED category: REQUEST description: You have reached the maximum number of feed tasks that can be queued or processed concurrently. Wait for current tasks to complete before adding tasks. For more information, see the documentation for this API. '160025': domain: API_FEED category: REQUEST description: You have exceeded the maximum number of feed tasks that can be created or processed in a given period (hour or day). Wait until the present period ends before adding tasks. For more information, see the documentation for this API. '164500': domain: API_FEED category: REQUEST description: The 'customerServiceMetricType' in 'filterCriteria' is not a valid type. Valid metric types are ITEM_NOT_AS_DESCRIBED or ITEM_NOT_RECEIVED. '164501': domain: API_FEED category: REQUEST description: The 'evaluationMarketplaceId' in 'filterCriteria' is not a supported marketplace. For a complete list of the supported marketplace IDs, see the documentation. '164502': domain: API_FEED category: REQUEST description: The 'listingCategories' in 'filterCriteria' or some part of the 'listingCategories' is invalid. {additionalInfo} '164503': domain: API_FEED category: REQUEST description: The 'shippingRegions' in 'filterCriteria' or some part of the 'shippingRegions' is invalid. {additionalInfo} '164504': domain: API_FEED category: REQUEST description: The Accept-Language header is missing or invalid. '164505': domain: API_FEED category: REQUEST description: The 'filterCriteria' is missing or invalid. '164506': domain: API_FEED category: REQUEST description: The 'listingCategories' is not applicable to the 'customerServiceMetricType' {customerServiceMetricType} in 'filterCriteria'. '164507': domain: API_FEED category: REQUEST description: The 'shippingRegions' is not applicable to the 'customerServiceMetricType' {customerServiceMetricType} in 'filterCriteria'. '403': description: Forbidden '500': description: Internal Server Error x-response-codes: errors: '160001': domain: API_FEED category: APPLICATION description: There was a problem with an eBay internal system or process. Contact eBay Developer Technical Support for assistance. security: - api_auth: - https://api.ebay.com/oauth/api_scope/sell.analytics.readonly /customer_service_metric_task/{task_id}: get: tags: - Customer_service_metric_task description:

Use this method to retrieve customer service metric task details for the specified task. The input is task_id.

operationId: getCustomerServiceMetricTask parameters: - name: task_id in: path description: This path parameter is the unique identifier of the customer service metric task being retrieved.

Use the getCustomerServiceMetricTasks method to retrieve task IDs. required: true schema: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/ServiceMetricsTask' '400': description: Bad Request x-response-codes: errors: '160002': domain: API_FEED category: REQUEST description: The authentication scope {scope} is incorrect for 'feed_type' {feedType}. Refer to documentation for details about the scopes. '160003': domain: API_FEED category: REQUEST description: Task {taskID} does not exist. '403': description: Forbidden '404': description: Not Found '500': description: Internal Server Error x-response-codes: errors: '160001': domain: API_FEED category: APPLICATION description: There was a problem with an eBay internal system or process. Contact eBay Developer Technical Support for assistance. security: - api_auth: - https://api.ebay.com/oauth/api_scope/sell.analytics.readonly components: schemas: CreateServiceMetricsTaskRequest: type: object properties: feedType: type: string description: The feedType specified for the customer service metric task being created. The report lists the transaction details that contribute to the service metrics evaluation. Supported types include:

CUSTOMER_SERVICE_METRICS_REPORT

filterCriteria: description: This container is used to customize and set criteria for Customer Service Metric report that will be associated with the task. $ref: '#/components/schemas/CustomerServiceMetricsFilterCriteria' schemaVersion: type: string description: The version number of the customer service metric.

Note: This field must have a value of 1.0. description: The type that defines the fields for the Customer Service Metric reports generated with the Feed API. ServiceMetricsTask: type: object properties: completionDate: type: string description: The timestamp when the customer service metrics task went into the COMPLETED or COMPLETED_WITH_ERROR state. This field is only returned if the status is one of the two completed values. This state means that eBay has compiled the report for the seller based on the seller’s filter criteria, and the seller can run a getResultFile call to download the report. creationDate: type: string description: The date the customer service metrics task was created. detailHref: type: string description: The relative getCustomerServiceMetricTask call URI path to retrieve the corresponding task. feedType: type: string description: The feed type associated with the task. filterCriteria: description: This container shows the criteria set for the report. $ref: '#/components/schemas/CustomerServiceMetricsFilterCriteria' schemaVersion: type: string description: 'The schema version number of the file format. If omitted, the default value is used.

Default value: 1.0

' status: type: string description: An enumeration value that indicates the state of the task. See FeedStatusEnum for values. For implementation help, refer to eBay API documentation taskId: type: string description: The unique eBay-assigned ID of the task. CustomerServiceMetricsFilterCriteria: type: object properties: customerServiceMetricType: type: string description: An enumeration value that specifies the customer service metric that eBay tracks to measure seller performance.

See CustomerServiceMetricTypeEnum for values. For implementation help, refer to eBay API documentation evaluationMarketplaceId: type: string description: An enumeration value that specifies the eBay marketplace where the evaluation occurs.

See MarketplaceIdEnum for values. For implementation help, refer to eBay API documentation listingCategories: type: array description: 'A list of listing category IDs on which the service metric is measured. A seller can use one or more L1 (top-level) eBay categories to get metrics specific to those L1 categories. The Category IDs for each L1 category are required. Category ID values for L1 categories can be retrieved using the Taxonomy API.

Note: Pass this attribute to narrow down your filter results for the ITEM_NOT_AS_DESCRIBED customerServiceMetricType.

Supported categories include:

primary(L1) category Id

' items: type: string shippingRegions: type: array description: 'A list of shipping region enumeration values on which the service metric is measured. This comma delimited array allows the seller to customize the report to focus on domestic or international shipping.

Note: Pass this attribute to narrow down your filter results for the ITEM_NOT_RECEIVED customerServiceMetricType.

Supported categories include:

primary(L1) category Id

See ShippingRegionTypeEnum for values' items: type: string description: ' For implementation help, refer to eBay API documentation' description: A complex data type that filters data for report creation. See CustomerServiceMetricsFilterCriteria for fields and descriptions. CustomerServiceMetricTaskCollection: type: object properties: href: type: string description: The URI of the current page of results. limit: type: integer description: The value of the limit parameter submitted in the request, which is the maximum number of tasks to return per page, from the result set. A result set is the complete set of tasks returned by the method.

Note: Even though this parameter is not required to be submitted in the request, the parameter defaults to 10 if omitted.

Note: If this is the last or only page of the result set, the page may contain fewer tasks than the limit value. To determine the number of pages in a result set, divide the total value (total number of tasks matching input criteria) by this limit value, and then round up to the next integer. For example, if the total value was 120 (120 total tasks) and the limit value was 50 (show 50 tasks per page), the total number of pages in the result set is three, so the seller would have to make three separate getCustomerServiceMetricTasks calls to view all tasks matching the input criteria.

format: int32 next: type: string description: The relative path to the call URI for the next page of results. This value is returned if there is an additional page of results to return from the result set. offset: type: integer description: 'The number of results skipped in the result set before returning the first result. This value can be set in the request with the offset query parameter.

Note: The items in a paginated result set use a zero-based list where the first item in the list has an offset of 0.

' format: int32 prev: type: string description: The URI for the previous page of results. This parameter is returned if a previous page of results from the result set exists. tasks: type: array description: An array of the customer service tasks on this page. The tasks are sorted by creation date. An empty array is returned if the filter criteria excludes all tasks. items: $ref: '#/components/schemas/ServiceMetricsTask' total: type: integer description: The total number of tasks that match the criteria. format: int32 securitySchemes: api_auth: type: oauth2 description: The security definitions for this API. Please check individual operations for applicable scopes. flows: authorizationCode: authorizationUrl: https://auth.ebay.com/oauth2/authorize tokenUrl: https://api.ebay.com/identity/v1/oauth2/token scopes: https://api.ebay.com/oauth/api_scope/sell.account.readonly: View your account settings https://api.ebay.com/oauth/api_scope/sell.account: View and manage your account settings