Skip to content

AvailabilityGroupList_Load_Query#


Description#

This function is used to query one or more availability groups from Miva. It follows the same structure as other List Load Functions in Miva.

Request Parameters#

Parameter
Type Description
count Number Count is used to tell Miva how many availability groups you want returned. 0 will return all availability groups.
offset Number Used in conjunction with the Count parameter for paginating results of large datasets. Default is 0 which is no offset.
sort String Field to sort results by. Available sorting fields listed below. Use - prefix for a descending sort.
filter Object Array of Object containing search filters. See usage here.

On Demand Columns#

This function has no ondemandcolumns.

Supported Search Filter Columns#

Search Filter Description
id Availability Group ID
name Availability Group Name

Supported Sort Columns#

One of these values would be passed in the sort request parameter to have the results sorted by that column. Value may be preceded by - for a descending sort.

Sort Description
id Availability Group ID
name Availability Group Name

Response Parameters#

Parameter
Type Description
success Number 1 indicating a successful request.
0 indicating an unsuccessful request.
total_count Number total_count is the total number of records that match your search criteria. Note: this is not always the total price groups returned. Based on the Count and Offset parameters passed, the number of records returned could be different than the total_count.
start_offset Number Number number of the starting offset number of products to return. Used in conjunction with the Count parameter for paginating results of large datasets.
id Number Availability Group Id
name String Availability Group Name

Example Requests#

{
    "Store_code": "beta",
    "Function": "AvailabilityGroupList_Load_Query",
    "Count": 0,
    "Offset": 0
}

Example Response#

{
    "success": 1,
    "data": {
        "total_count": 1,
        "start_offset": 0,
        "data": [
            {
                "id": 1,
                "name": "wholesale"
            }
        ]
    }
}