Retrieves the store’s image types, such as main. Use it to look up the ImageType_ID you pass to ProductImage_Add or ProductImage_Update_Type.
Before you begin#
- The API token needs
ImageTypeList_Load_Query, either assigned directly under Functions or through a group. See Create an API token. - Requests must be signed if the token requires it. See Make a signed request with HMAC.
Example requests#
Retrieve image types#
Returns up to 42 image types, sorted by code.
{
"Store_Code": "{{Store_Code}}",
"Miva_Request_Timestamp": "{{$timestamp}}",
"Function": "ImageTypeList_Load_Query",
"Count": 42,
"Offset": 0,
"Sort": "code"
}
Request parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
count |
Number | No | Maximum lines of data allowed to be returned in the response. This limit is used to prevent excessive amounts of data return |
filter |
String | No | A string for filtering returned data |
offset |
Number | No | Used with the Count parameter for paginating results of large datasets. Default 0 is no offset. |
sort |
String | No | The order for sorting returned data |
Example response#
{
"success": 1,
"data": {
"total_count": 1,
"start_offset": 0,
"data": [
{
"id": 1,
"code": "main",
"descrip": "Main"
}
]
}
}
Response parameters#
| Parameter | Type | Description |
|---|---|---|
success |
Boolean | Boolean value indicating if the API request was successful |
total_count |
Number | The number of image types returned |
start_offset |
Number | The offset starting point for pagination of return data |
id |
Number | The image id |
code |
String | The code for the image |
descrip |
String | The description of the image |
Additional options#
List Load Query overview explains the Filter format and every operator.
Pagination#
Count and Offset page through results, and the response’s total_count says how many image types match. See Pagination.
Related functions#
| Function | Use it to |
|---|---|
ProductImage_Add |
Add an image to a product with an image type |
ProductImage_Update_Type |
Change the image type of a product image |
ProductImage_Delete |
Remove an image from a product |
Image_Add |
Add an image to the store |
Try in Postman#
In the Miva: JSON API: Authenticated collection, open Products > ImageTypeList_Load_Query. See Set Up Postman.