Skip to content

CategoryList_Load_Parent#


Description#

This function allows you to load all sub-categories of a specific category. You pass in the category id and it will return all categories which have that id as its parent.

Request Body Parameters#

Parameter
Type Description
Parent_ID Number Category Id to find the direct sub-categories of

Response Parameters#

Parameter
Type Description
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

Example Request#

{
    "Store_Code": "{{Store_Code}}",
    "Miva_Request_Timestamp": "{{$timestamp}}",
    "Function": "CategoryList_Load_Parent",
    "Parent_Id": "3"
}

Example Response#

{
    "success": 1,
    "data": [
        {
            "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
        },
        {
            "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
        }
    ]
}

Error Responses#

Error Code Error Message Error Description
MER-JSN-00023 One or more parameters are invalid Missing the required Parent_ID field