Difference between revisions of "API Image"
From Spiffy Stores Knowledge Base
(Created page with "The Spiffy Stores API Image object represents an image that may belong to either a product or a collection. Images can be in either <code>.png</code>, <code>.gif</code> or <co...") |
m |
||
Line 2: | Line 2: | ||
You can view a product or collection's images, update them, create new ones, and delete them. | You can view a product or collection's images, update them, create new ones, and delete them. | ||
+ | |||
+ | == Image Properties == | ||
+ | |||
+ | <html> | ||
+ | <style type="text/css"> | ||
+ | table.wikitable td { padding: 10px 20px !important; text-align: left; vertical-align: middle; } | ||
+ | </style> | ||
+ | </html> | ||
+ | {| class="wikitable" style="width: 100%" | ||
+ | |style="width: 30%"|id | ||
+ | |<code>{ "id" : 123456789 }</code><br/> | ||
+ | A unique numeric identifier for the image. | ||
+ | |- | ||
+ | |position | ||
+ | |<code>{ "position" : 1 }</code><br/> | ||
+ | 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 | ||
+ | |<code>{ "alt" : "This is the alt text for the image" }</code><br/> | ||
+ | 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 | ||
+ | |<code>{ "filename" : "cute-puppy.jpg" }</code><br/> | ||
+ | The filename of the image is the base name of the image file as originally uploaded. | ||
+ | |- | ||
+ | |src | ||
+ | |<code>{ "src" : "http://server1.spiffystores.com/sites/4/products/123456789_cute_puppy_full.jpg?6afd63d069abc37a673dd3927e283633" }</code><br/> | ||
+ | Specifies the full URL for the image. | ||
+ | |- | ||
+ | |product_id | ||
+ | |<code>{ "product_id" : 123456789 } | ||
+ | The id of the image's associated product. | ||
+ | |- | ||
+ | |collection_id | ||
+ | |<code>{ "collection_id" : 123456789 } | ||
+ | The id of the image's associated collection. | ||
+ | |} |
Revision as of 10:34, 20 November 2014
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 }
|
collection_id | { "collection_id" : 123456789 }
|