24/7 Support: 800.608.6482

Navigation


Runtime_CategoryList_Load_Query

This function loads a list of categories and sub-categories for a store.

An optional "children" filter is available to request how many levels of sub-categories you want returned.

Request Parameters

session_type Type:
String
Title:
Session Type
This will always have a hard-coded value of "runtime." This tells Miva, no authentication is needed for the API call.
count Type:
Number
Title:
Count
Count is used to tell Miva how many products you returned. If, for example, you are querying thousands of products, you'll want to set the count to limit how many you get back in a single request.
offset Type:
Number
Title:
Offset
Used in conjunction with the Count parameter for paginating results of large datasets. Default is 0 whcih is no offset.
sort Type:
String
Title:
Sort
Field to sort results by. Avaiilable sorting fields listed below. Use - prefix for a decending sort.
Filter Type:
Object
Title:
Filter
Array of Object containing search filters. See usage here: List Load Query Overview
Session_ID Type:
String
Title:
Basket Session ID
[Optional] Passing the Session_ID in the request will allow any customer-specific discounts get applied.

On Demand Columns

CustomField_Values:* See custom field usage here: https://docs.miva.com/json-api/list-load-query-overview

Other Custom Filters

children When specified, child categories are loaded up to the specified depth. Custom field output for child categories should be the same as the primary categories, but the search filter should not be applied. i.e. the search filter determines the highest-level returned categories, but for each of those categories, all of their children are returned.

Response Parameters

total_count Type:
Number
Title:
Total Product Count
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 Type:
Number
Title:
Start Offset
Number of the starting offset number of products to return. Used in conjunction with the Count parameter for paginating results of large datasets.
id Type:
Number
Title:
Category ID
Category ID
parent_id Type:
Number
Title:
Parent ID
Id of the categories parent. Will be 0 if there is no parent
name Type:
String
Title:
Category Name
Category Name
page_title Type:
String
Title:
Category Page Title
Category Page Title
url Type:
String
Title:
URL
URL for the Category
children Type:
Object
Title:
Children
Sub-Categories/Children for the category. Only present if "children" search filter is passed in the request.

Example Requests

Example Response

This website uses cookies to identify visitors, track visitors to our website, store login session information and to remember your user preferences. By continuing to use this site you agree to our use of cookies. Learn More.

This website uses cookies. By continuing to use this site you agree to our use of cookies. Learn More.

Accept

Copyright © 1997 – 2023 Miva©, Miva Merchant©, MivaPay©, MivaCon©, Camp Miva ℠, Miva, Inc. All Rights Reserved.