Skip to content

QueueOrderList_Load_Query#


Description#

This function is used to pull orders from a queue in Miva. The response and request parameters work identical to OrderList_Load_Query. Reference that function for request/response parameter definitions.

Note

This functions needs explicit permissions to the API token. When in the Miva admin select the API token and the functions button. When the modal appears add Module:orderworkflow:QueueOrderList_Load_Query as the function name and choose the store within the dropdown.

Request Body Parameters#

Name Description
Store_Code Store Code to run function against
Function For Module level functions this will always have the value of: Module
Module_Code Module Code. Always orderworkflow for this function
Module_Function Function to execute
Queue_Code Code of Queue to pull orders from

Response Parameters#

Reference OrderList_Load_Query for response parameter definitions

Example Request#

Note: All ondemandcolumns are the same as OrderList_Load_Query. Because it is a xxxList_Load_Query function it has the same properties defined here.

{
    "Store_Code": "{{Store_Code}}",
    "Miva_Request_Timestamp": "{{$timestamp}}",
    "Function": "Module",
    "Module_Code": "orderworkflow",
    "Module_Function": "QueueOrderList_Load_Query",
    "Queue_Code": "new_Updated_orders",
    "Count": 0,
    "Offset": 0,
    "Filter": [
        {
            "name": "ondemandcolumns",
            "value": ["payment_module", "cust_pw_email", "cust_login", "ship_method", "customer", "items", "charges", "coupons", "discounts", "payments", "notes", "CustomField_Values:customfields:*", "payment_data"]
        }
    ]
}

Example Response#

{
    "success": 1,
    "data": {
        "total_count": 4,
        "start_offset": 0,
        "data": [
            {
                "id": 200076,
                "pay_id": 0,
                "batch_id": 0,
                "status": 100,
                "pay_status": 0,
                "stk_status": 0,
                "dt_instock": 0,
                "orderdate": 1218074529,
                "cust_id": 0,
                "ship_res": true,
                "ship_fname": "J...",
                "ship_lname": "M...",
                "ship_email": "test@coolcommerce.net",
                "ship_comp": "",
                "ship_phone": "555-555-5555",
                "ship_fax": "",
                "ship_addr1": "123 abc",
                "ship_addr2": "",
                "ship_city": "Brooklyn",
                "ship_state": "",
                "ship_zip": "11215",
                "ship_cntry": "",
                "bill_fname": "J...",
                "bill_lname": "M...",
                "bill_email": "test@coolcommerce.net",
                "bill_comp": "",
                "bill_phone": "555-555-5555",
                "bill_fax": "",
                "bill_addr1": "5060 Shoreham Place, Suite 130",
                "bill_addr2": "",
                "bill_city": "Brooklyn",
                "bill_state": "",
                "bill_zip": "11215",
                "bill_cntry": "",
                "ship_id": 0,
                "ship_data": "",
                "ship_method": "None",
                "cust_login": "",
                "cust_pw_email": "",
                "payment_module": "None",
                "source": "user",
                "source_id": 1,
                "total": 178.82,
                "formatted_total": "$178.82",
                "total_ship": 0.0,
                "formatted_total_ship": "$0.00",
                "total_tax": 13.82,
                "formatted_total_tax": "$13.82",
                "total_auth": 0.0,
                "formatted_total_auth": "$0.00",
                "total_capt": 0.0,
                "formatted_total_capt": "$0.00",
                "total_rfnd": 0.0,
                "formatted_total_rfnd": "$0.00",
                "net_capt": 0.0,
                "formatted_net_capt": "$0.00",
                "pend_count": 0,
                "bord_count": 0,
                "note_count": 6,
                "items": [
                    {
                        "order_id": 200076,
                        "line_id": 119,
                        "status": 100,
                        "subscrp_id": 0,
                        "subterm_id": 0,
                        "rma_id": 0,
                        "dt_instock": 0,
                        "code": "KV-P3970-2-077",
                        "name": "P3970-2-077 - George Kovacs Floor Lamp",
                        "sku": "",
                        "retail": 0.0,
                        "base_price": 165.0,
                        "price": 165.0,
                        "weight": 28.29,
                        "taxable": true,
                        "upsold": false,
                        "quantity": 1,
                        "shipment": {
                            "id": 77,
                            "code": "PRV-SHIP-200076-01",
                            "order_id": 200076,
                            "status": 100,
                            "labelcount": 0,
                            "ship_date": 0,
                            "tracknum": "",
                            "tracktype": "",
                            "tracklink": "",
                            "weight": 28.29,
                            "cost": 0.0,
                            "formatted_cost": "$0.00"
                        },
                        "total": 165.0
                    }
                ],
                "charges": [
                    {
                        "order_id": 200076,
                        "charge_id": 168,
                        "module_id": 0,
                        "type": "SHIPPING",
                        "descrip": "Shipping: Shipping Charge",
                        "amount": 0.0,
                        "disp_amt": 0.0,
                        "tax_exempt": 0
                    },
                    {
                        "order_id": 200076,
                        "charge_id": 169,
                        "module_id": 0,

                        "type": "TAX",
                        "descrip": "Sales Tax",
                        "amount": 13.82,
                        "disp_amt": 13.82,
                        "tax_exempt": 0
                    }
                ],
                "coupons": [],
                "discounts": [],
                "payments": [],
                "notes": [
                    {
                        "id": 18,
                        "cust_id": 0,
                        "account_id": 0,
                        "order_id": 200076,
                        "user_id": 0,
                        "notetext": "Automated Workflow: Order retrieved but left in \"New & Updated Orders\" queue.",
                        "dtstamp": 1536340642,
                        "cust_login": "",
                        "business_title": "",
                        "admin_user": ""
                    }
                ],
                "CustomField_Values": {}
            }
        ]
    }
}