24/7 Support: 800.608.6482

Navigation


List Load Query Overview

  1. Filter List Parameters
  2. Ondemandcolumns
  3. Sample Response
  4. Function Reference

Overview

Anytime you want to pull a list of data from the API including Orders, Customers, Products, Categories, etc you will be using a List Load Query Function. These functions are spcifically designed to give you maximum control over which data is returned and how much is returned. There are advanced filters which give you granular control over the response. If you would like Miva to keep track of new and updated changes to orders please see Order Workflows, Product Workflows and Customer Workflows.


Filter List Parameters

All xxxList_Load_Query functions accept the following common parameters:

Filter Optional search/display filter that is applied to results. See below.
Sort Column name to sort the results, may be preceded by "-" for a descending sort.
Count Number of records to return, if 0, return all records (defaults to 0)
Offset 0-based offset of the first record to return (defaults to 0)

List Filter Parameters

Filter is an array of filter structures. The required fields for a filter structure depend on its "name" property.

Valid operators are:

EQ "field" equals "value" (generally case insensitive)
GT "field" is greater than to "value"
GE "field" is greater than or equal to "value"
LT "field" is less than "value"
LE "field" is less than or equal to "value"
CO "field" contains "value"
NC "field" does not contain "value"
LIKE "field" matches "value" using SQL LIKE semantics
NOTLIKE "field" does not match "value" using SQL LIKE semantics
NE "field" is not equal to "value"
TRUE "field" is true
FALSE "field" is false
NULL "field" is null
IN "field" is equal to one of a set of comma-separated values taken from "value"
NOT_IN ""field" is not equal to any of the set of comma-separated values taken from "value"

To perform an AND search, use multiple top-level search filters:

To perform an OR search, use multiple values inside a single search filter:

Parenthetical comparisons can be accomplished using the "SUBWHERE" operator and special field names "search", "search_AND" and "search_OR":

A field of "search" or "search_AND" combines its child expressions with OR and the overall results with its parent using AND. A field of "search_OR" combines its child expressions with "AND" and the overall results with its parent using "OR".

In the example above, the resulting WHERE clause is:

WHERE
ship_lname EQ 'Bchmore' OR ( ship_fname EQ 'Ryan' AND ship_lname EQ 'Guisewite' )


On Demand Columns

ondemandcolumns filter

Many lists return certain columns only when they are explicitly requested. This may be because the column is expensive to load (payment module) or includes a large amount of data that is not always needed (custom fields, product descriptions). These fields can be requested using the ondemandcolumns

Specific on-demand columns will be called out on a function by function basis below. Product, category, customer and order functions all support custom fields, which are retrieved in the following way:

"CustomField_Values:<module code>:<field code>"
Includes that specific field in the output
"CustomField_Values:<module code>:*"
Includes all fields for the specified module in the output
"CustomField_Values:*" Includes all custom fields in the output

Sample Response

All xxxList_Load_Query functions output data (on success) in the following format:


Function Reference

List_Load_Query Functions

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.