Skip to content

CSSResourceList_Load_Query#


Description#

This function loads a list of CSS resources for a store. These are CSS files and inline CSS scripts that are available in Miva In-Admin CSS Resource Management Tool.

The files returned and their active/inactive status will be based on the production template branch

Example Request#

{
    "Store_code": "beta",
    "Function": "CSSResourceList_Load_Query",
    "Count": "10",
    "Offset": "0",
    "Sort": "id",
    "Filter": [
        {
            "name": "search",
            "value": [
                {
                    "field": "active",
                    "operator": "TRUE"
                }
            ]
        }
    ]
}

Example Response#

{
    "success": 1,
    "data": {
        "total_count": 20,
        "start_offset": 0,
        "data": [
            {
                "id": 1,
                "code": "minibasket",
                "type": "L",
                "is_global": true,
                "active": true,
                "file": "css/00000001/minibasket.css",
                "templ_id": 0,
                "attributes": [
                    {
                        "name": "type",
                        "value": "text/css"
                    },
                    {
                        "name": "media",
                        "value": "all"
                    },
                    {
                        "name": "rel",
                        "value": "stylesheet"
                    }
                ]
            },
            {
                "id": 2,
                "code": "readytheme",
                "type": "L",
                "is_global": true,
                "active": true,
                "file": "css/00000001/readytheme.css",
                "templ_id": 0,
                "attributes": [
                    {
                        "name": "type",
                        "value": "text/css"
                    },
                    {
                        "name": "media",
                        "value": "all"
                    },
                    {
                        "name": "rel",
                        "value": "stylesheet"
                    }
                ]
            },
            {
                "id": 3,
                "code": "google-fonts",
                "type": "E",
                "is_global": true,
                "active": true,
                "file": "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap",
                "templ_id": 0,
                "attributes": [
                    {
                        "name": "rel",
                        "value": "stylesheet"
                    }
                ]
            },
            {
                "id": 4,
                "code": "preconnect-google-fonts",
                "type": "E",
                "is_global": true,
                "active": true,
                "file": "https://fonts.googleapis.com",
                "templ_id": 0,
                "attributes": [
                    {
                        "name": "rel",
                        "value": "preconnect"
                    },
                    {
                        "name": "crossorigin",
                        "value": ""
                    }
                ]
            },
            {
                "id": 5,
                "code": "preconnect-gstatic",
                "type": "E",
                "is_global": true,
                "active": true,
                "file": "https://fonts.gstatic.com",
                "templ_id": 0,
                "attributes": [
                    {
                        "name": "rel",
                        "value": "preconnect"
                    },
                    {
                        "name": "crossorigin",
                        "value": ""
                    }
                ]
            },
            {
                "id": 6,
                "code": "preconnect-google-analytics",
                "type": "E",
                "is_global": true,
                "active": true,
                "file": "//www.google-analytics.com",
                "templ_id": 0,
                "attributes": [
                    {
                        "name": "rel",
                        "value": "preconnect"
                    },
                    {
                        "name": "crossorigin",
                        "value": ""
                    }
                ]
            },
            {
                "id": 8,
                "code": "square-payment",
                "type": "I",
                "is_global": false,
                "active": true,
                "file": "",
                "templ_id": 463,
                "attributes": [
                    {
                        "name": "type",
                        "value": "text/css"
                    },
                    {
                        "name": "media",
                        "value": "all"
                    }
                ]
            },
            {
                "id": 9,
                "code": "stylesheet",
                "type": "C",
                "is_global": true,
                "active": true,
                "file": "",
                "templ_id": 0,
                "attributes": [
                    {
                        "name": "type",
                        "value": "text/css"
                    },
                    {
                        "name": "media",
                        "value": "all"
                    },
                    {
                        "name": "rel",
                        "value": "stylesheet"
                    }
                ]
            },
            {
                "id": 10,
                "code": "core",
                "type": "L",
                "is_global": true,
                "active": true,
                "file": "themes/00000001/shadows/core.css",
                "templ_id": 0,
                "attributes": [
                    {
                        "name": "type",
                        "value": "text/css"
                    },
                    {
                        "name": "media",
                        "value": "all"
                    },
                    {
                        "name": "rel",
                        "value": "stylesheet"
                    }
                ]
            },
            {
                "id": 11,
                "code": "extensions",
                "type": "L",
                "is_global": true,
                "active": true,
                "file": "themes/00000001/shadows/extensions.css",
                "templ_id": 0,
                "attributes": [
                    {
                        "name": "type",
                        "value": "text/css"
                    },
                    {
                        "name": "media",
                        "value": "all"
                    },
                    {
                        "name": "rel",
                        "value": "stylesheet"
                    }
                ]
            }
        ]
    }
}