Not able to add an image to collectionUpdate request for the first time

AlexO_Stibo
Shopify Partner
5 0 1

Hi, here is the problem that I'm facing using Shopify API:

 

  1. Create collection using collectionCreate request without image

  2. Collection saves properly

  3. Update the same already saved collection with an image (name: cat.jpeg, extension: jpeg, size: <1 MB, URL: AWS URL) using collectionUpdate request

  4. Update response contains error: {src=> "Error updating collection with this image")

  5. Fun facts: 
    1. If createCollection is requested at the beginning with cat.jpeg image it works fine
    2. If collectionUpdate fails with "Error updating..." and then cat.jpeg image is changed for a different one, it works fine. If cat.jpeg is updated once again after a different image, it works fine as well. 
    3. It fails interchangeable for updating different images instead of cat.jpeg for the first update

I've tried to stageUpload before collectionUpdate and put Shopify resourceUrl as a image URL, and after successful stageUpload I got this from collectionUpdate: 

Image upload failed. [NonRetryableStagedUploadError] Downloading image failed with: Unable to fetch asset from GCS staged upload key:

I would be really grateful for your answer.

Replies 0 (0)