Images
This section will explain how to create and retrieve an Image.
They say an image is worth a thousand words, right? With our API, you can upload images and use them to showcase your products. We use Amazon Web Services to store and serve them through a CDN, so you'll get a good response time and your images stay secure.
Should I set my image to public or private?
__Public images can be used for products, resources, user avatars, etc. Private ones could be used for bills or invoices, for example.
You can only set images to be private programmatically. Images added by an admin on the dashboard will automatically be set to public
Image Object
Attribute | Type | Description |
|
| The image's name. |
|
| The file type of the image uploaded. |
|
| A boolean indicating if the image is public. The default value is |
|
| The full URL of the public image. |
|
| The image's description. |
|
| The image's title. |
|
| A relative path that you can use to retrieve images. See example below. Whenever possible, use the |
Create an Image
To create an Image
object , which can be associated with products, you can either upload the image to us or supply us with a public URL. We recommend you only link to images and URLs you own and have control over.
Create an Image from a File
Body Parameters | Type | Description |
|
| The image you want to upload. |
|
| Allows you to add some metadata for the image. |
|
| A boolean indicating if the image is public. The default value is |
|
| Gives a title to the image. |
|
| Gives a description to the image. |
Create an Image from a URL
Body Parameters | Type | Description |
|
| The public URL you want to use for your image. |
|
| A boolean indicating if the image is public. The default value is |
|
| Gives a title to the image. |
|
| Gives a description to the image. |
Get an Image by URL
The recommended way to get images is by the image's relative URL, e.g. {IMG_ID}/name, provided in the Image object. However, if you prefer, you can see an example of how to retrieve images using the relative URL below.
Body Parameters | Type | Description |
|
| The image's URL. |
Last updated