販売API v1ユースケースガイド
セールス API のユースケース。
APIバージョン:v1
販売APIとは何ですか?
The Selling Partner API for Sales (Sales API) provides sellers with sales performance information. This is achieved through returning aggregated order metrics for a given period of time, broken down by granularity, and buyer type. Refer to the Sales API Reference for details about Sales API operations and associated data types and schemas.
前提条件
このチュートリアルを正常に完了するには、次のものが必要です。
- Authorization from the selling partner for whom you are making calls. Refer to Authorizing Selling Partner API applications for more information.
- The Pricing role assigned to your developer profile.
- The Pricing role selected in the App registration page for your application.
チュートリアル:販売実績情報を受け取る
このセクションでは、販売APIを使用して販売実績情報を受け取るプロセスについて説明します。
販売実績情報を入手する
Call the getOrderMetrics
operation with the following parameters to receive aggregated order metrics for a given interval:
クエリーパラメーター:
パラメーター | 説明 | 必須 |
marketplaceIds |
マーケットプレイス識別子。注文が行われたマーケットプレイスを指定します。指定できるマーケットプレイスは1つだけです。 たとえば、 タイプ:<文字列>配列 |
はい |
interval |
A time interval used for selecting order metrics. This takes the form of two dates separated by two hyphens (first date is inclusive; second date is exclusive). Dates are in ISO 8601 format and must represent absolute time (either Z notation or offset notation). 例: タイプ:文字列 |
はい |
granularityTimeZone |
1日の境界を決定するためのIANA互換のタイムゾーン。時間より大きい粒度値を指定する場合は必須です。 例:米国/太平洋地域で、米国/太平洋地域の夏時間を考慮して日境界を計算する。 タイプ:文字列 |
いいえ |
granularity |
時間単位に基づく注文指標のグループ分けの 例:リクエスト間隔の日次内訳を取得する日。ここで、日の境界は Type: enum (Granularity) |
はい |
buyerType |
指定する購入者タイプ、 例:レスポンスにB2B購入者のみの注文指標を含める場合は、 Type: enum (BuyerType) |
いいえ |
fulfillmentNetwork |
指定したフルフィルメントネットワーク、 例:Amazonフルフィルメントネットワークのみの注文指標をレスポンスに含める場合は、 タイプ:文字列 |
いいえ |
firstDayOfWeek |
例:週を日曜日に始める場合は、 Type: enum (FirstDayOfWeek) |
いいえ |
asin |
指定したASINで結果をフィルタリングします。 例:レスポンスに タイプ:文字列 |
いいえ |
sku |
指定したSKUで結果をフィルタリングします。 例:レスポンスにSKU タイプ:文字列 |
いいえ |
リクエストの例
GET https://sellingpartnerapi-na.amazon.com/sales/v1/orderMetrics?marketplaceIds=&interval=&granularityTimeZone=&granularity=&buyerType=&fulfillmentNetwork=&firstDayOfWeek=&asin=&sku="
レスポンス
パラメーター | 説明 | 必須 |
interval |
要求された粒度に基づく時間間隔(例:時間、日など)。これがリストの最初または最後の間隔で、要求された間隔が要求された粒度と一致しない場合、不完全なデータが含まれる可能性があります (例:リクエスト間隔が タイプ:文字列 |
はい |
unitCount |
指定されたフィルターに基づく注文のユニット数。 タイプ:整数 |
はい |
orderItemCount |
指定されたフィルターに基づく注文品目の数。 タイプ:整数 |
はい |
orderCount |
指定されたフィルターに基づく注文数。 タイプ:整数 |
はい |
averageUnitPrice |
指定されたフィルターに基づく商品の平均価格。数式は、totalSales/unitCountになります。 Type: Money |
はい |
totalSales |
指定されたフィルターに基づく、すべての注文の総注文商品売上。 Type: Money |
はい |
レスポンスの例
{
"request": {
"parameters": {
"granularity": {
"value": "Day"
}
}
},
"response": {
"payload": [
{
"interval": "2019-08-01T00:00-07:00--2018-08-02T00:00-07:00",
"unitCount": 1,
"orderItemCount": 1,
"orderCount": 1,
"averageUnitPrice": {
"amount": "22.95",
"currencyCode": "USD"
},
"totalSales": {
"amount": "22.95",
"currencyCode": "USD"
}
},
{
"interval": "2019-08-02T00:00-07:00--2018-08-03T00:00-07:00",
"unitCount": 1,
"orderItemCount": 1,
"orderCount": 1,
"averageUnitPrice": {
"amount": "2.05",
"currencyCode": "USD"
},
"totalSales": {
"amount": "2.05",
"currencyCode": "USD"
}
}
]
}
}
Updated 5 months ago