Skip to content

OrderItemList_Cancel#


Description#

This function allows you to cancel one or more items (products) on an order.

Request Body Parameters#

Parameter
Type Description
Order_ID Number Order Id
line_ids Array Array of line ids to cancel
Reason String Reason for cancelling items

Response Parameters#

Parameter
Type Description
total Number Order Total after cancellation
formatted_total String Currenty Formatted Order Total

Example Request#

{
    "Store_Code": "{{Store_Code}}",
    "Miva_Request_Timestamp": "{{$timestamp}}",
    "Function": "OrderItemList_Cancel",
    "Order_Id": "200100",
    "Reason": "Customer called to remove items",
    "line_ids": [153, 165]
}

Example Response#

{
    "success": 1,
    "data": {
        "total": 0.0,
        "formatted_total": "$0.00"
    }
}

Error Responses#

Error Code Error Message Error Description
MER-JSN-ORD-00025 Order number not found. Order number not found
MER-JSN-00023 One or more parameters are invalid Missing line_ids parameter