macropage/sdk-ebay-rest-analytics

<i>分析API</i> 提供关于卖家及其eBay业务的详细数据和信息。<br><br>此API中的资源和方法允许卖家查看他们的列表表现信息、客户服务表现指标以及他们的eBay卖家评级详情。

dev-master 2021-02-02 10:55 UTC

This package is auto-updated.

Last update: 2024-08-29 05:19:00 UTC


README

<i>分析API</i> 提供关于卖家及其eBay业务的详细数据和信息。

此API中的资源和方法允许卖家查看他们的列表表现信息、客户服务表现指标以及他们的eBay卖家评级详情。

分析API中的三个资源提供了以下数据和信息

  • 客户服务指标 - 与同一组其他卖家相比,提供卖家客户服务表现的数据。
  • 流量报告 - 提供显示买家如何参与卖家列表的数据。
  • 卖家标准配置文件 - 提供关于卖家评级表现的数据。
卖家可以使用各种分析API方法返回的数据和信息来确定他们可以在哪里进行改进以增加销售额,以及他们如何可能改善eBay买家对他们的卖家状态的看法。

有关使用此API的详细信息,请参阅 <a href="/api-docs/sell/static/performance/analyzing-performance.html" title="Selling Integration Guide">分析卖家表现</a>。

此PHP包由 OpenAPI Generator 项目自动生成

  • API版本:1.2.0
  • 包版本:2.3.2
  • 构建包:org.openapitools.codegen.languages.PhpClientCodegen

需求

PHP 5.5及更高版本

安装 & 使用

Composer

要使用Composer安装绑定,请将以下内容添加到 composer.json

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/macropage/sdk-ebay-rest-analytics.git"
    }
  ],
  "require": {
    "macropage/sdk-ebay-rest-analytics": "*@dev"
  }
}

然后运行 composer install

手动安装

下载文件并包含 autoload.php

    require_once('/path/to/sdk-ebay-rest-analytics/vendor/autoload.php');

测试

要运行单元测试

composer install
./vendor/bin/phpunit

入门

请遵循 安装说明,然后运行以下命令

<?php
require_once(__DIR__ . '/vendor/autoload.php');



// Configure OAuth2 access token for authorization: api_auth
$config = macropage\SDKs\ebay\rest\analytics\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new macropage\SDKs\ebay\rest\analytics\Api\CustomerServiceMetricApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$customerServiceMetricType = 'customerServiceMetricType_example'; // string | Use this path parameter to specify the type of customer service metrics and benchmark data you want returned for the seller. Supported types are: ITEM_NOT_AS_DESCRIBED ITEM_NOT_RECEIVED
$evaluationMarketplaceId = 'evaluationMarketplaceId_example'; // string | 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. For implementation help, refer to eBay API documentation at https://developer.ebay.com/devzone/rest/api-ref/analytics/types/MarketplaceIdEnum.html
$evaluationType = 'evaluationType_example'; // string | Use this path parameter to specify the type of the seller evaluation you want returned, either: CURRENT &ndash; A monthly evaluation that occurs on the 20th of every month. PROJECTED &ndash; A daily evaluation that provides a projection of how the seller is currently performing with regards to the upcoming evaluation period.

try {
    $result = $apiInstance->getCustomerServiceMetric($customerServiceMetricType, $evaluationMarketplaceId, $evaluationType);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomerServiceMetricApi->getCustomerServiceMetric: ', $e->getMessage(), PHP_EOL;
}

?>

API端点文档

所有URI都是相对于 https://api.ebay.com/sell/analytics/v1

模型文档

授权文档

api_auth

作者