Skip to content

BusinessAccountList_Load_Query#


Description#

This function loads a list of business accounts.

Request Parameters#

Parameter
Type Description
count Number Count is used to tell Miva how many records to return.
offset Offset Used in conjunction with the Count parameter for paginating results of large datasets. Default is 0.
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

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 Business Account ID

Response Parameters#

Parameter
Type Description
success Boolean Boolean value indicating if the API request was successful
total_count Number The number of business accounts returned for the product
start_offset Number The offset starting point for pagination of return data
id Number The business id
title String The business name
tax_exempt Boolean Boolean value indicating if the business is tax exempt
order_cnt Number Number of orders placed by the business
order_avg Number Average order value for the business
formatted_order_avg String Currency formatted average order value for the business
order_tot Number Total order value for the business
formatted_order_tot String Currency formatted total order value for the business
note_count Number Number of notes associated with the business account

Example Request#

{
    "Store_code": "beta",
    "Function": "BusinessAccountList_Load_Query"
}

Example Response#

{
    "success": 1,
    "data": {
        "total_count": 2,
        "start_offset": 0,
        "data": [
            {
                "id": 2,
                "title": "Test_Business",
                "tax_exempt": false,
                "order_cnt": 0,
                "order_avg": 0.0,
                "formatted_order_avg": "$0.00",
                "order_tot": 0.0,
                "formatted_order_tot": "$0.00",
                "note_count": 0
            },
            {
                "id": 4,
                "title": "Test_Biz_2",
                "tax_exempt": false,
                "order_cnt": 0,
                "order_avg": 0.0,
                "formatted_order_avg": "$0.00",
                "order_tot": 0.0,
                "formatted_order_tot": "$0.00",
                "note_count": 0
            }
        ]
    }
}

Error Responses#

Error Code Error Message Error Description
MER-JSN-00024 Missing required parameter Function Missing required parameter Function