API Documentation

In-depth reference documentation for iQmetrix API's.

NAV

ENDPOINTS

RESOURCES

Asset

An Asset is an image or video associated with a Product.

{
    "id": "09fe1ee4-42b1-43a6-bd80-cd2bda21e90a",
    "name": "49ebd282-4161-4a9d-9b40-a5a20d144b6f.png",
    "height": 1024,
    "href": "https://amsdemo.iqmetrix.net/images/09fe1ee4-42b1-43a6-bd80-cd2bda21e90a.png",
    "md5Checksum": "1f88a2813737aa0019a63069586055ed",
    "mimeType": "image/png",
    "width": 502,
    "success": true,
    "sizeInBytes": 1227661
}
Name Description
id (GUID) Unique identifier
name (String) File name
height (Integer) Height in pixels
href (String) URL that points to an actual file where the digital asset is stored
md5Checksum (String) String that can be used for upload integrity checks or comparing two assets
mimeType (String) The mime type
width (Integer) Width in pixels
success (Boolean) A flag to indicate that the Asset was uploaded. This only appears when asset is first uploaded
sizeInBytes (Decimal) Size of the image in bytes

REQUESTS

POST an Asset

Definition

POST /assets

Example Request

POST /assets
Authorization: Bearer (Access Token)
Accept: application/json
Content-Type: multipart/form-data

Request Parameters

Response Parameters

Example Response

HTTP 201 Content-Type: application/json
{
    "id": "09fe1ee4-42b1-43a6-bd80-cd2bda21e90a",
    "name": "49ebd282-4161-4a9d-9b40-a5a20d144b6f.png",
    "height": 1024,
    "href": "https://amsdemo.iqmetrix.net/images/09fe1ee4-42b1-43a6-bd80-cd2bda21e90a.png",
    "md5Checksum": "1f88a2813737aa0019a63069586055ed",
    "mimeType": "image/png",
    "width": 502,
    "success": true,
    "sizeInBytes": 1227661
}

Asset

GET an Asset

Definition

GET /assets/{AssetId}

Example Request

GET /assets/09fe1ee4-42b1-43a6-bd80-cd2bda21e90a
Accept: application/json

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
{
    "id": "09fe1ee4-42b1-43a6-bd80-cd2bda21e90a",
    "name": "49ebd282-4161-4a9d-9b40-a5a20d144b6f.png",
    "height": 1024,
    "href": "https://amsdemo.iqmetrix.net/images/09fe1ee4-42b1-43a6-bd80-cd2bda21e90a.png",
    "md5Checksum": "1f88a2813737aa0019a63069586055ed",
    "mimeType": "image/png",
    "width": 502
}          

Asset

Redirecting to an Image Asset

A successful response to this request is a HTTP 303 redirect with a Location header pointing to the actual file where the digital asset is stored

Definition

GET /images/{AssetId}

Example Request

GET /images/09fe1ee4-42b1-43a6-bd80-cd2bda21e90a

URI Parameters

Response Parameters

Example Response

HTTP 303 Content-Type: application/text
Location: https://amsdemo.iqmetrix.net/images/09fe1ee4-42b1-43a6-bd80-cd2bda21e90a.png

ERRORS

HTTP Status Code Description How to Resolve
HTTP 400 Bad Request Ensure the Asset is of the correct type for the action (i.e. an image for /images endpoints)
HTTP 400 Bad Request Ensure you are only uploading one Asset at a time
HTTP 400 Bad Request Ensure file was attached to request
HTTP 404 Asset Media Service Error: Resource not found Ensure Asset GUID is valid and the Asset exists
Was this page helpful?