Skip to content

AvailabilityGroupBusinessAccountList_Load_Query#


Description#

This function loads a list of Business Account availability groups.

Request Parameters#

Parameter
Type Description
AvailabilityGroup_ID
AvailabilityGroup_Name
Number
String
Availability Group ID
Availability Group Name
count Number Maximum lines of data allowed to be returned in the response. This limit is used to prevent excessive amounts of data return
filter String A string for filtering returned data
offset Number Used with the Count parameter for paginating results of large datasets. Default 0 is no offset.
sort String The order for sorting returned data
unassigned Boolean Boolean value indicating if the query returns unassigned business accounts
assigned Boolean Boolean value indicating if the query returns assigned business accounts

Response Parameters#

Parameter
Type Description
success Number 1 indicating a successful request.
0 indicating an unsuccessful request.
total_count Number The number of business accounts returned
start_offset Number The offset starting point for pagination of return data
id Number Customer business account ID
title Number Business name associated with the customer ID
tax_exempt Boolean Boolean value indicating if the customer is tax exempt
order_cnt Number The number of orders the customer has placed
order_avg Number Average order total for the customer
formatted_order_avg String Currency formatted average order total for the customer
order_tot Number Total amount of all orders for the customer
formatted_order_tot String Currency formatted total amount of all orders
note_count Number Total number of notes for the customer
assigned Boolean Boolean value indicating if the customer is currently assigned to the availability group

Example Request#

{
    "Store_code": "beta",
    "Function": "AvailabilityGroupBusinessAccountList_Load_Query",
    "Assigned": true,
    "AvailabilityGroup_ID": 4,
    "Count": 18,
    "Offset": 0,
    "Sort": "title",
    "Unassigned": true
}

Example Response#

{
    "success": 1,
    "data": {
        "total_count": 2,
        "start_offset": 0,
        "data": [
            {
                "id": 2,
                "title": "Business Name 1",
                "tax_exempt": false,
                "order_cnt": 101,
                "order_avg": 381.34,
                "formatted_order_avg": "$381.34",
                "order_tot": 38515.6,
                "formatted_order_tot": "$38,515.60",
                "note_count": 0,
                "assigned": false
            },
            {
                "id": 4,
                "title": "Business Name 2",
                "tax_exempt": false,
                "order_cnt": 1,
                "order_avg": 135.9,
                "formatted_order_avg": "$135.90",
                "order_tot": 135.9,
                "formatted_order_tot": "$135.90",
                "note_count": 0,
                "assigned": true
            }
        ]
    }
}