rhysnhall/etsy-php-sdk

updateVariationImages 404 error - "Resource Not Found"

Closed this issue · 2 comments

I Found an issue while updating variation images using updateVariationImages
After printing the actual response I got a "Resource Not Found" Error and it is due to request method

  /**
   * Updates variation images for the listing. You MUST pass data for ALL variation images, including the ones you are not updating, as this method will override all existing variation images.
   *
   * @link https://developers.etsy.com/documentation/reference#operation/updateVariationImages
   * @param array $data
   * @return Etsy\Collection[Etsy\Resources\ListingVariationImage]
   */
  public function updateVariationImages(array $data) {
    return $this->request(
      "PUT",
      "/application/shops/{$this->shop_id}/listings/{$this->listing_id}/variation-images",
      "ListingVariationImage",
      $data
    );
  }
  
  As Per doc it should be of POST type instead of PUT 
  
  https://developer.etsy.com/documentation/reference/#operation/updateVariationImages
  
    public function updateVariationImages(array $data) {
    return $this->request(
      "POST",
      "/application/shops/{$this->shop_id}/listings/{$this->listing_id}/variation-images",
      "ListingVariationImage",
      $data
    );
  }

Thanks for this. I will have a look and update.
Have you tested it with the POST to confirm that works?

Thanks for this. I will have a look and update.
Have you tested it with the POST to confirm that works?

Yes i tested with POST its working