List Load Query Overview
- Filter List Parameters
- Sample Response
- Function Reference
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:
||"field" equals "value" (generally case insensitive)
|| "field" is greater than to "value"
||"field" is greater than or equal to "value"
||"field" is less than "value"
||"field" is less than or equal to "value"
||"field" contains "value"
||"field" does not contain "value"
||"field" matches "value" using SQL LIKE semantics
||"field" does not match "value" using SQL LIKE semantics
||"field" is not equal to "value"
||"field" is true
||"field" is false
||"field" is null
||"field" is equal to one of a set of comma-separated values taken from "value"
||""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:
ship_lname EQ 'Bchmore' OR ( ship_fname EQ 'Ryan' AND ship_lname EQ 'Guisewite' )
On Demand Columns
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
|Includes all fields for the specified module in the output
||Includes all custom fields in the output
All xxxList_Load_Query functions output data (on success) in the following format: