Images

Upload and store images with Moov to build an image collection. Link images to products in your product catalog.

Use the images API to upload an image up to 16MB in PNG, JPG, or WebP format. Every image will be given a unique imageID, which can be linked to products in your product catalog, enhancing your transfer UI.

View the product catalog guide for more information on how to use images with products.

Upload image

In addition to the image itself, you can supply alt-text through the metadata field. Duplicate images and images larger than 16MB will be rejected.

1
2
3
4
5
6
7
8
curl -X POST "https://api.moov.io/accounts/{accountID}/images" \
  -H "Authorization: Bearer {token}" \
  --data '{
    "image": "00010101011111000101010110",
    "metadata": {
      "altText": "Blue oat milk carton by Fancy Brand"
    }
  }'\

The response will include an imageID which can be used to get metadata, replace, or delete an image.

The link is the public URL to access the image. You can add a size={width}x{height} parameter to the public URL to resize the image. Additionally, the publicID is a unique identifier which is used in the URL and can also be used in public endpoints.

1
2
3
4
5
6
7
8
{
  "imageID": "bbdcb050-2e05-43cb-812a-e1296cd0c01a",
  "publicID": "string",
  "altText": "string",
  "link": "https://api.moov.io/images/qJRAaAwwF5hmfeAFdHjIb",
  "createdOn": "2019-08-24T14:15:22Z",
  "updatedOn": "2019-08-24T14:15:22Z"
}

Manage images

Once an image has been uploaded, you can retrieve a list of all image metadata, or get a singular image's metadata. You can also update an image's metadata, or replace an existing image, including its metadata.

Deleting an image permanently removes it from Moov.

Retrieve metadata

Retrieve a list of all image metadata, or get metadata for a specific image.

1
2
curl -X GET "https://api.moov.io/accounts/{accountID}/images/" \
  -H "Authorization: Bearer {token}" \
1
2
curl -X GET "https://api.moov.io/accounts/{accountID}/images/{imageID}" \
  -H "Authorization: Bearer {token}" \

Update an image

You can replace an image and, optionally, its metadata, or you can just update its metadata.

1
2
3
4
5
6
7
8
curl -X PUT "https://api.moov.io/accounts/{accountID}/images/{imageID}" \
  -H "Authorization: Bearer {token}" \
  --data '{
    "image": "00010101011111001111000101010",
    "metadata": {
      "altText": "Red soy milk carton by Fancy Brand"
    }
  }'\
1
2
3
4
5
6
7
curl -X PUT "https://api.moov.io/accounts/{accountID}/images/{imageID}/metadata" \
  -H "Authorization: Bearer {token}" \
  --data '{
    "metadata": {
      "altText": "New! Updated recipe, blue oat milk by Fancy Brand"
    }
  }'\

Delete an image

Deleting an image permanently removes it from your collection stored with Moov.

1
2
curl -X DELETE "https://api.moov.io/accounts/{accountID}/images/{imageID}" \
  -H "Authorization: Bearer {token}" \
Summary Beta