Class UploadsApi


  • public class UploadsApi
    extends java.lang.Object
    • Constructor Detail

      • UploadsApi

        public UploadsApi​(ApiClient apiClient)
    • Method Detail

      • getApiClient

        public ApiClient getApiClient()
      • setApiClient

        public void setApiClient​(ApiClient apiClient)
      • createUploadDestinationForResourceCall

        public okhttp3.Call createUploadDestinationForResourceCall​(java.util.List<java.lang.String> marketplaceIds,
                                                                   java.lang.String contentMD5,
                                                                   java.lang.String resource,
                                                                   java.lang.String contentType,
                                                                   ProgressResponseBody.ProgressListener progressListener,
                                                                   ProgressRequestBody.ProgressRequestListener progressRequestListener)
                                                            throws ApiException,
                                                                   LWAException
        Build call for createUploadDestinationForResource
        Parameters:
        marketplaceIds - The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)
        contentMD5 - An MD5 hash of the content to be submitted to the upload destination. This value is used to determine if the data has been corrupted or tampered with during transit. (required)
        resource - The upload destination for your resource. For example, if you create an upload destination for the `createLegalDisclosure` operation of the Messaging API, the `{resource}` would be `/messaging/v1/orders/{amazonOrderId}/messages/legalDisclosure`, and the entire path would be `/uploads/2020-11-01/uploadDestinations/messaging/v1/orders/{amazonOrderId}/messages/legalDisclosure`. If you create an upload destination for an Aplus content document, the `{resource}` would be `aplus/2020-11-01/contentDocuments` and the path would be `/uploads/2020-11-01/uploadDestinations/aplus/2020-11-01/contentDocuments`. (required)
        contentType - The content type of the file you upload. (optional)
        progressListener - Progress listener
        progressRequestListener - Progress request listener
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
        LWAException - If calls to fetch LWA access token fails
      • createUploadDestinationForResource

        public CreateUploadDestinationResponse createUploadDestinationForResource​(java.util.List<java.lang.String> marketplaceIds,
                                                                                  java.lang.String contentMD5,
                                                                                  java.lang.String resource,
                                                                                  java.lang.String contentType)
                                                                           throws ApiException,
                                                                                  LWAException
        Creates an upload destination, returning the information required to upload a file to the destination and to programmatically access the file. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | 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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        Parameters:
        marketplaceIds - The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)
        contentMD5 - An MD5 hash of the content to be submitted to the upload destination. This value is used to determine if the data has been corrupted or tampered with during transit. (required)
        resource - The upload destination for your resource. For example, if you create an upload destination for the `createLegalDisclosure` operation of the Messaging API, the `{resource}` would be `/messaging/v1/orders/{amazonOrderId}/messages/legalDisclosure`, and the entire path would be `/uploads/2020-11-01/uploadDestinations/messaging/v1/orders/{amazonOrderId}/messages/legalDisclosure`. If you create an upload destination for an Aplus content document, the `{resource}` would be `aplus/2020-11-01/contentDocuments` and the path would be `/uploads/2020-11-01/uploadDestinations/aplus/2020-11-01/contentDocuments`. (required)
        contentType - The content type of the file you upload. (optional)
        Returns:
        CreateUploadDestinationResponse
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
        LWAException - If calls to fetch LWA access token fails
      • createUploadDestinationForResourceWithHttpInfo

        public ApiResponse<CreateUploadDestinationResponse> createUploadDestinationForResourceWithHttpInfo​(java.util.List<java.lang.String> marketplaceIds,
                                                                                                           java.lang.String contentMD5,
                                                                                                           java.lang.String resource,
                                                                                                           java.lang.String contentType)
                                                                                                    throws ApiException,
                                                                                                           LWAException
        Creates an upload destination, returning the information required to upload a file to the destination and to programmatically access the file. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | 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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        Parameters:
        marketplaceIds - The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)
        contentMD5 - An MD5 hash of the content to be submitted to the upload destination. This value is used to determine if the data has been corrupted or tampered with during transit. (required)
        resource - The upload destination for your resource. For example, if you create an upload destination for the `createLegalDisclosure` operation of the Messaging API, the `{resource}` would be `/messaging/v1/orders/{amazonOrderId}/messages/legalDisclosure`, and the entire path would be `/uploads/2020-11-01/uploadDestinations/messaging/v1/orders/{amazonOrderId}/messages/legalDisclosure`. If you create an upload destination for an Aplus content document, the `{resource}` would be `aplus/2020-11-01/contentDocuments` and the path would be `/uploads/2020-11-01/uploadDestinations/aplus/2020-11-01/contentDocuments`. (required)
        contentType - The content type of the file you upload. (optional)
        Returns:
        ApiResponse<CreateUploadDestinationResponse>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
        LWAException - If calls to fetch LWA access token fails
      • createUploadDestinationForResourceAsync

        public okhttp3.Call createUploadDestinationForResourceAsync​(java.util.List<java.lang.String> marketplaceIds,
                                                                    java.lang.String contentMD5,
                                                                    java.lang.String resource,
                                                                    java.lang.String contentType,
                                                                    ApiCallback<CreateUploadDestinationResponse> callback)
                                                             throws ApiException,
                                                                    LWAException
        (asynchronously) Creates an upload destination, returning the information required to upload a file to the destination and to programmatically access the file. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | 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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        Parameters:
        marketplaceIds - The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)
        contentMD5 - An MD5 hash of the content to be submitted to the upload destination. This value is used to determine if the data has been corrupted or tampered with during transit. (required)
        resource - The upload destination for your resource. For example, if you create an upload destination for the `createLegalDisclosure` operation of the Messaging API, the `{resource}` would be `/messaging/v1/orders/{amazonOrderId}/messages/legalDisclosure`, and the entire path would be `/uploads/2020-11-01/uploadDestinations/messaging/v1/orders/{amazonOrderId}/messages/legalDisclosure`. If you create an upload destination for an Aplus content document, the `{resource}` would be `aplus/2020-11-01/contentDocuments` and the path would be `/uploads/2020-11-01/uploadDestinations/aplus/2020-11-01/contentDocuments`. (required)
        contentType - The content type of the file you upload. (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 object
        LWAException - If calls to fetch LWA access token fails