Image Updating

Finding Listing Images

You can use a GET request to find image IDs:

curl -XGET 
-H "Content-Type: application/hal+json" 
-H "Accept: application/hal+json" 
-H "Accept-Version: 3.0" 
-H "Authorization: Bearer [personal_token]"
https://api.reverb.com/api/listings/[listing_id]/images/ \

Imagine IDs will be displayed in the JSON as shown below:

... "id": 87485553,
            "url": "https://images.reverb.com/image/upload/s--EOrcRpbh--/f_auto,t_supersize/v1594674306/mjxfct2ffn6oicsn8arm.png",...

Reorganizing Images

In order to override existing images, you can use the following PUT request to swap existing image URLs (do note that the image URLs have to be the exact original URLs you originally uploaded to Reverb):

curl -XPUT \
-H "Content-Type: application/hal+json" 
-H "Accept: application/hal+json" 
-H "Accept-Version: 3.0" 
-H "Authorization: Bearer [personal_token]"
  https://api.reverb.com/api/listings/[id] \
  -d '{
  "photos": [
    "https://yourhost.com/original_image_1.jpg",
    "https://yourhost.com/original_image_3.jpg",
    "https://yourhost.com/original_image_2.jpg",
  ],
  "photo_upload_method": "override_position"
}'

The example above would swap the second image with the third, changing the image order from Image 1, Image 2, Image 3, to Image 1, Image 3, Image 2.

To add images to a listing, you would send a PUT request with the new image URLs you wish to add.

Deleting an Image

In order to delete an image, you would use a DELETE request with the following endpoint, substituting your listing ID and the image ID:

curl -XDELETE 
-H "Content-Type: application/hal+json" 
-H "Accept: application/hal+json" 
-H "Accept-Version: 3.0" 
-H "Authorization: Bearer [personal_token]"
https://api.reverb.com/api/listings/[listing_id]/images/[image_id] \