Class ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost

All Implemented Interfaces:
ClientRequestCommand<ProductTailoring>, CreateHttpRequestCommand, HttpRequestCommand<ProductTailoring>, RequestCommand<ProductTailoring>

public class ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost extends TypeBodyApiMethod<ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost,ProductTailoring,File>

Uploads a JPEG, PNG and GIF file to a ProductVariantTailoring. The maximum file size of the image is 10MB. Either variant or sku is required to update a specific ProductVariant. If neither is provided, the image is uploaded to the Master Variant of the Product.

The response status code depends on the size of the original image. If the image is small, the API responds with 200 OK, and if the image is larger, it responds with 202 Accepted. The Product returned with a 202 Accepted status code contains a warnings field with an ImageProcessingOngoing Warning.

Produces the ProductTailoringImageAdded Message.



   CompletableFuture<ApiHttpResponse<com.commercetools.api.models.product_tailoring.ProductTailoring>> result = apiRoot
            .withProjectKey("{projectKey}")
            .inStoreKeyWithStoreKeyValue("{storeKey}")
            .products()
            .withProductKey("{productKey}")
            .productTailoring()
            .images()
            .post(file)
            .execute()