Skip to content

CategoryList_Load_Query#


Description#

This function allows you to query one or more categories from Miva.

On Demand Columns#

Name Description
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
uris Returns uri object

Filter Columns#

Name Description
Category_Show All, Active (All is default)

Search Filter Columns#

Field Type
Name String
Depth Number
Code String
Alternate Display Page String
Parent Category String
Page title String
Created Unix Timestamp
Last Updated Unix Timestamp

Supported Sort Columns#

Field Type
Name String
Depth Number
Code String
Alternate Display Page String
Parent Category String
Page title String
Created Unix Timestamp
Last Updated Unix Timestamp

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

Response Parameters#

Parameter
Type Description
success Boolean Boolean value indicating if the API request was successful
total_count Number The number of categories returned
start_offset Number The offset starting point for pagination of return data
id Number Category Id
parent_id Number Id of the categories parent category
agrpcount Number Number of availability groups the category is assigned to
depth Number Depth
disp_order Number Display Order
page_id Number Id of alternate page display. 0 if none
code String Category Code
name String Category Name
page_title String Page Title
active Boolean Active Flag
dt_created Unix Timestamp Created Date
dt_Updated Unix Timestamp Last Updated
page_code String Alternate Page Display Code
parent_category String Parent Category. Empty if no parent
uri Object URI object if included
uri.id Number URI id
uri.uri String URI - Relative Path
uri.store_id Number ID of Store associated with
uri.page_id Number Positive Integer if URI belongs to a page, otherwise 0
uri.cat_id Number Positive Integer if URI belongs to a category, otherwise 0
uri.product_id Number Positive Integer if URI belongs to a product, otherwise 0
uri.feed_id Number Positive Integer if URI belongs to a Feed, otherwise 0
uri.canonical Boolean True/false value if the URI is a canonical URI
uri.status String HTTP Status to return. Values include: 200, 301, 302, 303, 307
CustomField_Values Object Object of custom fields
CustomField_Values.cmp-mv-prodctgy-meta Object Category Meta Fields
CustomField_Values.cmp-mv-prodctgy-meta.keywords String Category Meta Keywords
CustomField_Values.cmp-mv-prodctgy-meta.description String Category Meta Description
CustomField_Values.cmp-cssui-cattitle.category_title_image String Category Title Image
CustomField_Values.cmp-cssui-cattree.category_tree_image String Category Tree Image
CustomField_Values.cmp-cssui-pchdft.header String Category Header
CustomField_Values.cmp-cssui-pchdft.footer String Category Footer

Example Request#

{
    "Store_Code": "{{Store_Code}}",
    "Miva_Request_Timestamp": "{{$timestamp}}",
    "Function": "CategoryList_Load_Query",
    "Count": 0,
    "Offset": 0,
    "Sort": "-Last Updated",
    "Filter": {
        "Name": "Example",
        "Page title": "Example Page"
    }
}

Example Response#

{
    "success": 1,
    "data": {
        "total_count": 3,
        "start_offset": 0,
        "data": [
            {
                "id": 3,
                "parent_id": 0,
                "agrpcount": 0,
                "depth": 0,
                "disp_order": 3,
                "page_id": 0,
                "code": "Sample",
                "name": "Sample Test Category",
                "page_title": "Sample Category Page Title",
                "active": true,
                "dt_created": 1539878232,
                "dt_Updated": 1539884355,
                "uris": [
                    {
                        "id": 70,
                        "uri": "/sample-test-category.html",
                        "store_id": 1,
                        "screen": "",
                        "page_id": 0,
                        "cat_id": 1,
                        "product_id": 0,
                        "feed_id": 0,
                        "canonical": true,
                        "status": 200
                    }
                ],
                "page_code": "",
                "parent_category": "",
                "CustomField_Values": {
                    "cmp-mv-prodctgy-meta": {
                        "keywords": "",
                        "description": ""
                    },
                    "customfields": {
                        "cat_banner": "/path/to/image.jpg"
                    },
                    "cmp-cssui-cattitle": {
                        "category_title_image": ""
                    },
                    "cmp-cssui-cattree": {
                        "category_tree_image": ""
                    },
                    "cmp-cssui-pchdft": {
                        "header": "",
                        "footer": ""
                    }
                }
            },
            {
                "id": 4,
                "parent_id": 3,
                "agrpcount": 0,
                "depth": 1,
                "disp_order": 4,
                "page_id": 0,
                "code": "sub-cat1",
                "name": "Sub Category 1",
                "page_title": "",
                "active": true,
                "dt_created": 1540047807,
                "dt_Updated": 1540047807,
                "page_code": "",
                "parent_category": "Sample",
                "CustomField_Values": {
                    "cmp-mv-prodctgy-meta": {
                        "keywords": "",
                        "description": ""
                    },
                    "customfields": {
                        "cat_banner": ""
                    },
                    "cmp-cssui-cattitle": {
                        "category_title_image": ""
                    },
                    "cmp-cssui-cattree": {
                        "category_tree_image": ""
                    },
                    "cmp-cssui-pchdft": {
                        "header": "",
                        "footer": ""
                    }
                }
            },
            {
                "id": 5,
                "parent_id": 3,
                "agrpcount": 0,
                "depth": 1,
                "disp_order": 5,
                "page_id": 0,
                "code": "sub-cat2",
                "name": "Sub Category 2",
                "page_title": "",
                "active": true,
                "dt_created": 1540047821,
                "dt_Updated": 1540047821,
                "page_code": "",
                "parent_category": "Sample",
                "CustomField_Values": {
                    "cmp-mv-prodctgy-meta": {
                        "keywords": "",
                        "description": ""
                    },
                    "customfields": {
                        "cat_banner": ""
                    },
                    "cmp-cssui-cattitle": {
                        "category_title_image": ""
                    },
                    "cmp-cssui-cattree": {
                        "category_tree_image": ""
                    },
                    "cmp-cssui-pchdft": {
                        "header": "",
                        "footer": ""
                    }
                }
            }
        ]
    }
}