Last active
November 30, 2021 20:51
-
-
Save steveosoule/00109daa9455598e9cce0a7e0dbdce4f to your computer and use it in GitHub Desktop.
Miva JSON API: BusinessAccount Functions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Request | |
| { | |
| "Store_Code": "{{Store_Code}}", | |
| "Miva_Request_Timestamp": "{{$timestamp}}", | |
| "Function": "BusinessAccount_Insert", | |
| "BusinessAccount_Title": "Foobar Inc.", | |
| "BusinessAccount_Tax_Exempt": true | |
| } | |
| // Response | |
| { | |
| "success": 1 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Request | |
| { | |
| "Store_Code": "{{Store_Code}}", | |
| "Miva_Request_Timestamp": "{{$timestamp}}", | |
| "Function": "BusinessAccount_Update", | |
| "BusinessAccount_ID": 4, | |
| "BusinessAccount_Title": "Miva Inc.", | |
| "BusinessAccount_Tax_Exempt": true | |
| } | |
| // Response | |
| { | |
| "success": 1 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Request | |
| { | |
| "Store_Code": "{{Store_Code}}", | |
| "Miva_Request_Timestamp": "{{$timestamp}}", | |
| "Function": "BusinessAccountCustomer_Update_Assigned", | |
| "BusinessAccount_ID": 4, | |
| "Customer_ID": 1, | |
| "Assigned": true | |
| } | |
| // Response | |
| { | |
| "success": 1 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Request | |
| { | |
| "Store_Code": "{{Store_Code}}", | |
| "Miva_Request_Timestamp": "{{$timestamp}}", | |
| "Function": "BusinessAccountCustomerList_Load_Query", | |
| "BusinessAccount_Title": "Miva Inc.", | |
| "__OR_BusinessAccount_ID": 4, | |
| "__FILTER_DOCS": "https://docs.miva.com/json-api/list-load-query-overview", | |
| "Filter": [ | |
| { | |
| "name": "search", | |
| "value": [ | |
| { | |
| "field": "pw_email", | |
| "operator": "CO", | |
| "value": "@miva.com" | |
| } | |
| ] | |
| } | |
| ], | |
| "__SORT_OPTIONS": "(Preifx with - to sort DESC) id, login, pw_email, ship_fname, ship_lname, ship_email, ship_comp, ship_phone, ship_fax, ship_addr1, ship_addr2, ship_city, ship_state, ship_zip, ship_cntry, ship_res, bill_fname, bill_lname, bill_email, bill_comp, bill_phone, bill_fax, bill_addr1, bill_addr2, bill_city, bill_state, bill_zip, bill_cntry, business_title, note_count, dt_created, dt_login, dt_pwchg, tax_exempt", | |
| "Sort": "login", | |
| "Offset": 0, | |
| "Count": 0, | |
| "Assigned": true, | |
| "_OR_Unassigned": true | |
| } | |
| // Response | |
| { | |
| "success": 1, | |
| "data": { | |
| "total_count": 2, | |
| "start_offset": 0, | |
| "data": [ | |
| { | |
| "id": 21, | |
| "account_id": 4, | |
| "login": "jdoe", | |
| "pw_email": "jdoe@miva.com", | |
| "ship_id": 44, | |
| "ship_res": false, | |
| "ship_fname": "Test", | |
| "ship_lname": "Order", | |
| "ship_email": "jdoe@miva.com", | |
| "ship_comp": "DO NOT PROCESS --- TEST ORDER", | |
| "ship_phone": "1234567890", | |
| "ship_fax": "", | |
| "ship_addr1": "16745 West Bernardo Drive", | |
| "ship_addr2": "", | |
| "ship_city": "San Diego", | |
| "ship_state": "CA", | |
| "ship_zip": "92127", | |
| "ship_cntry": "US", | |
| "bill_id": 44, | |
| "bill_fname": "Test", | |
| "bill_lname": "Order", | |
| "bill_email": "jdoe@miva.com", | |
| "bill_comp": "DO NOT PROCESS --- TEST ORDER", | |
| "bill_phone": "1234567890", | |
| "bill_fax": "", | |
| "bill_addr1": "16745 West Bernardo Drive", | |
| "bill_addr2": "", | |
| "bill_city": "San Diego", | |
| "bill_state": "CA", | |
| "bill_zip": "92127", | |
| "bill_cntry": "US", | |
| "tax_exempt": false, | |
| "order_cnt": 0, | |
| "order_avg": 0, | |
| "formatted_order_avg": "$0.00", | |
| "order_tot": 0, | |
| "formatted_order_tot": "$0.00", | |
| "note_count": 0, | |
| "dt_created": 1504800547, | |
| "dt_login": 0, | |
| "dt_pwchg": 1504800547, | |
| "credit": 0, | |
| "formatted_credit": "$0.00", | |
| "assigned": true, | |
| "business_title": "Miva Inc." | |
| }, | |
| { | |
| "id": 1, | |
| "account_id": 4, | |
| "login": "ssoule", | |
| "pw_email": "ssoule@miva.com", | |
| "ship_id": 65, | |
| "ship_res": false, | |
| "ship_fname": "Test", | |
| "ship_lname": "Order", | |
| "ship_email": "ssoule@miva.com", | |
| "ship_comp": "Miva Merchant", | |
| "ship_phone": "123456789", | |
| "ship_fax": "", | |
| "ship_addr1": "123 Event Lane", | |
| "ship_addr2": "", | |
| "ship_city": "San Diego", | |
| "ship_state": "CA", | |
| "ship_zip": "92127", | |
| "ship_cntry": "US", | |
| "bill_id": 27, | |
| "bill_fname": "Test", | |
| "bill_lname": "Order", | |
| "bill_email": "ssoule@miva.com", | |
| "bill_comp": "Miva Merchant", | |
| "bill_phone": "123456789", | |
| "bill_fax": "", | |
| "bill_addr1": "16745 W Bernardo Dr.", | |
| "bill_addr2": "", | |
| "bill_city": "San Diego", | |
| "bill_state": "CA", | |
| "bill_zip": "92127", | |
| "bill_cntry": "US", | |
| "tax_exempt": false, | |
| "order_cnt": 69, | |
| "order_avg": 186.62, | |
| "formatted_order_avg": "$186.62", | |
| "order_tot": 12876.82, | |
| "formatted_order_tot": "$12,876.82", | |
| "note_count": 1, | |
| "dt_created": 1504800547, | |
| "dt_login": 1633616247, | |
| "dt_pwchg": 1504800547, | |
| "credit": 1000, | |
| "formatted_credit": "$1,000.00", | |
| "assigned": true, | |
| "business_title": "Miva Inc." | |
| } | |
| ] | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Request | |
| { | |
| "Store_Code": "{{Store_Code}}", | |
| "Function": "BusinessAccountList_Delete", | |
| "Miva_Request_Timestamp": "{{$timestamp}}", | |
| "BusinessAccount_IDs": [2, 5, 6] | |
| } | |
| // Response | |
| { | |
| "success": 1, | |
| "processed": 3 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Request | |
| { | |
| "Store_Code": "{{Store_Code}}", | |
| "Miva_Request_Timestamp": "{{$timestamp}}", | |
| "Function": "BusinessAccountList_Load_Query", | |
| "__FILTER_DOCS": "https://docs.miva.com/json-api/list-load-query-overview", | |
| "Filter": [ | |
| { | |
| "name": "search", | |
| "value": [ | |
| { | |
| "field": "tax_exempt", | |
| "operator": "EQ", | |
| "value": true | |
| }, | |
| { | |
| "field": "title", | |
| "operator": "CO", | |
| "value": "Miva" | |
| } | |
| ] | |
| } | |
| ], | |
| "__SORT_OPTIONS": "ASCENDING: id,title,note_count,tax_exempt DESCENDING: -id,-title,-note_count,-tax_exempt", | |
| "Sort": "-title", | |
| "Offset": 0, | |
| "Count": 0 | |
| } | |
| // Response | |
| { | |
| "success": 1, | |
| "data": { | |
| "total_count": 1, | |
| "start_offset": 0, | |
| "data": [ | |
| { | |
| "id": 4, | |
| "title": "Miva Inc", | |
| "tax_exempt": true, | |
| "order_cnt": 0, | |
| "order_avg": 0, | |
| "formatted_order_avg": "$0.00", | |
| "order_tot": 0, | |
| "formatted_order_tot": "$0.00", | |
| "note_count": 0 | |
| } | |
| ] | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment