Class SalesApi
- java.lang.Object
-
- software.amazon.spapi.api.sales.v1.SalesApi
-
public class SalesApi extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SalesApi.Builder
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ApiClient
getApiClient()
GetOrderMetricsResponse
getOrderMetrics(java.util.List<java.lang.String> marketplaceIds, java.lang.String interval, java.lang.String granularity, java.lang.String granularityTimeZone, java.lang.String buyerType, java.lang.String fulfillmentNetwork, java.lang.String firstDayOfWeek, java.lang.String asin, java.lang.String sku)
Returns aggregated order metrics for given interval, broken down by granularity, for given buyer type.okhttp3.Call
getOrderMetricsAsync(java.util.List<java.lang.String> marketplaceIds, java.lang.String interval, java.lang.String granularity, java.lang.String granularityTimeZone, java.lang.String buyerType, java.lang.String fulfillmentNetwork, java.lang.String firstDayOfWeek, java.lang.String asin, java.lang.String sku, ApiCallback<GetOrderMetricsResponse> callback)
(asynchronously) Returns aggregated order metrics for given interval, broken down by granularity, for given buyer type.okhttp3.Call
getOrderMetricsCall(java.util.List<java.lang.String> marketplaceIds, java.lang.String interval, java.lang.String granularity, java.lang.String granularityTimeZone, java.lang.String buyerType, java.lang.String fulfillmentNetwork, java.lang.String firstDayOfWeek, java.lang.String asin, java.lang.String sku, ProgressResponseBody.ProgressListener progressListener, ProgressRequestBody.ProgressRequestListener progressRequestListener)
Build call for getOrderMetricsApiResponse<GetOrderMetricsResponse>
getOrderMetricsWithHttpInfo(java.util.List<java.lang.String> marketplaceIds, java.lang.String interval, java.lang.String granularity, java.lang.String granularityTimeZone, java.lang.String buyerType, java.lang.String fulfillmentNetwork, java.lang.String firstDayOfWeek, java.lang.String asin, java.lang.String sku)
Returns aggregated order metrics for given interval, broken down by granularity, for given buyer type.void
setApiClient(ApiClient apiClient)
-
-
-
Constructor Detail
-
SalesApi
public SalesApi(ApiClient apiClient)
-
-
Method Detail
-
getApiClient
public ApiClient getApiClient()
-
setApiClient
public void setApiClient(ApiClient apiClient)
-
getOrderMetricsCall
public okhttp3.Call getOrderMetricsCall(java.util.List<java.lang.String> marketplaceIds, java.lang.String interval, java.lang.String granularity, java.lang.String granularityTimeZone, java.lang.String buyerType, java.lang.String fulfillmentNetwork, java.lang.String firstDayOfWeek, java.lang.String asin, java.lang.String sku, ProgressResponseBody.ProgressListener progressListener, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, LWAException
Build call for getOrderMetrics- Parameters:
marketplaceIds
- A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. For example, ATVPDKIKX0DER indicates the US marketplace. (required)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 ISO8601 format and must represent absolute time (either Z notation or offset notation). Example: 2018-09-01T00:00:00-07:00--2018-09-04T00:00:00-07:00 requests order metrics for Sept 1st, 2nd and 3rd in the -07:00 zone. (required)granularity
- The granularity of the grouping of order metrics, based on a unit of time. Specifying granularity=Hour results in a successful request only if the interval specified is less than or equal to 30 days from now. For all other granularities, the interval specified must be less or equal to 2 years from now. Specifying granularity=Total results in order metrics that are aggregated over the entire interval that you specify. If the interval start and end date don’t align with the specified granularity, the head and tail end of the response interval will contain partial data. Example: Day to get a daily breakdown of the request interval, where the day boundary is defined by the granularityTimeZone. (required)granularityTimeZone
- An IANA-compatible time zone for determining the day boundary. Required when specifying a granularity value greater than Hour. The granularityTimeZone value must align with the offset of the specified interval value. For example, if the interval value uses Z notation, then granularityTimeZone must be UTC. If the interval value uses an offset, then granularityTimeZone must be an IANA-compatible time zone that matches the offset. Example: US/Pacific to compute day boundaries, accounting for daylight time savings, for US/Pacific zone. (optional)buyerType
- Filters the results by the buyer type that you specify, B2B (business to business) or B2C (business to customer). Example: B2B, if you want the response to include order metrics for only B2B buyers. (optional, default to All)fulfillmentNetwork
- Filters the results by the fulfillment network that you specify, MFN (merchant fulfillment network) or AFN (Amazon fulfillment network). Do not include this filter if you want the response to include order metrics for all fulfillment networks. Example: AFN, if you want the response to include order metrics for only Amazon fulfillment network. (optional)firstDayOfWeek
- Specifies the day that the week starts on when granularity=Week, either Monday or Sunday. Default: Monday. Example: Sunday, if you want the week to start on a Sunday. (optional, default to Monday)asin
- Filters the results by the ASIN that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all ASINs. Example: B0792R1RSN, if you want the response to include order metrics for only ASIN B0792R1RSN. (optional)sku
- Filters the results by the SKU that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all SKUs. Example: TestSKU, if you want the response to include order metrics for only SKU TestSKU. (optional)progressListener
- Progress listenerprogressRequestListener
- Progress request listener- Returns:
- Call to execute
- Throws:
ApiException
- If fail to serialize the request body objectLWAException
- If calls to fetch LWA access token fails
-
getOrderMetrics
public GetOrderMetricsResponse getOrderMetrics(java.util.List<java.lang.String> marketplaceIds, java.lang.String interval, java.lang.String granularity, java.lang.String granularityTimeZone, java.lang.String buyerType, java.lang.String fulfillmentNetwork, java.lang.String firstDayOfWeek, java.lang.String asin, java.lang.String sku) throws ApiException, LWAException
Returns aggregated order metrics for given interval, broken down by granularity, for given buyer type. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | .5 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).- Parameters:
marketplaceIds
- A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. For example, ATVPDKIKX0DER indicates the US marketplace. (required)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 ISO8601 format and must represent absolute time (either Z notation or offset notation). Example: 2018-09-01T00:00:00-07:00--2018-09-04T00:00:00-07:00 requests order metrics for Sept 1st, 2nd and 3rd in the -07:00 zone. (required)granularity
- The granularity of the grouping of order metrics, based on a unit of time. Specifying granularity=Hour results in a successful request only if the interval specified is less than or equal to 30 days from now. For all other granularities, the interval specified must be less or equal to 2 years from now. Specifying granularity=Total results in order metrics that are aggregated over the entire interval that you specify. If the interval start and end date don’t align with the specified granularity, the head and tail end of the response interval will contain partial data. Example: Day to get a daily breakdown of the request interval, where the day boundary is defined by the granularityTimeZone. (required)granularityTimeZone
- An IANA-compatible time zone for determining the day boundary. Required when specifying a granularity value greater than Hour. The granularityTimeZone value must align with the offset of the specified interval value. For example, if the interval value uses Z notation, then granularityTimeZone must be UTC. If the interval value uses an offset, then granularityTimeZone must be an IANA-compatible time zone that matches the offset. Example: US/Pacific to compute day boundaries, accounting for daylight time savings, for US/Pacific zone. (optional)buyerType
- Filters the results by the buyer type that you specify, B2B (business to business) or B2C (business to customer). Example: B2B, if you want the response to include order metrics for only B2B buyers. (optional, default to All)fulfillmentNetwork
- Filters the results by the fulfillment network that you specify, MFN (merchant fulfillment network) or AFN (Amazon fulfillment network). Do not include this filter if you want the response to include order metrics for all fulfillment networks. Example: AFN, if you want the response to include order metrics for only Amazon fulfillment network. (optional)firstDayOfWeek
- Specifies the day that the week starts on when granularity=Week, either Monday or Sunday. Default: Monday. Example: Sunday, if you want the week to start on a Sunday. (optional, default to Monday)asin
- Filters the results by the ASIN that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all ASINs. Example: B0792R1RSN, if you want the response to include order metrics for only ASIN B0792R1RSN. (optional)sku
- Filters the results by the SKU that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all SKUs. Example: TestSKU, if you want the response to include order metrics for only SKU TestSKU. (optional)- Returns:
- GetOrderMetricsResponse
- Throws:
ApiException
- If fail to call the API, e.g. server error or cannot deserialize the response bodyLWAException
- If calls to fetch LWA access token fails
-
getOrderMetricsWithHttpInfo
public ApiResponse<GetOrderMetricsResponse> getOrderMetricsWithHttpInfo(java.util.List<java.lang.String> marketplaceIds, java.lang.String interval, java.lang.String granularity, java.lang.String granularityTimeZone, java.lang.String buyerType, java.lang.String fulfillmentNetwork, java.lang.String firstDayOfWeek, java.lang.String asin, java.lang.String sku) throws ApiException, LWAException
Returns aggregated order metrics for given interval, broken down by granularity, for given buyer type. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | .5 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).- Parameters:
marketplaceIds
- A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. For example, ATVPDKIKX0DER indicates the US marketplace. (required)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 ISO8601 format and must represent absolute time (either Z notation or offset notation). Example: 2018-09-01T00:00:00-07:00--2018-09-04T00:00:00-07:00 requests order metrics for Sept 1st, 2nd and 3rd in the -07:00 zone. (required)granularity
- The granularity of the grouping of order metrics, based on a unit of time. Specifying granularity=Hour results in a successful request only if the interval specified is less than or equal to 30 days from now. For all other granularities, the interval specified must be less or equal to 2 years from now. Specifying granularity=Total results in order metrics that are aggregated over the entire interval that you specify. If the interval start and end date don’t align with the specified granularity, the head and tail end of the response interval will contain partial data. Example: Day to get a daily breakdown of the request interval, where the day boundary is defined by the granularityTimeZone. (required)granularityTimeZone
- An IANA-compatible time zone for determining the day boundary. Required when specifying a granularity value greater than Hour. The granularityTimeZone value must align with the offset of the specified interval value. For example, if the interval value uses Z notation, then granularityTimeZone must be UTC. If the interval value uses an offset, then granularityTimeZone must be an IANA-compatible time zone that matches the offset. Example: US/Pacific to compute day boundaries, accounting for daylight time savings, for US/Pacific zone. (optional)buyerType
- Filters the results by the buyer type that you specify, B2B (business to business) or B2C (business to customer). Example: B2B, if you want the response to include order metrics for only B2B buyers. (optional, default to All)fulfillmentNetwork
- Filters the results by the fulfillment network that you specify, MFN (merchant fulfillment network) or AFN (Amazon fulfillment network). Do not include this filter if you want the response to include order metrics for all fulfillment networks. Example: AFN, if you want the response to include order metrics for only Amazon fulfillment network. (optional)firstDayOfWeek
- Specifies the day that the week starts on when granularity=Week, either Monday or Sunday. Default: Monday. Example: Sunday, if you want the week to start on a Sunday. (optional, default to Monday)asin
- Filters the results by the ASIN that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all ASINs. Example: B0792R1RSN, if you want the response to include order metrics for only ASIN B0792R1RSN. (optional)sku
- Filters the results by the SKU that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all SKUs. Example: TestSKU, if you want the response to include order metrics for only SKU TestSKU. (optional)- Returns:
- ApiResponse<GetOrderMetricsResponse>
- Throws:
ApiException
- If fail to call the API, e.g. server error or cannot deserialize the response bodyLWAException
- If calls to fetch LWA access token fails
-
getOrderMetricsAsync
public okhttp3.Call getOrderMetricsAsync(java.util.List<java.lang.String> marketplaceIds, java.lang.String interval, java.lang.String granularity, java.lang.String granularityTimeZone, java.lang.String buyerType, java.lang.String fulfillmentNetwork, java.lang.String firstDayOfWeek, java.lang.String asin, java.lang.String sku, ApiCallback<GetOrderMetricsResponse> callback) throws ApiException, LWAException
(asynchronously) Returns aggregated order metrics for given interval, broken down by granularity, for given buyer type. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | .5 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc:usage-plans-and-rate-limits-in-the-sp-api).- Parameters:
marketplaceIds
- A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. For example, ATVPDKIKX0DER indicates the US marketplace. (required)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 ISO8601 format and must represent absolute time (either Z notation or offset notation). Example: 2018-09-01T00:00:00-07:00--2018-09-04T00:00:00-07:00 requests order metrics for Sept 1st, 2nd and 3rd in the -07:00 zone. (required)granularity
- The granularity of the grouping of order metrics, based on a unit of time. Specifying granularity=Hour results in a successful request only if the interval specified is less than or equal to 30 days from now. For all other granularities, the interval specified must be less or equal to 2 years from now. Specifying granularity=Total results in order metrics that are aggregated over the entire interval that you specify. If the interval start and end date don’t align with the specified granularity, the head and tail end of the response interval will contain partial data. Example: Day to get a daily breakdown of the request interval, where the day boundary is defined by the granularityTimeZone. (required)granularityTimeZone
- An IANA-compatible time zone for determining the day boundary. Required when specifying a granularity value greater than Hour. The granularityTimeZone value must align with the offset of the specified interval value. For example, if the interval value uses Z notation, then granularityTimeZone must be UTC. If the interval value uses an offset, then granularityTimeZone must be an IANA-compatible time zone that matches the offset. Example: US/Pacific to compute day boundaries, accounting for daylight time savings, for US/Pacific zone. (optional)buyerType
- Filters the results by the buyer type that you specify, B2B (business to business) or B2C (business to customer). Example: B2B, if you want the response to include order metrics for only B2B buyers. (optional, default to All)fulfillmentNetwork
- Filters the results by the fulfillment network that you specify, MFN (merchant fulfillment network) or AFN (Amazon fulfillment network). Do not include this filter if you want the response to include order metrics for all fulfillment networks. Example: AFN, if you want the response to include order metrics for only Amazon fulfillment network. (optional)firstDayOfWeek
- Specifies the day that the week starts on when granularity=Week, either Monday or Sunday. Default: Monday. Example: Sunday, if you want the week to start on a Sunday. (optional, default to Monday)asin
- Filters the results by the ASIN that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all ASINs. Example: B0792R1RSN, if you want the response to include order metrics for only ASIN B0792R1RSN. (optional)sku
- Filters the results by the SKU that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all SKUs. Example: TestSKU, if you want the response to include order metrics for only SKU TestSKU. (optional)callback
- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException
- If fail to process the API call, e.g. serializing the request body objectLWAException
- If calls to fetch LWA access token fails
-
-