Skip to content

ChildCategoryList_Load_Query#


Description#

This function loads a list of child categories from a specified parent category.

Request Parameters#

Parameter
Type Description
ParentCategory_ID
ParentCategory_code
edit_ParentCategory
Number
String
String
The Parent Category id being updated
The Parent Category code being updated
The Parent Category name being updated
count Number Count is used to tell Miva how many availability groups you want returned. 0 will return all availability groups.
offset Number Used in conjunction with the Count parameter for paginating results of large datasets. Default is 0 which is no offset.
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.
Assigned Boolean Boolean value indicating if assigned child categories should be returned
Unassigned Boolean Boolean value indicating if unassigned child categories should be returned

Response Parameters#

Parameter
Type Description
success Boolean Boolean value indicating if the api request was successful
total_count Number The number of child categories returned
start_offset Number The offset starting point for pagination of return data
id Number ID of the child category
parent_id Number ID of the parent category for the child category
agrpcount Number The count of availability groups for the child category
depth Number Nested depth of the child category
disp_order Number Display order of the child category
page_id Number Child category page ID
code String Code string for the child category
name String Name for the child category
page_title String Page title string for the child category
active Boolean Boolean value indicating if the child category is active
dt_created Number Unix timestamp for the date the child category was created
dt_Updated Number Unix timestamp for the date the child category was updated
page_code String The page code for the child category
parent_category String The parent category containing the child category
assigned Boolean Boolean value indicating if the child category is assigned to a parent category

Example Request#

{
    "Store_code": "beta",
    "Function": "ChildCategoryList_Load_Query",
    "ParentCategory_ID": 1,
    "Filter": "",
    "Sort": "code",
    "Offset": 0,
    "Count": 39,
    "Assigned": true,
    "Unassigned": false
}

Example Response#

{
    "success": 1,
    "data": {
        "total_count": 1,
        "start_offset": 0,
        "data": [
            {
                "id": 11,
                "parent_id": 1,
                "agrpcount": 0,
                "depth": 1,
                "disp_order": 11,
                "page_id": 0,
                "code": "category_01_01",
                "name": "child category 01.01",
                "page_title": "",
                "active": true,
                "dt_created": 1633159793,
                "dt_Updated": 1633159793,
                "page_code": "",
                "parent_category": "category_01",
                "assigned": true
            }
        ]
    }
}

Error Responses#

Error Code Error Message Error Description
MER-JSN-CAT-00038 Parent category not found Parent category not found by ID