CategoryProductList_Load_Query
#
Description#
This function allows you to load a list of products assigned to a specific category.
Request Body Parameters#
Parameter |
Type | Description |
---|---|---|
count |
Number | Count is used to tell Miva how many records to return. |
offset |
Offset | Used in conjunction with the Count parameter for paginating results of large datasets. Default is 0 . |
sort |
String | Field to sort results by. Available sorting fields listed below. Use - prefix for a descending sort. |
filter |
Object | Array of Object containing search filters. See usage here |
category_id category_code edit_category |
Number String String |
The category id being updated The category code being updated The category name being updated |
Assigned |
Boolean | Assigned. Defaults to true if omitted |
Unassigned |
Boolean | Unassigned. Defaults to false if omitted. |
On Demand Columns#
Parameter |
Description |
---|---|
descrip |
Full HTML product description |
catcount |
Number of categories the product is assigned to |
productinventorysettings |
Product specific inventory settings |
attributes |
Includes attribute object in response |
productimagedata |
Product Image including Image Types and non image types |
categories |
Product Category Assignments |
productshippingrules |
Includes product dimensions and restricted shipping methods (if any) |
relatedproduct |
Related product assignments |
uris |
Includes URI’s object in response. Canonical URI is the default URL for the product. |
Customfield_Values:* "Customfield_Values:<Module Code>:<Field Code>" "Customfield_Values:<Module Code>:*" |
Includes All Custom Fields In The Output Includes That Specific Field In The Output Includes All Fields For The Specified Module In The Output |
Other custom Filters#
Name | Description |
---|---|
Product_Show |
All , Uncategorized or Active (All is default) |
Supported Search Filter Columns#
Column |
Description |
---|---|
code |
Product code |
sku |
Product SKU |
cancat_code |
Canonical Category Code |
page_code |
Alternate Display Page |
name |
Product Name |
thumbnail |
Product Thumbnail Image |
image |
Product Image |
price |
Product Price |
cost |
Product Cost |
descrip |
Product Description |
weight |
Product Weight |
taxable |
Product Taxable |
page_title |
Product Meta Title |
dt_created |
Unix Timestamp |
dt_Updated |
Unix Timestamp |
category |
Supports only IN and NOT_IN operators. Accepts a comma separated list of category IDs. Limits results to products in the specified |
product_inventory |
Searches the product’s inventory level (not accounting for baskets) |
Supported Sort Columns#
One of these values would be passed in the sort request parameter to have the results sorted by that column. Value may be preceded by “-” for a descending sort.
Column |
Description |
---|---|
code |
The code associated with the product. |
sku |
The stock keeping unit (SKU) of the product. |
cancat_code |
The category code associated with the product. |
page_code |
The page code associated with the product. |
name |
The name of the product. |
thumbnail |
The URL or path to the thumbnail image of the product. |
image |
The URL or path to the full-size image of the product. |
price |
The price of the product. |
cost |
The cost of the product. |
descrip |
The description of the product. |
weight |
The weight of the product. |
taxable |
Indicates whether the product is taxable or not (Boolean: true/false). |
page_title |
The title of the page associated with the product. |
dt_created |
The Unix timestamp indicating the date and time when the product was created. |
dt_Updated |
The Unix timestamp indicating the date and time when the product was last updated. |
Response Parameters#
Parameter |
Type | Description |
---|---|---|
total_count |
Number | total_count is the total number of records that match your search criteria. Note: this is not always the total products returned. Based on the Count and Offset parameters passed, the number of records returned could be different than the total_count. |
start_offset |
Number | Number number of the starting offset number of products to return. Used in conjunction with the Count parameter for paginating results of large datasets. |
id |
Number | Product Id |
code |
String | Miva Product Code (unique) |
Sku |
String | Product SKU |
thumbnail |
String | This field is depreciated and is supported for legacy purposes. Relative Path to the product thumbnail image. |
image |
String | This field is depreciated and is supported for legacy purposes. Relative Path to the product fullsize image. |
price |
Number | Product Price |
formatted_price |
String | Currency Formatted Product Price |
cost |
Number | Product Cost |
formatted_cost |
String | Currency Formatted Product Cost |
weight |
Number | Product Weight |
taxable |
Boolean | true /false flag if the product is taxable |
active |
Boolean | true /false flag if the product is active |
page_title |
String | Product Page Title - used in HTML title tag within head |
dt_created |
Unix Timestamp | Unix timestamp product was created |
dt_Updated |
Unix Timestamp | Unix timestamp product was last updated |
descrip |
String | Full HTML product description |
catcount |
Number | Number of categories the product is assigned to |
productinventorysettings |
Object | Product specific inventory |
attributes |
Object | Includes attribute object in response |
productimagedata |
Object | Product Image including Image Types and non image types |
categories |
Object | Product Category Assignments |
productshippingrules |
Object | Includes product dimensions and restricted shipping methods (if any) |
relatedproduct |
Object | Related product assignments |
uris |
Object | Includes URI’s object in response. Canonical URI is the default URL for the product. |
CustomField_Values:\* |
Object | Object containing custom field modules and values of custom fields called in request |
productinventorysettings
Object#
Parameter |
Type | Description |
---|---|---|
active |
Boolean | Product inventory active |
in_short |
String | In Stock Message (Short) |
in_long |
String | In Stock Message (Long) |
low_track |
Number | Track Low Stock Level |
low_level |
Number | Low Stock Level |
low_lvl_d |
Boolean | Low Stock Level Default |
low_short |
String | Low Stock Message (Short) |
low_long |
String | Low Stock Message (Long) |
out_track |
String | Track Out of Stock Level |
out_hide |
String | Hide Out of Stock Products |
out_level |
Number | Out of Stock Level |
out_lvl_d |
Boolean | Out of Stock Level Default |
out_short |
String | Out of Stock Message (Short) |
out_long |
String | Out of Stock Message (Long) |
ltd_long |
String | Limited Stock Message |
attributes
Object#
Parameter |
Type | Description |
---|---|---|
id |
Number | Attribute ID |
product_id |
Number | Product ID assigned |
default_id |
Number | Option ID set to Default |
disp_order |
Number | Display order |
attemp_id |
Number | Attribute Template ID |
code |
String | Attribute Code |
type |
String | Attribute Type |
prompt |
String | Attribute Type |
price |
Number | Attribute Price |
cost |
Number | Attribute Cost |
weight |
Number | Attribute weight |
required |
Boolean | Attribute Required |
inventory |
Boolean | Attribute Inventory Active |
image |
String | Attribute Image |
productimagedata
Object#
Parameter |
Type | Description |
---|---|---|
id |
Number | Image ID |
product_id |
Number | Product ID of Product Assigned to Image |
image_id |
Number | Alternate Image ID Value |
type_id |
Number | Image Type ID |
code |
String | Image Type Code |
type_desc |
String | Image Type Description |
image |
String | Image Path |
width |
Number | Image Width |
height |
Number | Image Height |
disp_order |
Number | Image Display Order |
categories
Object#
Parameter |
Type | Description |
---|---|---|
id |
Number | Category ID |
parent_id |
Number | Category Parent ID |
agrpcount |
Number | Category Product Count |
depth |
Number | Category Depth |
disp_order |
Number | Category Display Order |
page_code |
String | Category Alternate Display Code |
code |
String | Category Code |
name |
String | Category Name |
page_title |
String | Category Page Title |
active |
Boolean | Category Active |
dt_created |
Unix Timestamp | Category Date Created |
dt_Updated |
Unix Timestamp | Category Date Updated |
productshippingrules
Object#
Parameter |
Type | Description |
---|---|---|
product_id |
Number | Product ID |
ownpackage |
Boolean | Product Always Ships in Separate Packaging |
width |
Number | Product Package Width |
length |
Number | Product Package Length |
height |
Number | Product Package Height |
limitmeths |
Boolean | Limit Shipping Methods |
methods |
Object | Permitted Shipping Methods Object |
methods.mod_code |
String | Shipping Module Code |
methods.meth_code |
String | Shipping Method Code |
relatedproduct
Object#
Parameter |
Type | Description |
---|---|---|
id |
Number | Product ID |
disp_order |
Number | Product Display Order |
code |
String | Product Code |
sku |
String | Product SKU |
name |
String | Product Name |
thumbnail |
String | Product Thumbnail |
image |
String | Product Image |
price |
Number | Product Price |
formatted_price |
String | Product Formatted Price |
cost |
Number | Product Cost |
formatted_cost |
String | Product Formatted Cost |
page_code |
String | Product Alternate Display Page Code |
page_id |
Number | Product Alternate Display Page ID |
weight |
Number | Product Weight |
taxable |
Boolean | Product Taxable |
active |
Boolean | Product Active |
page_title |
String | Product Page Title |
dt_created |
Unix Timestamp | Product Date Created |
dt_Updated |
Unix Timestamp | Product Date Updated |
uris
Object#
Parameter |
Type | Description |
---|---|---|
id |
Number | URI ID |
uri |
String | URI Path |
store_id |
Number | URI Store ID |
screen |
String | URI Screen Assigned |
page_code |
String | URI Page Code Assigned |
cat_id |
Number | URI Category ID Assigned |
product_id |
Number | URI Product ID Assigned |
feed_id |
Number | URI Feed ID Assigned |
canonical |
Boolean | Canonical URI |
status |
Number | URI Status |
CustomField_Values
Object#
Parameter |
Type | Description |
---|---|---|
cmp-cssui-pchdft |
object | Product Header and Footer Object |
cmp-cssui-pchdft.header |
String | Product Header |
cmp-cssui-pchdft.footer |
String | Product Footer |
cmp-mv-prodctgy-meta |
object | Product Meta Object |
cmp-mv-prodctgy-meta.keywords |
String | Product Meta Keywords |
cmp-mv-prodctgy-meta.description |
String | Product Meta Description |
customfields |
object | Customfield Object |
customfields
Object#
Parameter |
Type | Description |
---|---|---|
multi |
Object | Multi Customfield Object |
multi-text |
Object | Multi-text Customfield Object |
productimagecustomfields |
Object | Product Image Customfield Object (If module is activated) |
Example Request#
{
"Store_Code": "{{Store_Code}}",
"Miva_Request_Timestamp": "{{$timestamp}}",
"Function": "CategoryProductList_Load_Query",
"Assigned": true,
"Category_ID": 1035,
"count": 1,
"Filter": [
{
"name": "ondemandcolumns",
"value": ["descrip", "catcount", "attributes", "productimagedata", "categories", "productshippingrules", "relatedproducts", "uris", "productinventorysettings", "CustomField_Values:*"]
}
]
}
Example Response#
{
"success": 1,
"data": {
"total_count": 103,
"start_offset": 0,
"data": [
{
"assigned": true,
"id": 2911,
"disp_order": 2911,
"code": "ny__gift-card",
"sku": "",
"name": "Gift Card",
"thumbnail": "",
"image": "",
"price": 0.0,
"formatted_price": "$0.00",
"cost": 0.0,
"formatted_cost": "$0.00",
"page_code": "",
"page_id": 0,
"descrip": "This product was made with eco friendly materials and uses non toxic ink to align with our promise to providing sustainable products to our customers. This product ships in sustainable packaging that is bio durable and compostable. This product ships in 3-5 business days and your shipping cost will be shown at checkout",
"catcount": 2,
"weight": 0.0,
"taxable": true,
"active": true,
"page_title": "",
"dt_created": 1695750335,
"dt_Updated": 1708555982,
"productinventorysettings": {
"active": false,
"in_short": "",
"in_long": "",
"low_track": "d",
"low_level": 0,
"low_lvl_d": true,
"low_short": "",
"low_long": "",
"out_track": "d",
"out_hide": "d",
"out_level": 0,
"out_lvl_d": true,
"out_short": "",
"out_long": "",
"ltd_long": ""
},
"attributes": [
{
"id": 542,
"product_id": 2911,
"default_id": 0,
"disp_order": 544,
"attemp_id": 0,
"code": "gc-recipient",
"type": "text",
"prompt": "Gift Recipient's Email Address",
"price": 0.0,
"cost": 0.0,
"weight": 0.0,
"required": false,
"inventory": false,
"image": ""
},
{
"id": 543,
"product_id": 2911,
"default_id": 0,
"disp_order": 545,
"attemp_id": 0,
"code": "gc-message",
"type": "memo",
"prompt": "Send Recipient a Gift Message",
"price": 0.0,
"cost": 0.0,
"weight": 0.0,
"required": false,
"inventory": false,
"image": ""
},
{
"id": 544,
"product_id": 2911,
"default_id": 0,
"disp_order": 546,
"attemp_id": 0,
"code": "gc-price",
"type": "select",
"prompt": "Select Price",
"price": 0.0,
"cost": 0.0,
"weight": 0.0,
"required": true,
"inventory": false,
"image": "",
"options": [
{
"id": 2090,
"product_id": 2911,
"attr_id": 544,
"disp_order": 2098,
"code": "GFT-25",
"prompt": "$25",
"price": 25.0,
"cost": 0.0,
"weight": 0.0,
"image": ""
},
{
"id": 2091,
"product_id": 2911,
"attr_id": 544,
"disp_order": 2099,
"code": "GFT-50",
"prompt": "$50",
"price": 50.0,
"cost": 0.0,
"weight": 0.0,
"image": ""
},
{
"id": 2092,
"product_id": 2911,
"attr_id": 544,
"disp_order": 2100,
"code": "GFT-100",
"prompt": "$100",
"price": 100.0,
"cost": 0.0,
"weight": 0.0,
"image": ""
}
]
}
],
"productimagedata": [
{
"id": 334,
"product_id": 2911,
"image_id": 142,
"type_id": 1,
"code": "main",
"type_desc": "Main",
"image": "graphics/00000001/1/ny__gift-card--main.png",
"width": 274,
"height": 274,
"disp_order": 335
}
],
"categories": [
{
"id": 1024,
"parent_id": 0,
"agrpcount": 0,
"depth": 0,
"disp_order": 1024,
"page_code": "",
"code": "ny__sale",
"name": "Sale",
"page_title": "",
"active": true,
"dt_created": 1704227326,
"dt_Updated": 1704227427
},
{
"id": 1035,
"parent_id": 0,
"agrpcount": 0,
"depth": 0,
"disp_order": 1035,
"page_code": "",
"code": "featured",
"name": "Featured Products",
"page_title": "",
"active": true,
"dt_created": 1707347555,
"dt_Updated": 1708554851
}
],
"productshippingrules": {
"product_id": 2911,
"ownpackage": true,
"width": 10.0,
"length": 10.0,
"height": 10.0,
"limitmeths": false,
"methods": [
{
"mod_code": "flatrate",
"meth_code": "wholesale"
}
]
},
"relatedproducts": [
{
"id": 2912,
"disp_order": 2912,
"code": "ny__digital-template",
"sku": "",
"name": "Digital Template",
"thumbnail": "",
"image": "",
"price": 0.0,
"formatted_price": "$0.00",
"cost": 0.0,
"formatted_cost": "$0.00",
"page_code": "",
"page_id": 0,
"weight": 0.0,
"taxable": true,
"active": true,
"page_title": "",
"dt_created": 1695750335,
"dt_Updated": 1704227326
},
{
"id": 2913,
"disp_order": 2913,
"code": "ny__pre-fabricated-overhead-rain",
"sku": "NY-001",
"name": "Pre-Fabricated Overhead Rain Show - Ready to Install",
"thumbnail": "",
"image": "",
"price": 3000.0,
"formatted_price": "$3,000.00",
"cost": 2000.0,
"formatted_cost": "$2,000.00",
"page_code": "",
"page_id": 0,
"weight": 0.01,
"taxable": true,
"active": true,
"page_title": "",
"dt_created": 1695750335,
"dt_Updated": 1704989215
},
{
"id": 2914,
"disp_order": 2914,
"code": "ny__porcelain-toilet-bowl",
"sku": "NY-002",
"name": "Porcelain Toilet Bowl",
"thumbnail": "",
"image": "",
"price": 300.0,
"formatted_price": "$300.00",
"cost": 200.0,
"formatted_cost": "$200.00",
"page_code": "",
"page_id": 0,
"weight": 0.01,
"taxable": true,
"active": true,
"page_title": "",
"dt_created": 1695750335,
"dt_Updated": 1704227327
},
{
"id": 2915,
"disp_order": 2915,
"code": "ny__folding-chair-accent-piece-for-small-spaces",
"sku": "NY-003",
"name": "Folding Chair - Accent Piece for Small Spaces",
"thumbnail": "",
"image": "",
"price": 120.0,
"formatted_price": "$120.00",
"cost": 20.0,
"formatted_cost": "$20.00",
"page_code": "",
"page_id": 0,
"weight": 0.01,
"taxable": true,
"active": true,
"page_title": "",
"dt_created": 1695750335,
"dt_Updated": 1704227327
}
],
"uris": [
{
"id": 3262,
"uri": "/nine-yards-gift-card.html",
"store_id": 1,
"screen": "",
"page_code": "",
"cat_id": 0,
"product_id": 2911,
"feed_id": 0,
"canonical": true,
"status": 200
}
],
"CustomField_Values": {
"cmp-cssui-pchdft": {
"header": "",
"footer": ""
},
"cmp-mv-prodctgy-meta": {
"keywords": "",
"description": ""
},
"upsxml": {
"ups_additional_handling": "No",
"ups_delivery_confirmation": "Default",
"ups_fpackage": "",
"ups_fclass": "",
"ups_fnmfccom": "",
"ups_fnmfcsubcm": "",
"ups_fdanger": "0",
"ups_fdangermod": "0",
"hscode": "",
"origcntry": ""
},
"baskinv": {
"basket_inv": "0",
"total_inv": ""
},
"combofacets": {
"fitment": [],
"second": []
},
"customfields": {
"tabs_reviews": "",
"tabs_specifications": "",
"shipoverride": "",
"shipstation_upc": "",
"brand": "",
"product_flag": "",
"show_product": "1",
"multi": [],
"multi-text": []
},
"marketplaces": {
"googleshopping_item_id": "",
"googleshopping_title": "",
"googleshopping_condition": "",
"googleshopping_availability": "",
"googleshopping_description": "",
"googleshopping_product_category": "",
"googleshopping_item_number": "",
"googleshopping_part_number": "",
"googleshopping_brand": "",
"googleshopping_weight": "",
"googleshopping_sale_price": "",
"googleshopping_product_type": "",
"googleshopping_expiration_date": "",
"googleshopping_color": "",
"googleshopping_material": "",
"googleshopping_pattern": "",
"googleshopping_gender": "",
"googleshopping_age_group": "",
"googleshopping_item_size": "",
"googleshopping_size_type": "",
"googleshopping_size_system": "",
"googleshopping_adwords_redirect_url": "",
"googleshopping_multipack": "",
"googleshopping_is_bundled": "",
"googleshopping_adult_product": "",
"googleshopping_custom_0": "",
"googleshopping_custom_1": "",
"googleshopping_custom_2": "",
"googleshopping_custom_3": "",
"googleshopping_custom_4": "",
"googleshopping_unit_value": "",
"googleshopping_unit": "",
"googleshopping_base_value": "",
"googleshopping_base_unit": "",
"googleshopping_ignore_product": "",
"googleshopping_shipping_label": "",
"googleshopping_gtin": ""
},
"productdigitaldownloadcustomfields": {
"enabled": "No",
"max_dl": "Global",
"expiration": "Global",
"cdn_name": "",
"miva_path": "",
"miva_name": "",
"bucket": "",
"file": "",
"region": ""
},
"productimagecustomfields": {
"main": "graphics/00000001/1/ny__gift-card--main.png",
"back": "",
"test": "",
"1": "",
"2": ""
},
"points": {
"min_points": 0,
"accru_off": "",
"redem_off": ""
},
"tgreviews": {
"tgr_rating": "",
"tgr_review_count": 0
},
"productdata": {
"queued_VINC": "0",
"dtstamp_VINC": "",
"VINC": ""
},
"quanlimits": {
"prod_min": "0",
"prod_max": "0"
}
}
}
]
}
}
Error Responses#
Error code | Error message | ||
---|---|---|---|
MER-JSN-CAT-00033 | Unable to load category: One of Category_ID, Edit_Category or Category_Code must be specified | Missing required category identifier |