AvailabilityGroupCustomerList_Load_Query
#
Description#
This function loads a list of customers by Availability Group.
Request Parameters#
Parameter |
Type | Description |
---|---|---|
assigned |
Boolean | Boolean value indicating if the query returns assigned customer |
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 customers |
Response Parameters#
Parameter |
Type | Description |
---|---|---|
success |
Number | 1 indicating a successful request. 0 indicating an unsuccessful request. |
success |
Boolean | Boolean value indicating if the api request was successful |
total_count |
Number | the number of customers returned |
start_offset |
Number | the offset starting point for pagination of return data |
id |
Number | customer id |
account_id |
Number | account id associated with the customer |
login |
String | The login name of the customer |
pw_email |
String | The email for the customer password |
ship_id |
Number | Shipping id associated with the customer |
ship_res |
Boolean | Boolean value indicating if the shipping address is residential |
ship_fname |
String | The first name of the customer |
ship_lname |
String | The last name of the customer |
ship_email |
String | The shipping email address for the customer |
ship_comp |
String | The company name of the customer |
ship_phone |
String | The shipping phone number of the customer |
ship_fax |
String | The shipping fax number of the customer |
ship_addr1 |
String | The first shipping address field |
ship_addr2 |
String | The second shipping address field |
ship_city |
String | The city of the shipping address |
ship_state |
String | The state of the shipping address |
ship_zip |
String | The zip code of the shipping address |
ship_cntry |
String | The country of the shipping address |
bill_id |
Number | billing id of the customer |
bill_fname |
String | The first name of the customer |
bill_lname |
String | The last name of the customer |
bill_email |
String | The shipping email address for the customer |
bill_comp |
String | The company name of the customer |
bill_phone |
String | The billing phone number of the customer |
bill_fax |
String | The billing fax number of the customer |
bill_addr1 |
String | The first billing address field |
bill_addr2 |
String | The second billing address field |
bill_city |
String | The city of the billing address |
bill_state |
String | The state of the billing address |
bill_zip |
String | The zip code of the billing address |
bill_cntry |
String | The country of the billing address |
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 |
dt_created |
Number | Unix timestamp for the customer creation date |
dt_login |
Number | Unix timestamp for the customer’s most recent login date |
dt_pwchg |
Number | Unix timestamp for the date the customer changed their password |
credit |
Number | Amount of any customer credit on file |
formatted_credit |
String | Currency formatted amount of any customer credit on file |
business_title |
String | The customer’s business title |
assigned |
Boolean | Boolean value indicating if the customer is currently assigned to the availability group |
Example Request#
{
"Store_Code": "{{Store_Code}}",
"Miva_Request_Timestamp": "{{$timestamp}}",
"Function": "AvailabilityGroupCustomerList_Load_Query",
"Assigned": true,
"AvailabilityGroup_ID": 4,
"Count": 18,
"Filter": "",
"Offset": 0,
"Sort": "id",
"Unassigned": true
}
Example Response#
{
"success": 1,
"data": {
"total_count": 18,
"start_offset": 0,
"data": [
{
"id": 1,
"account_id": 2,
"login": "jondoe",
"pw_email": "noreply@miva.com",
"ship_id": 1,
"ship_res": true,
"ship_fname": "Maynard",
"ship_lname": "Batalla",
"ship_email": "noreply@miva.com",
"ship_comp": "MivaCorp",
"ship_phone": "555-555-5555",
"ship_fax": "555-555-1212",
"ship_addr1": "5060 Santa Fe Street",
"ship_addr2": "",
"ship_city": "San Diego",
"ship_state": "CA",
"ship_zip": "92109",
"ship_cntry": "US",
"bill_id": 1,
"bill_fname": "Maynard",
"bill_lname": "Batalla",
"bill_email": "noreply@miva.com",
"bill_comp": "MivaCorp",
"bill_phone": "555-555-5555",
"bill_fax": "555-555-1212",
"bill_addr1": "5060 Santa Fe Street",
"bill_addr2": "",
"bill_city": "San Diego",
"bill_state": "CA",
"bill_zip": "92109",
"bill_cntry": "US",
"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": 2,
"dt_created": 1623693375,
"dt_login": 0,
"dt_pwchg": 1623693375,
"credit": 0.0,
"formatted_credit": "$0.00",
"business_title": "TestBusiness1",
"assigned": false
},
{
"id": 2,
"account_id": 4,
"login": "realm",
"pw_email": "noreply@miva.com",
"ship_id": 3,
"ship_res": true,
"ship_fname": "Victor",
"ship_lname": "Lamay",
"ship_email": "noreply@miva.com",
"ship_comp": "Fellowship of the sword",
"ship_phone": "555-555-5555",
"ship_fax": "",
"ship_addr1": "Bear and Ogre",
"ship_addr2": "",
"ship_city": "Sidsilver",
"ship_state": "NV",
"ship_zip": "89701",
"ship_cntry": "US",
"bill_id": 3,
"bill_fname": "Victor",
"bill_lname": "Lamay",
"bill_email": "noreply@miva.com",
"bill_comp": "Fellowship of the sword",
"bill_phone": "555-555-5555",
"bill_fax": "",
"bill_addr1": "Bear and Ogre",
"bill_addr2": "",
"bill_city": "Sidsilver",
"bill_state": "NV",
"bill_zip": "89701",
"bill_cntry": "US",
"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,
"dt_created": 1623693375,
"dt_login": 0,
"dt_pwchg": 1623693375,
"credit": 0.0,
"formatted_credit": "$0.00",
"business_title": "Test_Biz_B",
"assigned": false
}
]
}
}