API Image

From Spiffy Stores Knowledge Base

The Spiffy Stores API Image object represents an image that may belong to either a product or a collection. Images can be in either .png, .gif or .jpg format.

You can view a product or collection's images, update them, create new ones, and delete them.

Image Properties

id { "id" : 123456789 }

A unique numeric identifier for the image.

position { "position" : 1 }

The position of the image in the ordered list of images. The first image has a position of 1 and is the main image for the product or collection.

alt { "alt" : "This is the alt text for the image" }

Images may have some associated alternative text which can be used when the image can't be displayed. It also provided additional information for screen readers and search engines.

filename { "filename" : "cute-puppy.jpg" }

The filename of the image is the base name of the image file as originally uploaded.

src { "src" : "http://server1.spiffystores.com/sites/4/products/123456789_cute_puppy_full.jpg?6afd63d069abc37a673dd3927e283633" }

Specifies the full URL for the image.

product_id { "product_id" : 123456789 }

The id of the image's associated product.

collection_id { "collection_id" : 123456789 }

The id of the image's associated collection.